Browse Source

updated import position

Harsh Parikh 2 năm trước cách đây
mục cha
commit
d1d0131c06
1 tập tin đã thay đổi với 8 bổ sung11 xóa
  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__":