Natural language processing for Go.

Pure Go, no cgo, no external services. This is the library itself, compiled to WebAssembly and running in your browser. Nothing leaves the page.

120k
words per second
3 + 4 MB
models
12
languages
0
cgo

Loading prose.wasm (about 15 MB) …

Case conversion

strcase writes a string in a style, using the tagger to tell which words stay lowercase.

go get github.com/jdkato/prose/v3
Get started API reference

Tokenization

Words and punctuation, with byte offsets, in any language.

Segmentation

Sentences, via the Punkt algorithm, in 12 languages.

Tagging

Part of speech in 12 languages, from averaged perceptrons.

Entities

People, places and organizations, in English.

Readability

Flesch–Kincaid, Gunning fog, SMOG, Coleman–Liau and more.

Case conversion

Title and sentence case, AP and Chicago styles.

Everything knows where it came from

Every token, sentence and entity carries a byte offset into the text you gave it, and the text at that offset is exactly what it says.

Offsets

Pay only for what you use

Each model is its own package. Import the tagger alone and the entity model never enters your binary. Other languages are packages too, so a program links only the ones it imports.

Binary size

Twelve languages

Tagging and segmentation for Danish, Dutch, English, Finnish, French, German, Italian, Norwegian, Portuguese, Spanish, Swedish and Turkish, trained on Universal Dependencies.

Training data and accuracy