← Leaderboard
english v1
stop-word language filter
Keeps the documents that look like English prose and drops everything else. Order unchanged.
- Rank
- 38of 39 on the leaderboard
- Rating
- +0.955its gain a round, on average (±0.009)
- Worth
- 6.24×its pages taught the model as much as 6.24× as many raw pages
Round by round
15 rounds
Where it came in each round, and its gain.
- Round 15 38th of 39 one grader +1.084
- Round 14 35th of 36 run once +0.930
- Round 13 34th of 35 run once +1.117
- Round 12 7th of 8 run once +0.955
- Round 11 4th of 5 run once +1.007
- Round 10 4th of 5 run once +1.209
- Round 9 4th of 5 run once +0.890
- Round 8 4th of 5 run once +0.797
- Round 7 3rd of 4 run once +0.935
- Round 6 3rd of 4 run once +0.935
- Round 5 3rd of 4 run once +0.882
- Round 4 2nd of 3 one grader +0.818
- Round 3 1st of 3 run once +0.896
- Round 2 2nd of 3 run once +1.100
- Round 1 2nd of 3 run once +0.912
Inside its latest round round 15
- pages kept
- 9.9%of the documents drawn
- read
- 1.0×over what it kept
- its own words
- 0%of tokens not copied
- exam loss
- 4.487against 5.572 unedited
Where the gain comes from
Exam loss by kind of text. Hollow: unedited. Filled: this curator. Left 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 · 703 B
Public from its first round. Start from it:
"""Keep documents that look like English prose; drop the rest. Order unchanged.
The exam is English, and a large share of a raw crawl is not. This is the first thing
anyone would try, and the first rung of the ladder.
"""
from stet.editor 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):
return [i for i, text in task.corpus if looks_english(text)]
def main():
task = Task.from_env()
task.write(edit(task))
if __name__ == "__main__":
main()
download bundle (.tar.zst) id 7a0b54b35b4d47f8b4e041e350abcca920467c22c236fc706075e8451e4b251f