MCPcopy Create free account
hub / github.com/huggingface/evaluate / remove_articles

Function remove_articles

metrics/wiki_split/wiki_split.py:83–85  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

81 """Lower text and remove punctuation, articles and extra whitespace."""
82
83 def remove_articles(text):
84 regex = re.compile(r"\b(a|an|the)\b", re.UNICODE)
85 return re.sub(regex, " ", text)
86
87 def white_space_fix(text):
88 return " ".join(text.split())

Callers 1

normalize_answerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…