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

Method count_words

test/general/lm_eval/tasks/wikitext.py:95–97  ·  view source on GitHub ↗
(self, doc)

Source from the content-addressed store, hash-verified

93 return True
94
95 def count_words(self, doc):
96 # count number of words in *original doc before detokenization*
97 return len(re.split(r"\s+", doc))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected