Dataset Viewer

The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.

sv-ngram-index

A Lucene n-gram frequency index (1/2/3-grams) for Swedish, built from sv-ngram-corpus to evaluate confusion-pair rules for Swedish in LanguageTool (katalystnord/languagetool, sv-improvements branch). LanguageTool already ships this kind of index for English, German, French, Spanish, Italian, Russian, Chinese, and Hebrew; This is the first for Swedish.

This holds aggregate n-gram counts, not the underlying text. The text itself is in sv-ngram-corpus, kept in a separate repo.

Structure

sv/
  1grams/   124 MB
  2grams/   1.3 GB
  3grams/   3.7 GB

Built from the combined corpus (2.84 GB, 15,702,791 lines: Wikipedia plus c4-sv shards 0-175 of 1024), 44.1 GB raw, force-merged down to about 5.1 GB total. Drop-in compatible with org.languagetool.dev.bigdata.ConfusionRuleEvaluator's languageModelTopDir argument, the same way as LanguageTool's own official per-language n-gram directories.

Building it

cat corpus/wikipedia-svwiki-2026-09-09.txt corpus/c4-sv-shards000-175.txt > combined.txt
xz -k combined.txt
java -cp <languagetool-dev classpath> \
  org.languagetool.dev.bigdata.CommonCrawlToNgram3 \
  sv combined.txt.xz ./ngram-index

(from a checkout of sv-ngram-corpus.)

Reproducing a confusion pair's numbers

Every pair in confusion_sets.txt on sv-improvements carries its precision and recall as an inline comment, for example:

att; ett; 10;    # p=0.995, r=0.964, f0.5=0.989, s=0.995, 1000+1000, 3grams, 2026-09-13, ...

To reproduce one:

java -cp <classpath> org.languagetool.dev.bigdata.ConfusionRuleEvaluator \
  att ett sv /path/to/this/repo combined.txt

using a checkout of sv-ngram-corpus from the same point in time as the index revision being checked. Tagged commits (for example v26-index) exist for this reason: a pair's recorded numbers are only guaranteed to reproduce against the index that was current when it was evaluated, not necessarily main.

This index will keep growing as more of c4-sv's shards get mined. Each new batch means a full rebuild, not an incremental update; that's how Lucene index construction works here.

License

Aggregate counts derived from Swedish Wikipedia (CC BY-SA 4.0) and c4-sv (ODC-BY). See sv-ngram-corpus's README for the attribution statement. Released under the same two licenses as the source text.

Related

Downloads last month
74