|
@@ -23,6 +23,20 @@ def address_extraction(content):
|
|
return "None"
|
|
return "None"
|
|
|
|
|
|
|
|
|
|
|
|
+def refer_exteraction(content):
|
|
|
|
+ """
|
|
|
|
+ extract referals from the documents.
|
|
|
|
+ """
|
|
|
|
+ regex = r"(\w+)\srefer?s\sto(.*?)as\s"
|
|
|
|
+ # 1. by reference
|
|
|
|
+ # 2. In re
|
|
|
|
+ # 3. in qoutes ""
|
|
|
|
+ try:
|
|
|
|
+ print("group1", re.search(regex, content).groups()[0])
|
|
|
|
+ except:
|
|
|
|
+ return "None"
|
|
|
|
+
|
|
|
|
+
|
|
def case_number_extraction(content):
|
|
def case_number_extraction(content):
|
|
# dict_case_numbers = defaultdict(int)
|
|
# dict_case_numbers = defaultdict(int)
|
|
# case_number_info = re.findall("Case\sNo\.\s(\d\:\d{2}\-\w{2}\-\d{5}\-\w{3})", content)
|
|
# case_number_info = re.findall("Case\sNo\.\s(\d\:\d{2}\-\w{2}\-\d{5}\-\w{3})", content)
|