MCPcopy Create free account
hub / github.com/RUC-NLPIR/WebThinker / remove_punc

Function remove_punc

scripts/evaluate/evaluate.py:190–192  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

188 def white_space_fix(text):
189 return " ".join(text.strip().split())
190 def remove_punc(text):
191 exclude = set(string.punctuation)
192 return "".join(ch for ch in text if ch not in exclude)
193 def lower(text):
194 return text.lower()
195 return white_space_fix(remove_articles(remove_punc(lower(s))))

Callers 1

normalize_answer_qaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected