Names in Khmer text, foundនាម

Neam marks the people, organizations and places in Khmer text and tells you exactly where each one is. It is an open Python library that runs offline on an ordinary laptop.

Read the docs $pip install neam
1You write
2Neam reads
3You get

Real output of the released model, saved from a run of the neam package. Hover a name to find it in the result.

Features

Each of these runs inside one predict call.

Word splitting

segment_document

Khmer has no spaces between words. The text is split into words, and each word keeps its exact place in your string.

Hidden characters

normalize

Zero-width spaces from web pages are removed for the model only, so positions still match the original.

Long articles

context_windows

Text longer than the model's limit is read in overlapping windows, so no name is cut in half.

Seven-model vote

ensemble.json

Seven independently trained models are averaged, which makes results steadier than any single one.

Only valid names

decoding="viterbi"

A name can't continue before it has started. The best valid sequence is chosen for the whole text.

Articles from a URL

extract_article_text

Fetches a public news page, keeps the article text and drops menus, with safety checks on the address.

Next steps