File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 8
8
import sys
9
9
from io import StringIO
10
10
from pathlib import Path
11
+ from typing import Any , Dict
11
12
12
13
from matplotlib import pyplot as plt # type: ignore
13
14
14
- from eyecite import clean_text , get_citations
15
+ from eyecite import get_citations
15
16
16
17
SCRIPT_DIR = os .path .dirname (os .path .abspath (__file__ ))
17
18
sys .path .append (os .path .dirname (SCRIPT_DIR ))
@@ -45,20 +46,22 @@ def generate_branch_report(self, branch: str) -> None:
45
46
now = datetime .datetime .now ()
46
47
data = []
47
48
for row in csv_data :
48
- text = (
49
+ text : str = (
49
50
row ["xml_harvard" ]
50
51
or row ["html_lawbox" ]
51
52
or row ["html_columbia" ]
52
53
or row ["html_anon_2020" ]
53
54
or row ["html" ]
54
55
)
55
- params = {"clean_steps" : ["html" , "inline_whitespace" ]}
56
+ params : Dict [str , Any ] = {
57
+ "clean_steps" : ["html" , "inline_whitespace" ]
58
+ }
56
59
if text :
57
60
# Remove XML encodings from xml_harvard
58
61
text = re .sub (r"^<\?xml.*?\?>" , "" , text , count = 1 )
59
- params [' markup_text' ] = text or ""
62
+ params [" markup_text" ] = text or ""
60
63
else :
61
- params [' markup_text' ] = row [' plain_text' ]
64
+ params [" markup_text" ] = row [" plain_text" ]
62
65
63
66
found_citations = get_citations (** params )
64
67
You can’t perform that action at this time.
0 commit comments