Skip to content

v0.4.0a1

Pre-release
Pre-release

Choose a tag to compare

@ysenarath ysenarath released this 19 Oct 03:28
· 0 commits to master since this release

pip install --pre sinling==0.4.0a1 · Python 3.11+ · no dependencies

The first pre-release of Sinling 0.4, a redesign with a new API. It is not compatible with 0.3. A plain pip install sinling still installs 0.3.7. If your code uses the 0.3 API, pin sinling<0.4.

New

  • sinling.normalize() converts Sinhala text to one canonical Unicode form. It removes invisible characters, fixes ZWJ placement (SLS 1134), composes doubled vowel signs, reorders vowel signs typed in visual order, replaces vowel sequences listed in Unicode's DoNotEmit.txt, applies NFC and tidies whitespace. The standard and search presets differ only in ZWJ handling, and each rule can be turned off. The result is idempotent.
  • sinling.aksharas() splits text into written syllables without losing any characters.
  • Doc, Token, Span: a shared document object. Every text change keeps an alignment back to the original text, and a Doc converts to and from JSON.
  • sinling.pipeline([...]) runs several tasks in order on one Doc.
  • Backends and plugins. Each task can have several backends, chosen with backend=. Third-party backends register through the sinling.backends entry-point group and load on first use.
  • Resources. Versioned downloads with SHA-256 checks, a local cache and an offline mode (SINLING_OFFLINE=1). No resources are published yet.

Fixed

  • U+0D8C (ඌ) is U+0D8B + U+0DDF (gayanukitta), not U+0DD8 as 0.3's preprocessing assumed.

Removed

  • The whole 0.3 API: SinhalaTokenizer, SinhalaStemmer, POSTagger, word_joiner, word_splitter and preprocess. Tokenization and stemming return on the new core in 0.4.0a2.

The wheel is 23 KB, down from 20 MB in 0.3.7.