Skip to content

Changelog

Released and unreleased changes. The text below is CHANGELOG.md from the repository. The newest section is Unreleased.

Unreleased

  • roman.type_odia types Roman Odia into Odia script offline (namaskara gives ନମସ୍କାର). Whitespace and punctuation stay put. candidates=True returns up to eight full strings, best first, ranked by how often each glossary word occurs. Letters with no Hunterian spelling (c, f, q, x, z) are read as Odia consonants, and a glossary token that is not a well-formed syllable is not offered. This is typing, separate from openodia.phonetic matching. roman.type_odia needs a release newer than 0.2.0: it raises AttributeError on 0.2.0.
  • Add openodia.spell (is_correct, suggest, correct_text) and openodia spell to check an Odia word, suggest dictionary corrections, and correct text in place. Suggestions use akshara edit distance up to 2 against the offline dictionary, ranked by akshara distance, then, at the same akshara distance, by letter distance weighed against how often the word appears there (each letter closer counts as much as appearing about 3.8 times as often), so spell.suggest, spell.correct_text and openodia spell output pick ବିଚ୍ଛେଦ for ବୀଚ୍ଛେଦ and ସ୍ୱିଗଲିଙ୍ଗ୍ for ଶ୍ୱିଗଲିଙ୍ଗ୍; spell.is_correct and openodia spell --check are unchanged by this ranking. Whitespace, punctuation, digits and non-Odia text stay as written, and a word with no candidate within distance 2 is left as written. It needs a release newer than 0.2.0: openodia spell exits 2 on 0.2.0, and import openodia.spell fails on 0.2.0.
  • pii.detect and pii.mask: Text that is not in NFC is also searched in its NFC form, and each match is mapped back to offsets in the text you passed, so a PAN followed by a decomposed accented letter is found. In text that is not in NFC, a match found in the NFC form whose last letter carries 32 or more combining marks also covers those marks.
  • Add openodia.legacy with decode and to_unicode. legacy.decode reads the bytes of text typed in an 8-bit Odia font as keystroke characters: cp1252 for each defined byte, while 0x81, 0x8D, 0x8F, 0x90 and 0x9D, which that codec leaves undefined, stay as those code points. legacy.to_unicode(text, font="ORTTSarala") converts those keystrokes to NFC Unicode Odia, so ଡ଼ is consonant plus nukta. SUPPORTED_FONTS is ("ORTTSarala",). After the glyph table, to_unicode rebuilds each syllable in Unicode order: reph, base consonant, subjoined forms in the order typed, vowel sign, then nasal or visarga. A reph, vowel sign, nasal or visarga typed before a subjoined form gives the same output as typed after it (ÒLÕÔÍ and ÒLÔÍÕ both give କ୍ୟ୍ରେଂ). A reph typed in a syllable with no base consonant stays where it was typed. The left matra Ò, typed before the consonant, joins its right half ß, × or Ð into ୈ, ୌ or ୋ wherever that half is typed in the syllable (ÒLàÔß and ÒLÔßà both give ର୍କ୍ୟୈ). Only the first right half joins it, and a later one stays as typed (ÒLÐß gives କୋß). A second Ò in the same syllable gives େ after the joined sign (ÒLÒÐ gives କୋେ). A second reph in the same syllable is dropped (Làà gives ର୍କ). Nasals and visarga keep the order typed (LÓÕ gives କଃଂ). A nukta, Ï or a Unicode ଼, goes right after the consonant typed last before it in the same syllable, ahead of any halant or zero-width joiner, also when a vowel sign, nasal, visarga or reph is typed in between (XÐÏ and XÏÐ both give ଡ଼ା). In a syllable with no consonant, a nukta goes ahead of the vowel signs. ú typed after କ, ସ or ପ puts a half ta before that consonant (DLúf gives ଉତ୍କଳ). A run of numeric separators all convert (1Ð2Ð3 gives ୧|୨|୩). The ORTTSarala glyph table and the ú half-ta rule come from the OdiaWikimedia ORTT-Sarala converter, https://github.com/OdiaWikimedia/Converter. openodia.legacy needs a release newer than 0.2.0: import openodia.legacy fails on 0.2.0.
  • pii finds calendar dates as DATE: a day, an English or Odia month name and a year (15 January 2024, May 4, 2024, ୧୫ ଜାନୁଆରୀ ୨୦୨୪) at confidence 0.85, or day-month-year digits with /, - or . (15/01/2024) at 0.7. Only real days from 1900 to 2099 are found. DATE needs a release newer than 0.2.0: on 0.2.0, pii.detect(text, types=["DATE"]) raises ValueError and openodia pii --type DATE exits 2.

0.2.0 (2026-11-13)

Added

  • Add openodia.sandhi to split an Odia compound into the words sandhi joined (split) and to join those parts (join). A known lemma, or a word that does not split into two known words, is returned unchanged. split and join NFC-normalize, so for a compound the splitter accepts join(split(word)) equals the NFC form of that word: https://github.com/soumendrak/openodia/pull/299
  • Add openodia.pii and openodia pii to find or mask phone numbers, emails, URLs, Aadhaar (Verhoeff checksum), PAN and PIN codes in Odia or ASCII digits. Overlapping matches merge into one span, so for every detected value mask never leaves part of it visible (see the limits below), and mask repeats until stable so masking its output changes nothing (up to 10 glued values). Detection is linear in the input size: https://github.com/soumendrak/openodia/pull/281
  • Every CLI subcommand accepts --json and prints one UTF-8 JSON document on stdout; default text output is unchanged by --json. With --json, invalid UTF-8 in stdin or in the text argument is an openodia: error: with exit code 1; detect-language --json used to pass it through in 0.1.14: https://github.com/soumendrak/openodia/pull/278 and https://github.com/soumendrak/openodia/pull/279
  • Async translation: odia_to_other_lang_async, other_lang_to_odia_async, universal_translation_async and translate_batch with bounded concurrency, optional retries and return_exceptions: https://github.com/soumendrak/openodia/pull/284
  • openodia.phonetic: Odia-adapted phonetic matching (soundex, metaphone, and similarity): https://github.com/soumendrak/openodia/pull/226
  • openodia.indic: transliterate between Brahmic Indic scripts. A composition-excluded nukta letter is consonant + nukta when the target has those parts, except Gurmukhi flap RRA and a target LLA, SHA, or YYA, which stay one letter. Odia WA stays when the target has no WA. Bengali writes VA as BA. A Malayalam chillu expands to consonant + virama: https://github.com/soumendrak/openodia/pull/228
  • openodia.roman: Odia romanisation (to_roman / from_roman) with the ISO 15919, Hunterian and ITRANS schemes. to_roman writes a nukta after any consonant except ଡ and ଢ as · in ISO 15919 and a backtick in ITRANS, and drops it in Hunterian. ଡ଼ and ଢ଼ keep their own letters in all three schemes: ṛ/ṛh in ISO 15919, .D/.Dh in ITRANS, and r/rh in Hunterian (where plain ଡ and ଢ give d/dh). from_roman reads each scheme's mark back as the nukta, so to_roman(..., reversible=True) now quotes a literal · (ISO 15919) or backtick (ITRANS) instead of passing it through. By default, to_roman returns non-Odia text exactly as given, so its output no longer round-trips text that mixes Odia with other text (for example to_roman("କi") gives kai, which from_roman reads as କୈ). Callers who need an exact round trip should pass reversible=True (to_roman("କi", reversible=True) gives ka:{i:}). In ISO15919 and ITRANS, from_roman(to_roman(text, scheme, reversible=True), scheme) gives back text with each run of Odia characters (U+0B00-U+0B7F) in NFC and all other characters unchanged. NFC Odia therefore comes back with the same code points, including vowel signs, viramas and nuktas that follow no consonant or follow ZWJ/ZWNJ. In all three schemes, each run of Odia characters (U+0B00-U+0B7F) in the output of from_roman is in NFC, including Odia passed through or quoted in the input, so U+0B5C gives U+0B21 U+0B3C. Non-Odia characters that from_roman does not decode are left as given, except that ISO15919 applies NFC to its input outside quotes: https://github.com/soumendrak/openodia/pull/227
  • The package ships py.typed (PEP 561) and is fully type-annotated (mypy strict), so type checkers see the narrowed remove_stopwords return types: https://github.com/soumendrak/openodia/pull/280 and https://github.com/soumendrak/openodia/pull/283
  • Docs for AI agents (AGENTS.md, skills/openodia/SKILL.md and llms.txt), a generated API reference and six usage guides (text, script and names, numbers, analysis, translation, command line) with every guide example checked by the test suite, a getting started page, guides for transliteration and PII, API pages for pii, indic, async translation, and STOPWORDS, plus a changelog page and a contributing page. Docs search suggests matches and highlights the terms. Getting started says । is its own token only when a space precedes it. The docs and dev extras now include mkdocstrings[python]; the library's runtime dependencies are unchanged: https://github.com/soumendrak/openodia/pull/278, https://github.com/soumendrak/openodia/pull/289 and https://github.com/soumendrak/openodia/pull/297

Changed

  • Behaviour change, changes default output: ud.sentence_tokenizer now splits after ।, ॥, ? and !, with or without a space after them; it used to split only on " ।". Each sentence is trimmed and keeps its terminator, a terminator with no words of its own joins its neighbour, and empty input gives []. A ? or ! directly followed by an ASCII letter, digit or =&%#/_ (a?id=5, Yahoo!Mail) is not a boundary. ["ଏକ ଦୁଇ", " ତିନି ଚାରି", ""] becomes ["ଏକ ଦୁଇ ।", "ତିନି ଚାରି ।"]. This changes the default text and --json output of openodia tokenize --sentences (no leading spaces, no empty last entry, [] for empty input; text mode prints no blank line for empty input) and of openodia summarize and WordFrequency.get_summary (sentences keep their । and are joined with one space, and text containing ?, !, ॥ or a danda without a leading space is split into different sentences, so the chosen sentences can differ). This overrides the "output is unchanged" statement in the --json bullet above for these two subcommands: https://github.com/soumendrak/openodia/pull/293
  • TranslationCache can be shared between threads (it can still be pickled and deep-copied). Concurrent get, set and clear calls no longer raise KeyError or lose hit and miss counts, and a get that reads the disk cache while a set or clear runs no longer puts the old or cleared value back in memory. A disk write or clear that raises leaves the cache usable. Pickling or copying a cache while another thread writes to it takes a consistent snapshot. Behaviour change: copy.copy(cache) now gets its own memory entries instead of sharing them with the original. openodia.cache.get_cache() builds its singleton under a lock, so threads making the first call together share one cache (before, OPENODIA_CACHE_DISK could give each its own, losing entries and counts): https://github.com/soumendrak/openodia/pull/296
  • import openodia and openodia --help no longer import faker, deep_translator, requests or bs4; they load on first use of name.generate_names or a Google translation (a cached result or an offline-dictionary hit loads nothing). import openodia is about 2.5x faster in this repo's measurements. The public API is unchanged: https://github.com/soumendrak/openodia/pull/292
  • import openodia no longer configures logging. It used to call logging.basicConfig with a Rich handler, which attached a root handler in the host application and printed log lines (with local variables in tracebacks) to stdout. Library logs now go to the openodia logger, which has a NullHandler; configure logging in your application to see them. The openodia CLI output is unchanged: https://github.com/soumendrak/openodia/pull/290

Fixed

  • openodia translate and other_lang_to_odia find offline-dictionary words when the text has leading or trailing whitespace. Input from --file or stdin ends in a newline, so it used to miss the dictionary and call Google Translate, which failed whenever Google rate limited the request: https://github.com/soumendrak/openodia/pull/294
  • An invalid name_type in name.generate_firstnames logs an error without the meaningless NoneType: None traceback line (the ValueError is unchanged): https://github.com/soumendrak/openodia/pull/290

Known limits

  • Sandhi: the splitter knows 74 lemmas. split returns at most two known lemmas, so it does not unpack a longer compound (for example join(["ଲୋକ", "ସଭା", "ଗୃହ"]) is ଲୋକସଭାଗୃହ, and split of that string does not return three parts). split takes one word; a spaced phrase such as ବିଦ୍ୟା ଆଳୟ is returned unchanged. join can still fold more than two parts.
  • Hunterian is intentionally lossy (no diacritics) and ignores reversible. It drops vowel length, so to_roman("ନମସ୍କାର", "Hunterian") is namaskara and from_roman of that spelling is ନମସ୍କର, not ନମସ୍କାର. Odia digits become ASCII 0-9 even when reversible=True. Hunterian from_roman decodes no Roman spelling as anusvara, candrabindu or visarga: an n or h that is not part of a longer letter such as ng or kh decodes as the consonant ନ or ହ. Odia ଂ, ଁ and ଃ in the input pass through. ନ୍ endings and clusters such as ନ୍ସ and ଙ୍କ do round-trip; anusvara and visarga round-trip through the explicit marks of ISO 15919 and ITRANS.
  • pii does not detect names, addresses, dates or amounts, so masked text can still identify a person.
  • English to Odia is served from the bundled offline dictionary when the phrase is in it; every other translation pair calls Google Translate over the network, which can be rate limited and refuses text of 5,000 or more characters.

0.1.14 (2026-10-26)

  • python -m openodia now runs the CLI.
  • Add CLI --version, UTF-8 stdin handling, and concise file/encoding errors.
  • File input now requires --file; existing filenames passed without it are literal text.
  • openodia translate reports Google rate limits, unsupported language codes and text over 5,000 characters as a single openodia: error: line instead of a traceback.
  • UTF-8 byte order marks are ignored in --file input, stdin and Stopwords.from_file, which now defaults to encoding="utf-8-sig" (files without a BOM read as before).
  • The CLI exits quietly on a closed pipe (status 141), reports closed stdin and invalid OPENODIA_CACHE_* values as one-line errors, and names argument types plainly in error messages.
  • Docs: alphabet.matras, two-decimal confidence scores and a working ud.sentence_tokenizer example.