MCPcopy Create free account
hub / github.com/OpenSparseLLMs/MoM / count_words

Method count_words

lm-eval-harness/lm_eval/api/task.py:1480–1482  ·  view source on GitHub ↗

Downstream tasks with custom word boundaries should override this!

(cls, doc)

Source from the content-addressed store, hash-verified

1478
1479 @classmethod
1480 def count_words(cls, doc) -> int:
1481 """Downstream tasks with custom word boundaries should override this!"""
1482 return len(re.split(r"\s+", doc))

Callers 1

process_resultsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected