Text Summerization Code Updated

parent 7a16bba5
...@@ -86,7 +86,7 @@ class Summarizer_: ...@@ -86,7 +86,7 @@ class Summarizer_:
x = re.sub(r"\([^()]*\)", "", x) x = re.sub(r"\([^()]*\)", "", x)
key_value_strip = (x.split(":")) key_value_strip = (x.split(":"))
string = " ".join([sub_unit for sub_unit in key_value_strip if len( string = " ".join([sub_unit for sub_unit in key_value_strip if len(
sub_unit) > 10]) # Remove strings less than 10 Character sub_unit) > 10]) # Remove strings less than 10 Characters
# Remove serialization (eg 1. 1) # Remove serialization (eg 1. 1)
x = re.sub(r"(\d+)+(\.|\))", "", string) x = re.sub(r"(\d+)+(\.|\))", "", string)
x = re.sub(r"(\*|\?|=)+", "", x) # Removing ( *, ? and = ) x = re.sub(r"(\*|\?|=)+", "", x) # Removing ( *, ? and = )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment