MCPcopy Create free account
hub / github.com/google-research/language / remove_articles

Function remove_articles

language/decontext/eval_util.py:47–48  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

45 """Lower text and remove punctuation, articles and extra whitespace."""
46
47 def remove_articles(s):
48 return re.sub(r'\b(a|an|the)\b', ' ', s)
49
50 def replace_punctuation(s):
51 to_replace = set(string.punctuation)

Callers 1

normalize_textFunction · 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…