Repository navigation
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 theinoperator are now true only for word forms thatlookup()finds an entry for without generating one. In plainBinthey used to be true for the additional Greynir vocabulary as well, whichBinnever returns:"instagram" in Bin()is nowFalse, and stillTrueinGreynirBin. 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()andcast_to_*()now resolve compounds whose last part is a suffix-only entry (pönkisti, hlaðvarpari), aslookup()andlookup_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, aslookup("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,nikkaandhúnn, and forms that were missing ofstöð,lengd,heild,skjár,klerkur,amma,vasi,glansandvinstri. Vélarmar and brottvísunarstöð are now known words. -varpariand-passariare new suffix-only entries: hlaðvarpari, skjávarpari, hundapassari.- New Greynir vocabulary (visible through
GreynirBin):innviðurin the singular, the plural offramhjáhald,vélarmur,eldgosavá,hraunavá,hraunvá,fiskeldisseyra,holdasæði,hrossasæði,bíltjakkur,Thorsari, and the agent nounsröflari,giggari,heklari,púlariandpeppari. The definite genitive ofsifjaspellis corrected to sifjaspellsins. - Compounds ending in
beri,gjafiorstý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.