Skip to content
Snippets Groups Projects
Commit 4299e640 authored by Nils W's avatar Nils W
Browse files

19

parent 32955188
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,7 @@ def remove_bugs(sentence):
sentence = remove_all_hash_for_amr(sentence)
# replace with " " to find " and " between two removed chars
sentence = remove_single_char_for_amr(sentence, " ")
sentence = remove_s_for_amr(sentence)
sentence = remove_minus_for_amr(sentence, " ")
sentence = remove_and_for_amr(sentence)
sentence = remove_space_for_amr(sentence)
......@@ -118,6 +119,11 @@ def remove_single_char_for_amr(text, replace):
return text
def remove_s_for_amr(text):
text = text.replace(" 's ", " ")
return text
def remove_minus_for_amr(text, replace):
text = re.sub(" -[a-z]*- ", replace, text)
return text
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment