MCPcopy Create free account
hub / github.com/OpenBitSys/BitDistiller / _normalize

Method _normalize

test/general/lm_eval/tasks/drop.py:271–282  ·  view source on GitHub ↗
(self, answer)

Source from the content-addressed store, hash-verified

269 return re.split(" |-", text)
270
271 def _normalize(self, answer):
272 tokens = [
273 self._white_space_fix(
274 self._remove_articles(
275 self._fix_number(self._remove_punc(token.lower()))
276 )
277 )
278 for token in self._tokenize(answer)
279 ]
280 tokens = [token for token in tokens if token.strip()]
281 normalized = " ".join(tokens).strip()
282 return normalized
283
284 def aggregation(self):
285 """

Callers 1

_answer_to_bagsMethod · 0.95

Calls 5

_white_space_fixMethod · 0.95
_remove_articlesMethod · 0.95
_fix_numberMethod · 0.95
_remove_puncMethod · 0.95
_tokenizeMethod · 0.95

Tested by

no test coverage detected