Introduction
Neam finds people, organizations and places in Khmer text and returns exactly where each one is.
Neam (នាម, "name, noun") is a named entity recognizer for Khmer. Give it Khmer text and it marks three kinds of names:
| Label | What it marks | Example |
|---|---|---|
| PER | People, with a short honorific such as លោក | លោក ហ៊ុន ម៉ាណែតPER |
| ORG | Ministries, companies, universities, teams and other organizations | ក្រសួងសុខាភិបាលORG |
| LOC | Countries, provinces, cities and named places | រាជធានីភ្នំពេញLOC |
For every name it returns the label, the text, and its start and end position in your original string, so you can highlight it, link it or count it without searching the text again.
What you get
- A Python library.
pip install neam, then one call:ner.predict(text). - Offline and small. Seven models of 9.3 million parameters each, about 265 MB in total. It runs on an ordinary laptop CPU, with no server or API key.
- Evaluated on held-out news. 86.7 exact-span F1 on ten held-out Khmer news articles. A name only counts if its type and both of its edges are exactly right.
- Open. Code and weights under Apache-2.0, with a preprint describing every step.
Where it works best
Neam was trained and tested on Cambodian news. It is strongest on people (98.5 F1) and places (91.8) and weakest on long organization names (74.5). Social media, government documents and older text have not been tested. See Limitations.
Where to next
- Install the package and run your first prediction.
- Read the pipeline to see what happens inside
predict. - Look at the scores and the case studies.