Skip to content

Commit

Permalink
added arabic remove articles
Browse files Browse the repository at this point in the history
  • Loading branch information
husseinmozannar authored Apr 5, 2020
1 parent 7cb6abb commit bbcdb1f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions baselines_reading/evaluate_baselines.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@

def normalize_answer(s):
"""Lower text and remove punctuation, articles and extra whitespace."""

def remove_articles(text):
return re.sub(r'\b(a|an|the)\b', ' ', text)

fix_text = re.sub(r'\b(a|an|the)\b', ' ', text)
fix_text = re.sub('\sال^|ال', ' ', fix_text)
return fix_text
def white_space_fix(text):
return ' '.join(text.split())

Expand Down

0 comments on commit bbcdb1f

Please sign in to comment.