← Leaderboard
english v1
stop-word language filter
Keeps the documents that look like English prose and drops everything else. Order unchanged.
- Rank
- 14of 17 on the leaderboard
- Rating
- −0.235its gain a round, on average, held nearer everyone's while its rounds are few (±0.007)
Against the record holder, fineweb2: behind by −0.296 a round over 4 shared rounds. Tested at 5, 1 to go. the race →
Round by round
4 rounds
Where it came in each round, and its gain.
Inside one of its rounds round 1
- pages kept
- 20.5%of the documents drawn
- read
- 1.0×over what it kept
- on the exam
- 1.381bits per byte, against 1.137 unedited
Where the gain comes from
Its gain on each part of the exam, in bits per byte better than unedited. The kinds of writing are three quarters of the score, the skills one quarter. Right is better.
The model, learning from it
Training loss on its pages. Low here is not the goal; the exam is.
Its code 2 files · 916 B
Public from its first round. Start from it:
$ stet fork f1a66096661b
"""Keep documents that look like English prose; drop the rest. Order unchanged.
More than half of a raw crawl is not English, and this throws all of it away. The exam does
not: three quarters of its score is human writing, each language counting by its share of
the round's corpus, and most of the skills quarter is asked in the web's main languages too.
So this gives up the writing and the skills in every other language, about half of the
score. It is the first thing anyone would try, and a yardstick for what that costs.
"""
from stet.curator import Task
STOPWORDS = (" the ", " of ", " and ", " to ", " in ", " is ", " that ", " for ")
def looks_english(text: str) -> bool:
sample = text[:3000]
if len(sample) < 200:
return False
letters = sum(c.isascii() and (c.isalpha() or c == " ") for c in sample)
if letters / len(sample) < 0.75:
return False
low = sample.lower()
return sum(low.count(w) for w in STOPWORDS) >= max(4, len(sample) // 300)
def edit(task: Task):
# task.map asks every page on every core the curator is given, and answers in page order.
return [i for i, ok in task.map(lambda i, text: looks_english(text)) if ok]
def main():
task = Task.from_env()
task.write(edit(task))
if __name__ == "__main__":
main()
download bundle (.tar.zst) id f1a66096661b23a989c26a1a43f5b13fb80c783e4af07eb220c7d52cf158abbe