Skip to content

2.2.0

Latest

Choose a tag to compare

@vthorsteinsson vthorsteinsson released this 28 Nov 15:42
· 1 commit to main since this release

This release fixes case casting and makes contains() and the case lookups agree with lookup(). It goes with islenska-data 5.0.1, which adds compound suffixes and vocabulary. (#42)

Behavior changes

  • contains() and the in operator are now true only for word forms that lookup() finds an entry for without generating one. In plain Bin they used to be true for the additional Greynir vocabulary as well, which Bin never returns: "instagram" in Bin() is now False, and still True in GreynirBin. Suffix-only entries such as -isti are no longer contained in either class.
  • Casting a comparative returns a comparative. cast_to_accusative("fallegri") gave fallega, because fallegri is also the dative of the positive degree in the feminine. This affected 5,452 adjectives, among them all in -legri. Where a word has two forms (snotrari and snoturri), each is now cast to itself.
  • Casting a compound that is not in BÍN takes the noun reading when the last part is both a noun and an adjective form: cast_to_dative("véldýr") gave vél-dýrum and now gives véldýri. Words that are in BÍN are still cast as adjectives when they can be one (gul → gulri).
  • Hyphens in cast results. A cast no longer returns a hyphen that the word does not have: vélgerður → vélgerðum (was vél-gerðum), Vestur-vélhundur → Vestur-vélhundi (was Vestur-vél-hundi).

Fixes in plain Bin

  • lookup_nominative(), lookup_accusative(), lookup_dative(), lookup_genitive(), lookup_forms() and cast_to_*() now resolve compounds whose last part is a suffix-only entry (pönkisti, hlaðvarpari), as lookup() and lookup_variants() already did. cast_to_dative("pönkisti") returned the word unchanged and now gives pönkista.
  • The same methods now resolve a word that lookup() returns as a compound but that is also in the Greynir vocabulary. They returned nothing for such words.

Fix in GreynirBin

  • The case lookups no longer return a suffix-only entry for the suffix on its own: lookup_dative("isti") returns nothing, as lookup("isti") does.

Data: islenska-data 5.0.1

The data are in the separate package islenska-data. Version 5.0.1 is released together with this one, and pip install -U islenska-data brings it to an existing installation. islenska 2.2.0 also works with 5.0.0.

  • 208 new forms in the list of compound suffixes, so that more compounds are resolved: all forms of armur, verkun, dama, kelling, pulsa, stía, hula, löndun, hold, bingur, barð, garmur, svíning, kurlari, nikka and húnn, and forms that were missing of stöð, lengd, heild, skjár, klerkur, amma, vasi, glans and vinstri. Vélarmar and brottvísunarstöð are now known words.
  • -varpari and -passari are new suffix-only entries: hlaðvarpari, skjávarpari, hundapassari.
  • New Greynir vocabulary (visible through GreynirBin): innviður in the singular, the plural of framhjáhald, vélarmur, eldgosavá, hraunavá, hraunvá, fiskeldisseyra, holdasæði, hrossasæði, bíltjakkur, Thorsari, and the agent nouns röflari, giggari, heklari, púlari and peppari. The definite genitive of sifjaspell is corrected to sifjaspellsins.
  • Compounds ending in beri, gjafi or stýra (barnagjafi) no longer get each reading twice.

With islenska 2.1.0 or older, the 5.0.1 data make cast_to_*() return an adjective form for compounds that end in the new suffixes armur, stöð and lengd; upgrade islenska to 2.2.0 to avoid that.

Wheels

The same 30 wheels as 2.1.0: cp310-abi3 (CPython 3.10 and later with the GIL), cp314t and cp315t (free-threaded), and PyPy 3.11 (pp73 and pp80) and PyPy 3.12 (pp80), each for Linux x86_64 and aarch64, macOS x86_64 and arm64, and Windows AMD64.