MCPcopy Create free account
hub / github.com/Yuan-Li-FNLP/R3-RAG / remove_articles

Function remove_articles

benchmark/batch_check/batch_check.py:222–223  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

220 Normalize text by removing articles, punctuation, and extra whitespace, and converting to lowercase.
221 """
222 def remove_articles(text):
223 return re.sub(r'\b(a|an|the)\b', ' ', text)
224 def remove_punctuation(text):
225 return ''.join(ch for ch in text if ch not in string.punctuation)
226 def whitespace_fix(text):

Callers 1

normalize_answerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected