Skip to content

Releases: mideind/GreynirEngine

3.7.2

Choose a tag to compare

@vthorsteinsson vthorsteinsson released this 14 Jul 11:29
cd7d97e

Changes

  • Parse results are now deterministic across repeated parses, processes
    and PYTHONHASHSEED values (#66). Previously, when a parse forest
    contained subtrees with exactly equal reduction scores, the tie was
    effectively broken by memory allocation addresses: the Earley state hash
    in the C++ parser core included raw pointer values, which perturbed the
    order in which derivation families were assembled in the packed parse
    forest, and thereby which equally-scored tree the reducer returned.
    The state hash is now content-based, and grammar terminals/nonterminals
    are hashed by stable sequence numbers instead of id() on the Python
    side. Note that as a consequence, the single tree returned for an
    ambiguous sentence with tied scores may differ from the one that a
    previous version happened to return - but it is now always the same one.

  • No changes to the public API.

3.7.1

Choose a tag to compare

@vthorsteinsson vthorsteinsson released this 14 Jul 01:27

Changes

  • CPython wheels are now correctly tagged as abi3 (cp310-abi3), so a
    single binary wheel serves all CPython versions >= 3.10. The extension
    module has always been compiled against the stable ABI, but the wheels
    were previously tagged for the exact build version only (e.g.
    cp310-cp310), which meant that users on other CPython versions
    silently built the package from source on installation. With this fix,
    all CPython 3.10+ users get fast binary installs. (PyPy wheels remain
    version-specific, as PyPy has no stable ABI.)

  • No functional changes to the parser or its API; see the
    3.7.0 release notes
    for the major changes in the 3.7 series.

3.7.0

Choose a tag to compare

@vthorsteinsson vthorsteinsson released this 14 Jul 01:11
357692a

Changes

  • Native (C++) token/terminal matching — parsing is up to 2.2x faster.
    The majority of token/terminal match decisions are now made natively in the
    C++ Earley core instead of via Python callbacks, roughly doubling parsing
    speed on fresh text (~89% of matching callbacks eliminated). Matching
    results are bit-exact with the previous Python matcher, verified by a
    query-level parity mode (GREYNIR_MATCHING_PARITY=1) and an extensive
    test corpus. Derived parsers that override token wrapping (such as
    GreynirCorrect) automatically continue to use Python matching.

  • Python >= 3.10 is now required. Python 3.9 is end-of-life; users on
    3.9 should stay on GreynirEngine 3.6.x. Binary wheels are now built as
    cp310 abi3 for CPython, plus PyPy 3.11 wheels.

  • Robust interprocess locking and atomic grammar writes. The binary
    grammar file is written atomically (temp file + rename), so an
    interrupted process can never leave a truncated grammar behind. The
    hand-rolled lock in glock.py has been replaced by the cross-platform
    filelock package; the lock file now lives next to the binary grammar
    instead of in /tmp, lock acquisition times out with a clear error
    instead of hanging, and no lock is taken at all when the binary grammar
    is already up to date.

  • Hardened parser core. The C++ core now validates the binary grammar
    file fully on load, catches out-of-memory conditions at the C ABI
    boundary instead of crashing, uses race-free diagnostic counters, and
    bounds the token matching cache (~125 MB) in long-running processes.

  • Greynir() now raises TypeError on unrecognized keyword options
    instead of silently ignoring them. Note that e.g. max_sent_tokens is a
    parameter of the parse methods, not of the constructor.

  • Modernized tooling. The project now uses uv with a committed
    lockfile and PEP 735 dependency groups; PEP 639 license metadata;
    mypy-clean type checking as a CI gate; and CI testing on Windows and
    macOS in addition to Linux (CPython 3.10-3.14 and PyPy 3.11).

3.6.2

Choose a tag to compare

@vthorsteinsson vthorsteinsson released this 23 Jun 15:48
241b96c

Changes

  • Fix undefined symbol: __gxx_personality_v0 on Linux CPython builds.
    The C++ extension is now linked correctly so importing the compiled parser
    no longer fails with a missing C++ runtime symbol on Linux CPython.

  • Require islenska>=1.3.2. This pulls in a BÍN-lookup fix where a word
    that is a whole BÍN entry but appears in a capitalized surface form
    (e.g. an address) was mis-resolved as a synthetic compound. As a result,
    NounPhrase declension is corrected — e.g. NounPhrase("Æðarvarp 17")
    now yields Æðarvarp 17 instead of Æðar-varp 17.

Version 3.6.1

Choose a tag to compare

@vthorsteinsson vthorsteinsson released this 12 Dec 17:28

What's New

  • abi3 wheel support: Single CPython wheel now works across Python 3.9-3.14+, significantly reducing release size and build time
  • Smaller releases: Reduced from ~15 CPython wheels to just 3 abi3 wheels (one per platform)

Compatibility

  • CPython 3.9 - 3.14+
  • PyPy 3.11
  • Linux (x86_64), macOS (x86_64, arm64), Windows (AMD64)

Version 3.6.0

Choose a tag to compare

@vthorsteinsson vthorsteinsson released this 12 Dec 14:38

What's Changed

Breaking Changes

  • Removed deprecated KLUDGY_ORDINALS_PASS_THROUGH, KLUDGY_ORDINALS_MODIFY, and KLUDGY_ORDINALS_TRANSLATE exports (these were removed from tokenizer 3.6.0)
  • The handle_kludgy_ordinals parameter to Greynir() is no longer supported

Dependencies

  • Now requires tokenizer>=3.6.0

CI/CD Improvements

  • Added automatic PyPI publishing via trusted publishing (OIDC)
  • Added source distribution (sdist) to releases
  • Updated wheel builds: CPython 3.9-3.13, PyPy 3.11
  • Platforms: Linux (manylinux x86_64), macOS (x86_64 + arm64), Windows (AMD64)

Other

  • Updated copyright year to 2025

Version 3.5.8

Choose a tag to compare

@sveinbjornt sveinbjornt released this 29 Aug 15:33
  • Various minor fixes
  • Project modernized and migrated to pyproject.toml
  • Explicit support for Python 3.14

Full Changelog: 3.5.7...3.5.8-4

Version 3.5.7

Choose a tag to compare

@sveinbjornt sveinbjornt released this 26 Aug 22:34
  • Now explicitly supports Python 3.13 and requires Python 3.9+
  • Improved documentation

Full Changelog: 3.5.6...3.5.7

Version 3.5.6

Choose a tag to compare

@sveinbjornt sveinbjornt released this 07 Aug 14:57
  • Minor bug fixes and tweaks

Full Changelog: 3.5.5...3.5.6

Version 3.5.5

Choose a tag to compare

@sveinbjornt sveinbjornt released this 25 Oct 16:26
  • Fixed critical parsing bug introduced in version 3.5.4
  • Now explicitly supporting Python 3.12

Full Changelog: 3.5.4...3.5.5