Repository navigation
Release v0.10.0
Breaking changes
0.10.0 changes the public interface of every package in one release: the C API, the C++ wrapper suzume.hpp, npm @libraz/suzume, PyPI suzume with its suzume command, and the native suzume-cli. Removed names have no deprecated aliases. SUZUME_ABI_VERSION goes from 1 to 2, so code built against 0.9 must be rebuilt, and the Python binding refuses a library with a different ABI revision.
Every break, with before/after code, is listed in the migration guide: https://suzume.libraz.net/docs/migrating-to-0.10
In short:
- The C options type is
suzume_options_t, and both dictionary loaders return the number of installed entries (0 on failure). lemma/use_lemmaisbase_form/use_base_formin every package, the CLI JSON output included.skip_user_dictionaryisskip_bundled_user_dictionary; it skips only the bundled user dictionary.- The C++ wrapper reports failures through
Expected; npm throwsSuzumeError; Python raisesSuzumeErrororValueError. ThelastErroraccessors are gone. - POS filters take the output labels
NOUN VERB ADJ ADV PARTICLE AUX, and a POS named in the filter is kept even when the particle or auxiliary exclusion is on. - Dictionary sources must be tab-separated
surface,POS, optionalconj_type, optionalbase_form. The CSV layout, the reading/cost columns and a numeric cost column are parse errors. - Both CLIs use the same flag names, help, messages and exit codes. Every usage error exits 2, and a value option never takes a following flag as its value.
- Extended POS: the listing particles とか, だの and やら are
PART_列挙(werePART_副), and the continuative cells で and だっ of the copula areAUX_断定連用(wereAUX_断定). The coarse POS is unchanged. - The scorer options
unary.particle_prior,unary.aux_priorandunary.pronoun_priorare removed; the scorer never read them. Each is now an unknown key: npm and Python raiseSuzumeError(Parse)invalid scorer options: Unknown scorer option: unary.<name>, aSUZUME_SCORER_CONFIGfile naming one is ignored with a warning, andSUZUME_SCORER_UNARY_<NAME>draws the unknown-variable warning.
Added
suzume_pos_label_jaand Japanese POS labels in both bindings, read from the library.pos_ja,conj_typeandconj_formin the CLI JSON output.- npm
loadUserDictionaryand Pythonload_user_dictionaryaccept bytes, so a non-UTF-8 file reports the library's error instead of failing in the binding. - Errors carry the failing operation (
operationin npm and Python), and an unrecognized native code maps toErrorCode.Unknown/UNKNOWN(255). - Named C types for the analysis mode and the tag POS filter, and NULL tag options as the defaults.
- Extended POS values
PART_列挙(93),SUFFIX_造語(94) andAUX_断定連用(95).
Fixed
- Scores no longer differ between targets through fused multiply-add: floating-point contraction is off for every GCC and Clang target.
- The C API no longer lets an allocation failure escape as a C++ exception from any entry point.
- Invalid UTF-8 passed to tag generation reports the same error as
analyze. - Kanji outside the Basic Multilingual Plane are classified as kanji.
- A hashtag starts only at the beginning of the text or right after another hashtag.
- The part of speech no longer changes with the symbol or base-form output options.
- Adjectival auxiliaries report their conjugation form.
- The published packages contain only the git-tracked core dictionaries.
- npm and Python reject tag sizes that would overflow the native struct, as well as inherited object keys in options.
- The copula's ta-connective cell だっ reports the onbin conjugation form (shown as 連用形) instead of the terminal form.
- One admission check serves the loader, the compiler and
suzume-cli dict validate: validate no longer passes a row the loader refuses, and the loader now also refuses a base form over 255 bytes and a surface with an embedded NUL. - A dictionary source whose rows are all refused at install fails with
Dictionary source contains no loadable entriesinstead of a message about invalid UTF-8. - Loading a binary dictionary from a directory path reports an error on Linux instead of attempting an allocation the size of the directory's end offset.
Tokenization changes
- Verbs: ichidan and godan readings of the same kana continuative are chosen by context, a kana one-mora verb is read after an adverb or a noun, and the godan passive is preferred over an ichidan reading of the same form. A kana verb can start on a particle-shaped mora after the accusative, a listed ichidan stem takes irrealis auxiliaries, and a listed verb's continuative before the literary past stays a continuative.
- Auxiliaries: causative, passive and aspect auxiliaries need a verb host, the polite auxiliary no longer attaches to an i-adjective's terminal form, and desiderative and literary negative auxiliaries attach only to the conjugation forms they take.
- Copula: its continuative cells no longer take the literary negative or the volitional, so a kana noun spelled by those cells stays a noun, and the copula is not read inside an unknown kana run right after a small kana.
- Particles: the conjunctive particles read as "because" and "although" no longer follow a bare noun, a case particle no longer follows a finite predicate, and the genitive can close a selected kana noun. A focus particle can follow the accusative, a listing particle cannot, and the eastern conjectural needs a finite predicate.
- Adjectives: no kana adjective starts inside a suffix attached to a kanji or katakana host, and an adjective terminal before a binding particle prefers the attributive-plus-noun reading.
- Te-forms: a te-form before a subsidiary verb is recognized only after a continuative, and an adverb shaped like a te-form is accepted only where a continuative could end.
- Nouns: a continuative before a kanji noun at the start of a phrase is read as a deverbal noun, a formal noun and its particle are split after any modifier, and a determiner can select an unknown one-kanji noun or a kana noun. A listed noun stays whole against a one-kanji noun plus a listed na-adjective, and a kana word with a contracted sound before り is no longer taken for a manner mimetic, so a beautifying prefix stays on it.
- Na-adjectives: a negation prefix plus a na-adjective stem before the copula is one word.
- Numerals: a number and its counter can end before a one-mora verb stem.
- Suffixes: the trade and charge suffixes 屋 and 代 split off as
SUFFIX_造語after a katakana host or a kana-spelled word; kanji compounds and listed words stay whole. - Quotation: an interjection is not read before the quotative after a bare kanji or katakana noun when it spells a dictionary verb cell, and a manner pro-form plus かって at a clause end is read as a quoted question.
- Dictionary: kana-written everyday nouns are added to the core dictionary.
- A kana verb candidate no longer starts inside a listed adverb, and an unlisted kana word that splits into a closed-class word plus a listed verb is not invented.
Full Changelog: v0.9.15...v0.10.0