Quellcode durchsuchen

updated import position

Harsh Parikh vor 2 Jahren
Ursprung
Commit
d1d0131c06
1 geänderte Dateien mit 8 neuen und 11 gelöschten Zeilen
  1. 8 11
      expert_report/parse_expert_pdf.py

+ 8 - 11
expert_report/parse_expert_pdf.py

@@ -1,20 +1,17 @@
+from collections import defaultdict
+import os
+import tika
+from tika import parser
+import pandas as pd
 from parse_expert_pdf_utils import (
-    defendent_extraction,
     plaintiff_extraction,
     defendent_extraction,
     expert_name_extraction,
     case_number_extraction,
 )
-import tika
-import os
-from tika import parser
-import pandas as pd
-from collections import defaultdict
 
-tika.initVM()
-import warnings
 
-warnings.filterwarnings("ignore")
+tika.initVM()
 
 
 def main(path: str) -> pd.DataFrame:
@@ -33,8 +30,8 @@ def main(path: str) -> pd.DataFrame:
         data["defendant"].append(defendent_extraction(content))
         data["case_number"].append(case_number_extraction(content))
 
-    df = pd.DataFrame(data)
-    return df
+    data_expert = pd.DataFrame(data)
+    return data_expert
 
 
 if __name__ == "__main__":