Skip to content

Features overview

Every subsystem below is implemented, tested, and documented. Start from what you want to do, or from the crate map further down.

Start from the problem

I want to…Use
Split text into wordsTokenizers — start with AggressiveTokenizer
Split text into sentencesSentenceTokenizer
Tokenize a language other than EnglishTokenizers — 16 language variants
Measure how similar two strings areString distance
Correct a typolevenshtein, usually after narrowing candidates
Correct spelling against a corpusSpellcheck
Match names that sound alikePhonetics
Search a whole dictionary for sound-alikesPhonetic neighbors
Match names across language boundaries (genealogy)Beider-Morse
Match names with a shared prefixjaro_winkler
Work out which encoder or stemmer a text even needsLanguage
Build an autocomplete indexTrie
Find repeated phrasesN-grams
Strip accents before comparingremove_diacritics
Expand English contractionsnormalize
Normalise Japanese width and kananormalize_ja
Romanise Japanese kanaTransliterators
Pluralise a noun, or write "23rd"Inflectors
Reduce words to a stemStemmers
Rank documents by relevanceTF-IDF
Classify documents into categoriesClassifiers
Score sentiment over a token listSentiment
Look up synonyms and word relationsWordNet
Tag parts of speechPOS tagger
Split a tagged sentence into subject and predicateSentence analyzers
Write generic code over any tokenizerCore vocabulary

The crates

SubsystemCratePublic surface
Tokenizersverbora-tokenizers25 tokenizers, Tokenize, Utf16Token
String distanceverbora-distance8 metrics, 5 StringMetric impls
Phoneticsverbora-phonetics11 encoders: SoundEx, Metaphone, Double Metaphone, Daitch–Mokotoff ×2, Cologne, Nysiis, Caverphone 1/2, Phonex, Refined Soundex, Match Rating
Phonetic neighborsverbora-phoneticsPhoneticIndex — dictionary-wide candidate generation over any of the four core encoders
Beider-Morseverbora-phoneticsCross-language surname matching over up to 18 languages at once, with auto-detection
Languageverbora-languageScript detection, optional statistical language detection, and recommend() — language → phonetic encoder
N-gramsverbora-ngramswindow engine, stats, Chinese n-grams
Normalizersverbora-normalizers6 normalizers, 17 Japanese converters
Inflectorsverbora-inflectors6 inflectors, runtime rules
Trieverbora-trieprefix tree, prefix and path queries
Transliteratorsverbora-transliteratorsJapanese kana → romaji, five-phase pipeline
WordNetverbora-wordnetlexical database, synsets, relation traversal, 4 storage strategies
TF-IDFverbora-tfidfterm interning, incremental idf cache, listTerms/tfidf/tfidfs
Sentimentverbora-sentiment14 lexicons across 10 languages, sticky negation
Classifiersverbora-classifiersBayes, logistic regression, MaxEnt + GIS
Stemmersverbora-stemmers16 stemmers: Porter/Snowball across 12 languages, Lancaster, Japanese, Indonesian
Spellcheckverbora-spellcheckfrequency-ranked correction, BK-tree and deletion indexes
POS taggerverbora-taggerBrill tagging, training and evaluation; English and Dutch data
Sentence analyzersverbora-analyzersphrase annotation, subject/predicate splitting, sentence type
Utilitiesverbora-utilstop words, abbreviations, weighted graphs and storage backends
Core vocabularyverbora-core6 traits, Token, StopWords, whitespace helpers

Language support

LanguageTokenizerNormalizerInflectorPhonetics
English✅ nouns, verbs, ordinals✅ all four core encoders
French✅ nouns, ordinals
German
Spanish
Italian
Portuguese
Dutch
Norwegian
Swedish
Danish/Nordic
Russian
Ukrainian
Polish
Persian
Hindi
Indonesian
Vietnamese
FinnishOrthographyTokenizer
Japanese✅ + 17 converters✅ nouns
Chinese✅ n-grams

Latin-script diacritic folding via remove_diacritics applies far more broadly than the Normalizer column suggests — it is a table over 820 non-ASCII characters, not a per-language rule set. Stemmers cover 12 languages on their own axis; see Stemmers.

Where else to look

Released under the MIT License.