DEV Community

Cover image for Building the Romanian NLP API that should already exist
Peter Abolins
Peter Abolins

Posted on Edited on

Building the Romanian NLP API that should already exist

If you've tried to do anything programmatic with Romanian text, you've probably hit the same wall I did.

There's no clean API for it. You end up scraping DEXonline, wrestling with incomplete library support, or calling a general-purpose LLM and hoping it gets the grammar right. None of that is good enough for production.

The specific gap

Given an arbitrary Romanian sentence, return for each token: its lemma, part of speech, grammatical case, number, gender, person, and tense.

This is what spaCy does for English, French, and German in a pip install. LexicRo is that as a hosted, versioned HTTP contract for Romanian: callable without shipping a model, stamping the version it answered with, and telling you per token whether the answer came from a lexicon or a prediction.

Romanian NLP tooling lags well behind English. The academic resources are there — DEXonline (313k+ lemmas), RoLEX (330k morphosyntactic entries), the Universal Dependencies Romanian Treebank — they're just not packaged in a way developers can actually use.

But why not just use ChatGPT?

Fair question. The short answer: for production, an LLM is not infrastructure — it's an oracle. The accusative form of câine is always câinele, regardless of the LLM's mood that day. LexicRo returns structured linguistic data, and every response carries the model_version that produced it. The weights, lexicon and tagset are versioned together as one unit, so you can pin against a version and know exactly what you are pinned to. Beyond that: LLM costs at scale are unpredictable; a dedicated endpoint does one thing and does it the same way every time; and structured output from an LLM requires prompt engineering, validation, and retry logic. LexicRo returns clean JSON, every time.

What I'm building

LexicRo — an open-core, hosted API platform covering the endpoints Romanian developers actually need:

POST /analyze
→ lemma, POS, case, gender, number, person, tense per token, plus 
  where each answer came from

GET /conjugate/{verb}
→ conjugation table — seven moods, including perfect simplu
  and viitor I. For a verb the conjugator does not recognise,
  returns a predicted paradigm and marks it as predicted.

GET /inflect/{word}
GET /lookup/{word}
POST /difficulty
→ these were withdrawn on 2026-08-17 and are not currently served.
Enter fullscreen mode Exit fullscreen mode

Technical approach

Not starting from scratch — the data and models are there:

  • Base model: bert-base-romanian-cased-v1 fine-tuned for morphological tagging
  • Conjugation: verbecc Romanian XML templates
  • Lexical: DEXonline database dump + RoLEX dataset
  • Infrastructure: FastAPI, Docker, full OpenAPI spec

Licence and access

  • Code: MIT
  • Model weights: licensing terms for the model weights are still being worked out
  • Free tier: 1,000 req/day, no credit card, all endpoints

Phase 1 ships first

The conjugation and lexical lookup endpoints are the straightforward part — wrapping verbecc and DEXonline cleanly. That's what ships first (~3 months). The morphological analyser (the hard part, requiring fine-tuned BERT) follows in phase 2.

What I'm looking for

I'm in pre-development and genuinely looking for:

  1. Feedback on the endpoint design — does this cover what you'd actually need?
  2. Early users working with Romanian text at any scale
  3. Academic connections
  4. Anyone who's built adjacent to this — what did you learn?

Update, 2026-08-30: the plan described above changed. /lookup, /inflect and /difficulty were withdrawn on 2026-08-17. /analyze — described here as Phase 2 work — shipped and is live. There is a demo, no key required: https://demo.lexicro.com


Links: lexicro.com · demo.lexicro.com · github.com/LexicRo · [email protected]

Romanian deserves the same NLP infrastructure as French or German. Building it in public — feedback welcome.

Top comments (2)

Collapse
 
aibughunter profile image
AI Bug Slayer 🐞

LexicRo is filling a real gap — lower-resource languages often lack solid NLP tooling. Morphological analysis and conjugation for Romanian is complex work that benefits the whole community.

Collapse
 
peterabolins profile image
Peter Abolins

Thanks — that's exactly the framing I am aiming for. Romanian sits in an awkward middle ground: large enough to have real demand (24M speakers, official EU language) but small enough that it's been overlooked by the major NLP tooling efforts. Phase 1 is conjugation and lexical lookup, which are the straightforward parts. The morphological analyser is where it will get interesting. Happy to keep you posted as it develops.