islenska


Nameislenska JSON
Version 1.0.3 PyPI version JSON
download
home_pageNone
SummaryThe vocabulary of modern Icelandic, encapsulated in a Python package
upload_time2024-08-26 17:15:18
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT License
keywords nlp icelandic language vocabulary dictionary
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![GitHub](https://img.shields.io/github/license/mideind/BinPackage)
![Python 3.9+](https://img.shields.io/badge/python-3.9-blue.svg)
![Release](https://shields.io/github/v/release/mideind/BinPackage?display_name=tag)
![PyPI](https://img.shields.io/pypi/v/islenska)
[![Python package](https://github.com/mideind/BinPackage/actions/workflows/python-package.yml/badge.svg)](https://github.com/mideind/BinPackage/actions/workflows/python-package.yml)

# BinPackage

**The Database of Icelandic Morphology (DIM, BÍN) encapsulated in a Python package**

<img src="img/greynir-logo-large.png" alt="Greynir" width="200" height="200" align="right" style="margin-left:20px; margin-bottom: 20px;">

*BinPackage* is a Python (>= 3.9) package, published by
[*Miðeind ehf*](https://mideind.is), that embeds the vocabulary of the
[*Database of Icelandic Morphology*](https://bin.arnastofnun.is/DMII/)
([*Beygingarlýsing íslensks nútímamáls*](https://bin.arnastofnun.is/), *BÍN*)
and offers various lookups and queries of the data.

The database, maintained by
[*The Árni Magnússon Institute for Icelandic Studies*](https://arnastofnun.is)
and edited by chief editor *Kristín Bjarnadóttir*, contains over
6.5 million entries, over 3.1 million unique word forms,
and about 300,000 distinct lemmas.

Miðeind has encapsulated the database in an easy-to-install Python package,
compressing it
from a 400+ megabyte CSV file into an ~82 megabyte indexed binary structure.
The package maps this structure directly into memory (via `mmap`) for fast lookup.
An algorithm for handling compound words is an important additional feature
of the package.

With BinPackage, `pip install islenska` is all you need to have almost all
of the commonly used vocabulary of the modern Icelandic language at your
disposal via Python. Batteries are included; no additional databases,
downloads or middleware are required.

BinPackage allows querying for word forms, as well as lemmas and grammatical variants.
This includes information about word classes/categories (noun, verb, ...),
domains (person names, place names, ...), inflectional tags and
various annotations, such as degrees of linguistic acceptability and alternate
spelling forms.

## The basics of BÍN

The DMI/BÍN database is
[published in electronic form](https://bin.arnastofnun.is/gogn/mimisbrunnur/)
by [*The Árni Magnússon Institute for Icelandic Studies*](https://arnastofnun.is).
The database is
released under the CC BY-SA 4.0 license, in CSV files having two main formats:
*Sigrúnarsnið* (the *Basic Format*) and *Kristínarsnið* (the *Augmented Format*).
Sigrúnarsnið is more compact with six attributes
for each word form. Kristínarsnið is newer and more detailed,
with up to 15 attributes for each word form.

BinPackage supports both formats, with the augmented format (represented
by the class `Ksnid`) being returned from several functions
and the basic format (represented by the named tuple `BinEntry`)
from others, as documented below.

Further information in English about the word classes and the inflectional
categories in the DMI/BÍN database can be found
[here](https://bin.arnastofnun.is/DMII/infl-system/).

### The Basic Format

The BÍN *Basic Format* is represented in BinPackage with a Python `NamedTuple`
called `BinEntry`, having the following attributes (further documented
[here in Icelandic](https://bin.arnastofnun.is/gogn/SH-snid) and
[here in English](https://bin.arnastofnun.is/DMII/LTdata/s-format/)):

| Name     | Type  | Content  |
|----------|-------|----------|
| `ord` | `str` | Lemma (headword, *uppflettiorð*). |
| `bin_id` | `int` | Identifier of the lemma, unique for a particular lemma/class combination. |
| `ofl` | `str` | Word class/category, i.e. `kk`/`kvk`/`hk` for (masculine/feminine/neutral) nouns, `lo` for adjectives, `so` for verbs, `ao` for adverbs, etc.|
| `hluti` | `str` | Semantic classification, i.e. `alm` for general vocabulary, `ism` for Icelandic person names, `örn` for place names (*örnefni*), etc.|
| `bmynd` | `str` | Inflectional form (*beygingarmynd*). |
| `mark` | `str` | Inflectional tag of this inflectional form, for instance `ÞGFETgr` for dative (*þágufall*, `ÞGF`), singular (*eintala*, `ET`), definite (*með greini*, `gr`). |

The inflectional tag in the `mark` attribute is documented in detail
[here in Icelandic](https://bin.arnastofnun.is/gogn/greiningarstrengir/) and
[here in English](https://bin.arnastofnun.is/DMII/LTdata/tagset/).

### The Augmented Format

The BÍN *Augmented Format*, *Kristínarsnið*, is represented by instances of
the `Ksnid` class. It has the same six attributes as `BinEntry` (the Basic
Format) but adds nine attributes, shortly summarized below.
For details, please refer to the full documentation
[in Icelandic](https://bin.arnastofnun.is/gogn/k-snid)
or [in English](https://bin.arnastofnun.is/DMII/LTdata/k-format/).

| Name     | Type  | Content  |
|----------|-------|----------|
| `einkunn` | `int` | Headword correctness grade, ranging from 0-5. |
| `malsnid` | `str` | Genre/register indicator; e.g. `STAD` for dialectal, `GAM` for old-fashioned or `URE` for obsolete. |
| `malfraedi` | `str` | Grammatical marking for further consideration, such as `STAFS` (spelling) or `TALA` (singular/plural). |
| `millivisun` | `int` | Cross reference to the identifier (`bin_id` field) of a variant of this headword. |
| `birting` | `str` | `K` for the DMII Core (*BÍN kjarni*) of most common and accepted word forms, `V` for other published BÍN entries. |
| `beinkunn` | `int` | Correctness grade for this inflectional form, ranging from 0-5. |
| `bmalsnid` | `str` | Genre/register indicator for this inflectional form. |
| `bgildi` | `str` | Indicator for inflectional forms bound to idioms and other special cases. |
| `aukafletta` | `str` | Alternative headword, e.g. plural form. |

## Word compounding algorithm

Icelandic allows almost unlimited creation of compound words. Examples are
*síamskattarkjóll* (noun), *sólarolíulegur* (adjective), *öskurgrenja* (verb).
It is of course impossible for a static database to include all possible
compound words. To address this problem, BinPackage features a compound word
recognition algorithm, which is invoked when looking up any word that is not
found as-is in BÍN.

The algorithm relies on a list of valid word prefixes, stored in
`src/islenska/resources/prefixes.txt`, and suffixes, stored in
`src/islenska/resources/suffixes.txt`. These lists have been compressed
into data structures called *Directed Acyclic Word Graphs* (DAWGs). BinPackage
uses these DAWGs to find optimal solutions for the compound word
problem, where an optimal solution is defined as the prefix+suffix
combination that has (1) the fewest prefixes and (2) the longest suffix.

If an optimal compound form exists for a word, its suffix is looked up in BÍN
and used as an inflection template for the compound. *Síamskattarkjóll*
is thus resolved into the prefix *síamskattar* and the suffix *kjóll*,
with the latter providing the inflection of *síamskattarkjóll* as
a singular masculine noun in the nominative case.

The compounding algorithm returns the prefixes and suffixes of the
optimal compound in the `ord` and `bmynd` fields of the returned
`BinEntry` / `Ksnid` instances, separated by hyphens `-`. As an example,
*síamskattarkjóll* is returned as follows (note the hyphens):

```python
>>> b.lookup("síamskattarkjóll")
('síamskattarkjóll', [
    (ord='síamskattar-kjóll', kk/alm/0, bmynd='síamskattar-kjóll', NFET)
])
```

Lookups that are resolved via the compounding algorithm have a `bin_id` of zero.
Note that the compounding algorithm will occasionally recognize nonexistent
words, for instance spelling errors, as compounds.

If desired, the compounding algorithm can be disabled
via an optional flag; see the documentation below.

# Examples

## Querying for word forms

*Uppfletting beygingarmynda*

```python
>>> from islenska import Bin
>>> b = Bin()
>>> b.lookup("færi")
('færi', [
    (ord='fara', so/alm/433568, bmynd='færi', OP-ÞGF-GM-VH-ÞT-1P-ET),
    (ord='fara', so/alm/433568, bmynd='færi', OP-ÞGF-GM-VH-ÞT-1P-FT),
    (ord='fara', so/alm/433568, bmynd='færi', OP-ÞGF-GM-VH-ÞT-2P-ET),
    (ord='fara', so/alm/433568, bmynd='færi', OP-ÞGF-GM-VH-ÞT-2P-FT),
    (ord='fara', so/alm/433568, bmynd='færi', OP-ÞGF-GM-VH-ÞT-3P-ET),
    (ord='fara', so/alm/433568, bmynd='færi', OP-það-GM-VH-ÞT-3P-ET),
    (ord='fara', so/alm/433568, bmynd='færi', OP-ÞGF-GM-VH-ÞT-3P-FT),
    (ord='fara', so/alm/433568, bmynd='færi', GM-VH-ÞT-1P-ET),
    (ord='fara', so/alm/433568, bmynd='færi', GM-VH-ÞT-3P-ET),
    (ord='fær', lo/alm/448392, bmynd='færi', FVB-KK-NFET),
    (ord='færa', so/alm/434742, bmynd='færi', GM-FH-NT-1P-ET),
    (ord='færa', so/alm/434742, bmynd='færi', GM-VH-NT-1P-ET),
    (ord='færa', so/alm/434742, bmynd='færi', GM-VH-NT-3P-ET),
    (ord='færa', so/alm/434742, bmynd='færi', GM-VH-NT-3P-FT),
    (ord='færi', hk/alm/1198, bmynd='færi', NFET),
    (ord='færi', hk/alm/1198, bmynd='færi', ÞFET),
    (ord='færi', hk/alm/1198, bmynd='færi', ÞGFET),
    (ord='færi', hk/alm/1198, bmynd='færi', NFFT),
    (ord='færi', hk/alm/1198, bmynd='færi', ÞFFT)
])
```

`Bin.lookup()` returns the matched search key, usually identical to the
passed-in word (here *færi*), and a list of matching entries
in the basic format (*Sigrúnarsnið*), i.e. as instances of `BinEntry`.

Each entry is a named tuple containing the
lemma (`ord`), the word class, domain and id number (`hk/alm/1198`),
the inflectional form (`bmynd`) and tag (`GM-VH-NT-3P-FT`).
The tag strings are documented in detail
[here in Icelandic](https://bin.arnastofnun.is/gogn/greiningarstrengir/) and
[here in English](https://bin.arnastofnun.is/DMII/LTdata/tagset/).

## Detailed word query

*Uppfletting ítarlegra upplýsinga*

```python
>>> from islenska import Bin
>>> b = Bin()
>>> w, m = b.lookup_ksnid("allskonar")
>>> # m is a list of 24 matching entries; we look at the first item only
>>> m[0].malfraedi
'STAFS'
>>> m[0].einkunn
4
```

`Bin.lookup_ksnid()` returns the matched search key and a list of all matching
entries in the augmented format (*Kristínarsnið*). The fields of *Kristínarsnið*
are documented in detail [here in Icelandic](https://bin.arnastofnun.is/gogn/k-snid)
and [here in English](https://bin.arnastofnun.is/DMII/LTdata/k-format/).

As the example shows, the word `allskonar` is marked with the
tag `STAFS` in the `malfraedi` field, and has an `einkunn` (correctness grade)
of 4 (where 1 is the normal grade), giving a clue that this spelling is
nonstandard. (A more correct form is `alls konar`, in two words.)

## Lemmas and classes

*Lemmur, uppflettiorð; orðflokkar*

BinPackage can find all possible lemmas (headwords) of a word,
and the classes/categories to which it may belong.

```python
>>> from islenska import Bin
>>> b = Bin()
>>> b.lookup_lemmas_and_cats("laga")
{('lag', 'hk'), ('lög', 'hk'), ('laga', 'so'), ('lagi', 'kk'), ('lögur', 'kk')}
```

Here we see, perhaps unexpectedly, that the word form *laga* has five possible lemmas:
four nouns (*lag*, *lög*, *lagi* and *lögur*, neutral (`hk`) and masculine (`kk`)
respectively), and one verb (`so`), having the infinitive (*nafnháttur*) *að laga*.

## Lookup by BÍN identifier

Given a BÍN identifier (id number), BinPackage can return all entries for that id:

```python
>>> from islenska import Bin
>>> b = Bin()
>>> b.lookup_id(495410)
[<Ksnid: bmynd='sko', ord/ofl/hluti/bin_id='sko'/uh/alm/495410, mark=OBEYGJANLEGT, ksnid='1;;;;K;1;;;'>]
```

## Grammatical variants

With BinPackage, it is easy to obtain grammatical variants
(alternative inflectional forms) of words: convert them between cases,
singular and plural, persons, degrees, moods, etc. Let's look
at an example:

```python
>>> from islenska import Bin
>>> b = Bin()
>>> m = b.lookup_variants("Laugavegur", "kk", "ÞGF")
>>> # m is a list of all possible variants of 'Laugavegur' in dative case.
>>> # In this particular example, m has only one entry.
>>> m[0].bmynd
'Laugavegi'
```

This is all it takes to convert the (masculine, `kk`) street name *Laugavegur*
to dative case, commonly used in addresses.

```python
>>> from islenska import Bin
>>> b = Bin()
>>> m = b.lookup_variants("fallegur", "lo", ("EVB", "HK", "NF", "FT"))
>>> # m contains a list of all inflectional forms that meet the given
>>> # criteria. In this example, we use the first form in the list.
>>> adj = m[0].bmynd
>>> f"Ég sá {adj} norðurljósin"
'Ég sá fallegustu norðurljósin'
```

Here, we obtained the superlative degree, weak form (`EVB`, *efsta stig*,
*veik beyging*), neutral gender (`HK`), nominative case (`NF`), plural (`FT`),
of the adjective (`lo`) *fallegur* and used it in a sentence.

# Documentation

## `Bin()` constructor

To create an instance of the `Bin` class, do as follows:

```python
>>> from islenska import Bin
>>> b = Bin()
```

You can optionally specify the following boolean flags in the `Bin()`
constructor call:

| Flag              | Default | Description                                    |
|-------------------|---------|------------------------------------------------|
| `add_negation`    | `True`    | For adjectives, find forms with the prefix `ó` even if only the non-prefixed version is present in BÍN. Example: find `ófíkinn` because `fíkinn` is in BÍN. |
| `add_legur`       | `True`    | For adjectives, find all forms with an "adjective-like" suffix, i.e. `-legur`, `-leg`, etc. even if they are not present in BÍN. Example: `sólarolíulegt`. |
| `add_compounds`   | `True`    | Find compound words that can be derived from BinPackage's collection of allowed prefixes and suffixes. The algorithm finds the compound word with the fewest components and the longest suffix. Example: `síamskattar-kjóll`. |
| `replace_z`       | `True`    | Find words containing `tzt` and `z` by replacing these strings by `st` and `s`, respectively. Example: `veitzt` -> `veist`. |
| `only_bin`        | `False`   | Find only word forms that are originally present in BÍN, disabling all of the above described flags. |

As an example, to create a `Bin` instance that only returns word forms that occur
in the original BÍN database, do like so:

```python
>>> from islenska import Bin
>>> b = Bin(only_bin=True)
```

## `lookup()` function

To look up word forms and return summarized data in the Basic Format
(`BinEntry` tuples), call the `lookup` function:

```python
>>> w, m = b.lookup("mæla")
>>> w
'mæla'
>>> m
[
    (ord='mæla', kvk/alm/16302, bmynd='mæla', NFET),
    (ord='mæla', kvk/alm/16302, bmynd='mæla', EFFT2),
    (ord='mæla', so/alm/469211, bmynd='mæla', GM-NH),
    (ord='mæla', so/alm/469211, bmynd='mæla', GM-FH-NT-3P-FT),
    (ord='mæla', so/alm/469210, bmynd='mæla', GM-NH),
    (ord='mæla', so/alm/469210, bmynd='mæla', GM-FH-NT-3P-FT),
    (ord='mæli', hk/alm/2512, bmynd='mæla', EFFT),
    (ord='mælir', kk/alm/4474, bmynd='mæla', ÞFFT),
    (ord='mælir', kk/alm/4474, bmynd='mæla', EFFT)
]
```

This function returns a `Tuple[str, List[BinEntry]]` containing the string that
was actually used as a search key, and a list of `BinEntry` instances that
match the search key. The list is empty if no matches were found, in which
case the word is probably not Icelandic or at least not spelled correctly.

In this example, however, the list has nine matching entries.
We see that the word form *mæla* is an inflectional form of five different
headwords (lemmas), including two verbs (`so`):
(1) *mæla* meaning *to measure* (past tense *mældi*), and (2) *mæla* meaning *to speak*
(past tense *mælti*). Other headwords are nouns, in all three genders:
feminine (`kvk`), neutral (`hk`) and masculine (`kk`).

Let's try a different twist:

```python
>>> w, m = b.lookup("síamskattarkjólanna")
>>> w
'síamskattarkjólanna'
>>> m
[
    (ord='síamskattar-kjóll', kk/alm/0, bmynd='síamskattar-kjólanna', EFFTgr)
]
```

Here we see that *síamskattarkjólanna* is a compound word, amalgamated
from *síamskattar* and *kjólanna*, with *kjóll* being the base lemma of the compound
word. This is a masculine noun (`kk`), in the `alm` (general vocabulary) domain.
Note that it has an id number (*bin_id*) equal to 0 since it is constructed
on-the-fly by BinPackage, rather than being found in BÍN. The grammatical
tag string is `EFFTgr`, i.e. genitive (*eignarfall*, `EF`), plural (*fleirtala*,
`FT`) and definite (*með greini*, `gr`).

You can specify the `at_sentence_start` option as being `True`, in which case
BinPackage will also look for lower case words in BÍN even if the lookup word
is upper case. As an example:

```python
>>> _, m = b.lookup("Geysir", at_sentence_start=True)
>>> m
[
    (ord='geysa', so/alm/483756, bmynd='geysir', GM-FH-NT-2P-ET),
    (ord='geysa', so/alm/483756, bmynd='geysir', GM-FH-NT-3P-ET),
    (ord='geysa', so/alm/483756, bmynd='geysir', GM-VH-NT-2P-ET),
    (ord='Geysir', kk/bær/263617, bmynd='Geysir', NFET)
]
>>> _, m = b.lookup("Geysir", at_sentence_start=False)  # This is the default
>>> m
[
    (ord='Geysir', kk/bær/263617, bmynd='Geysir', NFET)
]
```

As you can see, the lowercase matches for *geysir* are returned as well
as the single uppercase one, if `at_sentence_start` is set to `True`.

Another example:

```python
>>> b.lookup("Heftaranum", at_sentence_start=True)
('heftaranum', [
    (ord='heftari', kk/alm/7958, bmynd='heftaranum', ÞGFETgr)
])
```

Note that here, the returned search key is `heftaranum` in lower case,
since `Heftaranum` in upper case was not found in BÍN.

Another option is `auto_uppercase`, which if set to `True`, causes the returned
search key to be in upper case if any upper case entry exists in BÍN for the
lookup word. This can be helpful when attempting to normalize
all-lowercase input, for example from voice recognition systems. (Additional
disambiguation is typically still needed, since many common words and names do
exist both in lower case and in upper case, and BinPackage cannot infer which
form is desired in the output.)

A final example of when the returned search key is different from the lookup word:

```python
>>>> b.lookup("þýzk")
('þýsk', [
    (ord='þýskur', lo/alm/408914, bmynd='þýsk', FSB-KVK-NFET),
    (ord='þýskur', lo/alm/408914, bmynd='þýsk', FSB-HK-NFFT),
    (ord='þýskur', lo/alm/408914, bmynd='þýsk', FSB-HK-ÞFFT)
])
```

Here, the input contains `z` or `tzt` which is translated to `s` or `st`
respectively to find a lookup match in BÍN. In this case, the actual matching
word `þýsk` is returned as the search key instead of `þýzk`. (This behavior
can be disabled with the `replace_z` flag on the `Bin()` constructor,
as described above.)

`lookup()` has the following parameters:

| Name | Type | Default | Description |
|------|------|---------|-------------|
| w | `str` | | The word to look up |
| at_sentence_start | `bool` | `False` | `True` if BinPackage should also return lower case forms of the word, if it is given in upper case. |
| auto_uppercase | `bool` | `False` | `True` if BinPackage should use and return upper case search keys, if the word exists in upper case. |

The function returns a `Tuple[str, List[BinEntry]]` instance.
The first element of the tuple is the search key that was matched in BÍN,
and the second element is the list of matches, each represented
by a `BinEntry` instance.

## `lookup_ksnid()` function

To look up word forms and return full augmented format (*Kristínarsnið*)
entries, call the `lookup_ksnid()` function:

```python
>>> w, m = b.lookup_ksnid("allskonar")
>>> w
'allskonar'
>>> # m is a list of all matches of the word form; here we show the first item
>>> str(m[0])
"<Ksnid: bmynd='allskonar', ord/ofl/hluti/bin_id='allskonar'/lo/alm/175686, mark=FSB-KK-NFET, ksnid='4;;STAFS;496369;V;1;;;'>"
>>> m[0].malfraedi
'STAFS'
>>> m[0].einkunn
4
>>> m[0].millivisun
496369
```

This function is identical to `lookup()` except that it returns full
augmented format entries of class `Ksnid`, with 15 attributes each, instead of
basic format (`BinEntry`) tuples. The same option flags are available
and the logic for returning the search key is the same.

The example shows how the word *allskonar* has a grammatical comment
regarding spelling (`m[0].malfraedi == 'STAFS'`) and a correctness grade
(`m[0].einkunn`) of 4, as well as a cross-reference
to the entry with id number (`bin_id`) 496369 - which is the lemma
*alls konar*.

`lookup_ksnid()` has the following parameters:

| Name | Type | Default | Description |
|------|------|---------|-------------|
| w | `str` | | The word to look up |
| at_sentence_start | `bool` | `False` | `True` if BinPackage should also return lower case forms of the word, if it is given in upper case. |
| auto_uppercase | `bool` | `False` | `True` if BinPackage should use and return upper case search keys, if the word exists in upper case. |

The function returns a tuple of type `Tuple[str, List[Ksnid]]`.
The first element of the tuple is the search key that was matched in BÍN,
and the second element is the list of matching entries, each represented
by an instance of class `Ksnid`.

## `lookup_id()` function

If you have a BÍN identifier (integer id) and need to look up the associated
augmented format (*Kristínarsnið*) entries, call the `lookup_id()` function:

```python
>>> b.lookup_id(495410)
[<Ksnid: bmynd='sko', ord/ofl/hluti/bin_id='sko'/uh/alm/495410, mark=OBEYGJANLEGT, ksnid='1;;;;K;1;;;'>]

```

`lookup_id()` has a single mandatory parameter:

| Name | Type | Default | Description |
|------|------|---------|-------------|
| bin_id | `int` | | The BÍN identifier of the entries to look up. |

The function returns a list of type `List[Ksnid]`. If the given id number is not found
in BÍN, an empty list is returned.

## `lookup_cats()` function

To look up the possible classes/categories of a word (*orðflokkar*),
call the `lookup_cats` function:

```python
>>> b.lookup_cats("laga")
{'so', 'hk', 'kk'}
```

The function returns a `Set[str]` with all possible word classes/categories
of the word form. If the word is not found in BÍN, or recognized using the
compounding algorithm, the function returns an empty set.

`lookup_cats()` has the following parameters:

| Name | Type | Default | Description |
|------|------|---------|-------------|
| w | `str` | | The word to look up |
| at_sentence_start | `bool` | `False` | `True` if BinPackage should also include lower case forms of the word, if it is given in upper case. |

## `lookup_lemmas_and_cats()` function

To look up the possible lemmas/headwords and classes/categories of a word
(*lemmur og orðflokkar*), call the `lookup_lemmas_and_cats` function:

```python
>>> b.lookup_lemmas_and_cats("laga")
{('lagi', 'kk'), ('lögur', 'kk'), ('laga', 'so'), ('lag', 'hk'), ('lög', 'hk')}
```

The function returns a `Set[Tuple[str, str]]` where each tuple contains
a lemma/headword and a class/category, respectively.
If the word is not found in BÍN, or recognized using the
compounding algorithm, the function returns an empty set.

`lookup_lemmas_and_cats()` has the following parameters:

| Name | Type | Default | Description |
|------|------|---------|-------------|
| w | `str` | | The word to look up |
| at_sentence_start | `bool` | `False` | `True` if BinPackage should also include lower case forms of the word, if it is given in upper case. |

## `lookup_variants()` function

This function returns grammatical variants (particular inflectional forms)
of a given word. For instance,
it can return a noun in a different case, plural instead of singular,
and/or with or without an attached definite article (*greinir*). It can return
adjectives in different degrees (*frumstig*, *miðstig*, *efsta stig*), verbs
in different persons or moods, etc.

Here is a simple example, converting the masculine noun *heftaranum* from dative
to nominative case (`NF`):

```python
>>> m = b.lookup_variants("heftaranum", "kk", "NF")
>>> m[0].bmynd
'heftarinn'
```

Here we add a conversion to plural (`FT`) as well - note that we can pass multiple
inflectional tags in a tuple:

```python
>>> m = b.lookup_variants("heftaranum", "kk", ("NF", "FT"))
>>> m[0].bmynd
'heftararnir'
```

Finally, we specify a conversion to indefinite form (`nogr`):

```python
>>> m = b.lookup_variants("heftaranum", "kk", ("NF", "FT", "nogr"))
>>> m[0].bmynd
'heftarar'
```

Definite form is requested via `gr`, and indefinite form via `nogr`.

To see how `lookup_variants()` handles ambiguous word forms, let's
try our old friend *mæli* again:

```python
>>> b.lookup_variants("mæli", "no", "NF")
[
    <Ksnid: bmynd='mæli', ord/ofl/hluti/bin_id='mæli'/hk/alm/2512, mark=NFET, ksnid='1;;;;K;1;;;'>,
    <Ksnid: bmynd='mæli', ord/ofl/hluti/bin_id='mæli'/hk/alm/2512, mark=NFFT, ksnid='1;;;;K;1;;;'>,
    <Ksnid: bmynd='mælir', ord/ofl/hluti/bin_id='mælir'/kk/alm/4474, mark=NFET, ksnid='1;;;;K;1;;;'>
]
```

We specified `no` (noun) as the word class constraint. The result thus contains
nominative case forms of two nouns, one neutral (*mæli*, definite form *mælið*,
with identical singular `NFET` and plural `NFFT` form), and one
masculine (*mælir*, definite form *mælirinn*). If we had specified `hk` as the
word class constraint, we would have gotten back the first two (neutral) entries only;
for `kk` we would have gotten back the third entry (masculine) only.

Let's try modifying a verb from subjunctive (*viðtengingarháttur*)
(e.g., *Ég/hún hraðlæsi bókina ef ég hefði tíma til þess*) to
indicative mood (*framsöguháttur*), present tense
(e.g. *Ég/hún hraðles bókina í flugferðinni*):

```python
>>> m = b.lookup_variants("hraðlæsi", "so", ("FH", "NT"))
>>> for mm in m: print(f"{mm.ord} | {mm.bmynd} | {mm.mark}")
hraðlesa | hraðles | GM-FH-NT-1P-ET
hraðlesa | hraðles | GM-FH-NT-3P-ET
```

We get back both the 1st and the 3rd person inflection forms,
since they can both be derived from *hraðlæsi* and we don't constrain
the person in our variant specification. If only third person
results are desired, we could have specified `("FH", "NT", "3P")` in the
variant tuple.

Finally, let's describe this functionality in superlative terms:

```python
>>> adj = b.lookup_variants("frábær", "lo", ("EVB", "KVK"))[0].bmynd
>>> f"Þetta er {adj} virknin af öllum"
'Þetta er frábærasta virknin af öllum'
```

Note how we ask for a superlative weak form (`EVB`) for a feminine subject (`KVK`),
getting back the adjective *frábærasta*. We could also ask for the
strong form (`ESB`), and then for the comparative (*miðstig*, `MST`):

```python
>>> adj = b.lookup_variants("frábær", "lo", ("ESB", "KVK"))[0].bmynd
>>> f"Þessi virkni er {adj} af öllum"
'Þessi virkni er frábærust af öllum'
>>> adj = b.lookup_variants("frábær", "lo", ("MST", "KVK"))[0].bmynd
>>> f"Þessi virkni er {adj} en allt annað"
'Þessi virkni er frábærari en allt annað'
```

Finally, for some cool Python code for converting any adjective to
the superlative degree (*efsta stig*):

```python
from islenska import Bin
b = Bin()
def efsta_stig(lo: str, kyn: str, veik_beyging: bool=True) -> str:
    """ Skilar efsta stigi lýsingarorðs, í umbeðnu kyni og beygingu """
    vlist = b.lookup_variants(lo, "lo", (kyn, "EVB" if veik_beyging else "ESB"))
    return vlist[0].bmynd if vlist else ""
print(f"Þetta er {efsta_stig('nýr', 'kvk')} framförin í íslenskri máltækni!")
print(f"Þetta er {efsta_stig('sniðugur', 'hk')} verkfærið!")
```

This will output:

```
Þetta er nýjasta framförin í íslenskri máltækni!
Þetta er sniðugasta verkfærið!
```

`lookup_variants()` has the following parameters:

| Name | Type | Default | Description |
|------|------|---------|-------------|
| w | `str` | | The word to use as a base for the lookup |
| cat | `str` | | The word class, used to disambiguate the word. `no` (*nafnorð*) can be used to match any of `kk`, `kvk` and `hk`. |
| to_inflection | `Union[str, Tuple[str, ...]]` | | One or more requested grammatical features, specified using fragments of the BÍN tag string. As a special case, `nogr` means indefinite form (no `gr`) for nouns. The parameter can be a single string or a tuple of several strings. |
| lemma | `Optional[str]` | `None` | The lemma of the word, optionally used to further disambiguate it |
| bin_id | `Optional[int]` | `None` | The id number of the word, optionally used to further disambiguate it |
| inflection_filter | `Optional[Callable[[str], bool]]` | `None` | A callable taking a single string parameter and returning a `bool`. The `mark` attribute of a potential match will be passed to this function, and only included in the result if the function returns `True`. |

The function returns `List[Ksnid]`, i.e. a list of `Ksnid` instances that
match the grammatical features requested in `to_inflection`. If no such
instances exist, an empty list is returned.

## `lookup_lemmas()` function

To look up all entries having the given string as a lemma/headword,
call the `lookup_lemmas` function:

```python
>>> b.lookup_lemmas("þyrla")
('þyrla', [
    (ord='þyrla', kvk/alm/16445, bmynd='þyrla', NFET),  # Feminine noun
    (ord='þyrla', so/alm/425096, bmynd='þyrla', GM-NH)  # Verb
])
>>> b.lookup_lemmas("þyrlast")
('þyrlast', [
    (ord='þyrla', so/alm/425096, bmynd='þyrlast', MM-NH)  # Middle voice infinitive
])
>>> b.lookup_lemmas("þyrlan")
('þyrlan', [])
```

The function returns a `Tuple[str, List[BinEntry]]` like `lookup()`,
but where the `BinEntry` list
has been filtered to include only lemmas/headwords. This is the reason why
`b.lookup_lemmas("þyrlan")` returns an empty list in the example above -
*þyrlan* does not appear in BÍN as a lemma/headword.

Lemmas/headwords of verbs include the middle voice (*miðmynd*) of the
infinitive, `MM-NH`, as in the example for *þyrlast*.

`lookup_lemmas()` has a single parameter:

| Name | Type | Default | Description |
|------|------|---------|-------------|
| lemma | `str` | | The word to look up as a lemma/headword. |

# Implementation

BinPackage is written in [Python 3](https://www.python.org/)
and requires Python 3.9 or later. It runs on CPython and [PyPy](http://pypy.org/).

The Python code calls a small C++ library to speed up lookup of word forms in the
compressed binary structure into which BÍN has been encoded.
This means that if a pre-compiled Python wheel is not
available on PyPI for your platform, you may need a set of development tools installed
on your machine, before you install BinPackage using `pip`:

```bash
# The following works on Debian/Ubuntu GNU/Linux
sudo apt-get install python3-dev libffi-dev
```

BinPackage is fully type-annotated for use with Python static type checkers such
as `mypy` and `Pylance` / `Pyright`.

# Installation and setup

You must have Python >= 3.9 installed on your machine (CPython or PyPy).
If you are using a Python virtual environment (`virtualenv`), activate it
first (substituting your environment name for `venv` below):

```bash
venv/bin/activate
```

...or, on Windows:

```cmd
C:\> venv\scripts\activate
```

Then, install BinPackage from the Python Package Index (PyPI),
where the package is called `islenska`:

```bash
pip install islenska
```

Now, you are ready to `import islenska` or `from islenska import Bin`
in your Python code.

----

If you want to install the package in editable source code mode,
do as follows:

```bash
# Clone the GitHub repository
git clone https://github.com/mideind/BinPackage
cd BinPackage
# Install the package in editable mode
pip install -e .  # Note the dot!
cd src/islenska/resources
# Fetch the newest BÍN data (KRISTINsnid.csv.zip)
# (We remind you that the BÍN data is under the CC BY-SA 4.0 license; see below.)
wget -O KRISTINsnid.csv.zip https://bin.arnastofnun.is/django/api/nidurhal/?file=KRISTINsnid.csv.zip
# Unzip the data
unzip -q KRISTINsnid.csv.zip
rm KRISTINsnid.csv.*
cd ../../..
# Run the compressor to generate src/islenska/resources/compressed.bin
python tools/binpack.py
# Run the DAWG builder for the prefix and suffix files
python tools/dawgbuilder.py
# Now you're ready to go
```

This will clone the GitHub repository into the BinPackage directory
and install the package into your Python environment from the source files.
Then, the newest BÍN data is fetched via `wget`
from *Stofnun Árna Magnússonar* and compressed into a binary file.
Finally, the Directed Acyclic Word Graph builder is run to
create DAWGs for word prefixes and suffixes, used by the compound word
algorithm.

## File details

The following files are located in the `src/islenska` directory within
BinPackage:

* `bindb.py`: The main `Bin` class; high-level interfaces into BinPackage.
* `bincompress.py`: The lower-level `BinCompressed` class, interacting directly with
  the compressed data in a binary buffer in memory.
* `basics.py`: Basic data structures, such as the `BinEntry` NamedTuple.
* `dawgdictionary.py`: Classes that handle compound words.
* `bin.h`, `bin.cpp`: C++ code for fast lookup of word forms, called from Python via CFFI.
* `tools/binpack.py`: A command-line tool that reads vocabulary data in .CSV
  form and outputs a compressed binary file, `compressed.bin`.
* `tools/dawgbuilder.py`: A command-line tool that reads information about word prefixes and suffixes
  and creates corresponding directed acyclic word graph (DAWG) structures for
  the word compounding logic.
* `resources/prefixes.txt`, `resources/suffixes.txt`: Text files containing
  valid Icelandic word prefixes and suffixes, respectively.

# Copyright and licensing

BinPackage embeds the vocabulary of the
**[Database of Icelandic Morphology](https://bin.arnastofnun.is/DMII/)**
(**[Beygingarlýsing íslensks nútímamáls](https://bin.arnastofnun.is/)**),
abbreviated *BÍN*.

The copyright holder for BÍN is *The Árni Magnússon Institute*
*for Icelandic Studies*. The BÍN data used herein are publicly available
for use under the terms of the
[CC BY-SA 4.0 license](https://creativecommons.org/licenses/by-sa/4.0/legalcode),
as further detailed
[here in English](https://bin.arnastofnun.is/DMII/LTdata/conditions/) and
[here in Icelandic](https://bin.arnastofnun.is/gogn/mimisbrunnur/).

In accordance with the BÍN license terms, credit is hereby given as follows:

*Beygingarlýsing íslensks nútímamáls. Stofnun Árna Magnússonar í íslenskum fræðum.*
*Höfundur og ritstjóri Kristín Bjarnadóttir.*

----

**Miðeind ehf., the publisher of BinPackage, claims no endorsement, sponsorship,**
**or official status granted to it by the BÍN copyright holder.**

BinPackage includes certain program logic, created by Miðeind ehf.,
that optionally exposes additions and modifications to the original
BÍN source data. Such logic is enabled or disabled by user-settable flags,
as described in the documentation above.

----

BinPackage is Copyright © 2024 [Miðeind ehf.](https://mideind.is)
The original author of this software is *Vilhjálmur Þorsteinsson*.

<img src="img/MideindLogoVert400.png" alt="Miðeind ehf."
   width="118" height="100" align="left"
   style="margin-right:20px; margin-top: 10px; margin-bottom: 10px;">

This software is licensed under the **MIT License**:

*Permission is hereby granted, free of charge, to any person obtaining a*
*copy of this software and associated documentation files (the "Software"),*
*to deal in the Software without restriction, including without limitation*
*the rights to use, copy, modify, merge, publish, distribute, sublicense,*
*and/or sell copies of the Software, and to permit persons to whom the*
*Software is furnished to do so, subject to the following conditions:*

*The above copyright notice and this permission notice shall be included*
*in all copies or substantial portions of the Software.*

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

If you would like to use this software in ways that are incompatible with the
standard MIT license, [contact Miðeind ehf.](mailto:mideind@mideind.is) to negotiate custom arrangements.

# Acknowledgements

Parts of this software were developed under the auspices of the
Icelandic Government's 5-year Language Technology Programme for Icelandic,
managed by [Almannarómur](https://almannaromur.is). The LT Programme is described
[here](https://www.stjornarradid.is/lisalib/getfile.aspx?itemid=56f6368e-54f0-11e7-941a-005056bc530c>)
(English version [here](https://clarin.is/media/uploads/mlt-en.pdf>)).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "islenska",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "\"Mi\u00f0eind ehf.\" <mideind@mideind.is>",
    "keywords": "nlp, icelandic, language, vocabulary, dictionary",
    "author": null,
    "author_email": "\"Mi\u00f0eind ehf.\" <mideind@mideind.is>",
    "download_url": null,
    "platform": null,
    "description": "![GitHub](https://img.shields.io/github/license/mideind/BinPackage)\n![Python 3.9+](https://img.shields.io/badge/python-3.9-blue.svg)\n![Release](https://shields.io/github/v/release/mideind/BinPackage?display_name=tag)\n![PyPI](https://img.shields.io/pypi/v/islenska)\n[![Python package](https://github.com/mideind/BinPackage/actions/workflows/python-package.yml/badge.svg)](https://github.com/mideind/BinPackage/actions/workflows/python-package.yml)\n\n# BinPackage\n\n**The Database of Icelandic Morphology (DIM, B\u00cdN) encapsulated in a Python package**\n\n<img src=\"img/greynir-logo-large.png\" alt=\"Greynir\" width=\"200\" height=\"200\" align=\"right\" style=\"margin-left:20px; margin-bottom: 20px;\">\n\n*BinPackage* is a Python (>= 3.9) package, published by\n[*Mi\u00f0eind ehf*](https://mideind.is), that embeds the vocabulary of the\n[*Database of Icelandic Morphology*](https://bin.arnastofnun.is/DMII/)\n([*Beygingarl\u00fdsing \u00edslensks n\u00fat\u00edmam\u00e1ls*](https://bin.arnastofnun.is/), *B\u00cdN*)\nand offers various lookups and queries of the data.\n\nThe database, maintained by\n[*The \u00c1rni Magn\u00fasson Institute for Icelandic Studies*](https://arnastofnun.is)\nand edited by chief editor *Krist\u00edn Bjarnad\u00f3ttir*, contains over\n6.5 million entries, over 3.1 million unique word forms,\nand about 300,000 distinct lemmas.\n\nMi\u00f0eind has encapsulated the database in an easy-to-install Python package,\ncompressing it\nfrom a 400+ megabyte CSV file into an ~82 megabyte indexed binary structure.\nThe package maps this structure directly into memory (via `mmap`) for fast lookup.\nAn algorithm for handling compound words is an important additional feature\nof the package.\n\nWith BinPackage, `pip install islenska` is all you need to have almost all\nof the commonly used vocabulary of the modern Icelandic language at your\ndisposal via Python. Batteries are included; no additional databases,\ndownloads or middleware are required.\n\nBinPackage allows querying for word forms, as well as lemmas and grammatical variants.\nThis includes information about word classes/categories (noun, verb, ...),\ndomains (person names, place names, ...), inflectional tags and\nvarious annotations, such as degrees of linguistic acceptability and alternate\nspelling forms.\n\n## The basics of B\u00cdN\n\nThe DMI/B\u00cdN database is\n[published in electronic form](https://bin.arnastofnun.is/gogn/mimisbrunnur/)\nby [*The \u00c1rni Magn\u00fasson Institute for Icelandic Studies*](https://arnastofnun.is).\nThe database is\nreleased under the CC BY-SA 4.0 license, in CSV files having two main formats:\n*Sigr\u00fanarsni\u00f0* (the *Basic Format*) and *Krist\u00ednarsni\u00f0* (the *Augmented Format*).\nSigr\u00fanarsni\u00f0 is more compact with six attributes\nfor each word form. Krist\u00ednarsni\u00f0 is newer and more detailed,\nwith up to 15 attributes for each word form.\n\nBinPackage supports both formats, with the augmented format (represented\nby the class `Ksnid`) being returned from several functions\nand the basic format (represented by the named tuple `BinEntry`)\nfrom others, as documented below.\n\nFurther information in English about the word classes and the inflectional\ncategories in the DMI/B\u00cdN database can be found\n[here](https://bin.arnastofnun.is/DMII/infl-system/).\n\n### The Basic Format\n\nThe B\u00cdN *Basic Format* is represented in BinPackage with a Python `NamedTuple`\ncalled `BinEntry`, having the following attributes (further documented\n[here in Icelandic](https://bin.arnastofnun.is/gogn/SH-snid) and\n[here in English](https://bin.arnastofnun.is/DMII/LTdata/s-format/)):\n\n| Name     | Type  | Content  |\n|----------|-------|----------|\n| `ord` | `str` | Lemma (headword, *uppflettior\u00f0*). |\n| `bin_id` | `int` | Identifier of the lemma, unique for a particular lemma/class combination. |\n| `ofl` | `str` | Word class/category, i.e. `kk`/`kvk`/`hk` for (masculine/feminine/neutral) nouns, `lo` for adjectives, `so` for verbs, `ao` for adverbs, etc.|\n| `hluti` | `str` | Semantic classification, i.e. `alm` for general vocabulary, `ism` for Icelandic person names, `\u00f6rn` for place names (*\u00f6rnefni*), etc.|\n| `bmynd` | `str` | Inflectional form (*beygingarmynd*). |\n| `mark` | `str` | Inflectional tag of this inflectional form, for instance `\u00deGFETgr` for dative (*\u00fe\u00e1gufall*, `\u00deGF`), singular (*eintala*, `ET`), definite (*me\u00f0 greini*, `gr`). |\n\nThe inflectional tag in the `mark` attribute is documented in detail\n[here in Icelandic](https://bin.arnastofnun.is/gogn/greiningarstrengir/) and\n[here in English](https://bin.arnastofnun.is/DMII/LTdata/tagset/).\n\n### The Augmented Format\n\nThe B\u00cdN *Augmented Format*, *Krist\u00ednarsni\u00f0*, is represented by instances of\nthe `Ksnid` class. It has the same six attributes as `BinEntry` (the Basic\nFormat) but adds nine attributes, shortly summarized below.\nFor details, please refer to the full documentation\n[in Icelandic](https://bin.arnastofnun.is/gogn/k-snid)\nor [in English](https://bin.arnastofnun.is/DMII/LTdata/k-format/).\n\n| Name     | Type  | Content  |\n|----------|-------|----------|\n| `einkunn` | `int` | Headword correctness grade, ranging from 0-5. |\n| `malsnid` | `str` | Genre/register indicator; e.g. `STAD` for dialectal, `GAM` for old-fashioned or `URE` for obsolete. |\n| `malfraedi` | `str` | Grammatical marking for further consideration, such as `STAFS` (spelling) or `TALA` (singular/plural). |\n| `millivisun` | `int` | Cross reference to the identifier (`bin_id` field) of a variant of this headword. |\n| `birting` | `str` | `K` for the DMII Core (*B\u00cdN kjarni*) of most common and accepted word forms, `V` for other published B\u00cdN entries. |\n| `beinkunn` | `int` | Correctness grade for this inflectional form, ranging from 0-5. |\n| `bmalsnid` | `str` | Genre/register indicator for this inflectional form. |\n| `bgildi` | `str` | Indicator for inflectional forms bound to idioms and other special cases. |\n| `aukafletta` | `str` | Alternative headword, e.g. plural form. |\n\n## Word compounding algorithm\n\nIcelandic allows almost unlimited creation of compound words. Examples are\n*s\u00edamskattarkj\u00f3ll* (noun), *s\u00f3larol\u00edulegur* (adjective), *\u00f6skurgrenja* (verb).\nIt is of course impossible for a static database to include all possible\ncompound words. To address this problem, BinPackage features a compound word\nrecognition algorithm, which is invoked when looking up any word that is not\nfound as-is in B\u00cdN.\n\nThe algorithm relies on a list of valid word prefixes, stored in\n`src/islenska/resources/prefixes.txt`, and suffixes, stored in\n`src/islenska/resources/suffixes.txt`. These lists have been compressed\ninto data structures called *Directed Acyclic Word Graphs* (DAWGs). BinPackage\nuses these DAWGs to find optimal solutions for the compound word\nproblem, where an optimal solution is defined as the prefix+suffix\ncombination that has (1) the fewest prefixes and (2) the longest suffix.\n\nIf an optimal compound form exists for a word, its suffix is looked up in B\u00cdN\nand used as an inflection template for the compound. *S\u00edamskattarkj\u00f3ll*\nis thus resolved into the prefix *s\u00edamskattar* and the suffix *kj\u00f3ll*,\nwith the latter providing the inflection of *s\u00edamskattarkj\u00f3ll* as\na singular masculine noun in the nominative case.\n\nThe compounding algorithm returns the prefixes and suffixes of the\noptimal compound in the `ord` and `bmynd` fields of the returned\n`BinEntry` / `Ksnid` instances, separated by hyphens `-`. As an example,\n*s\u00edamskattarkj\u00f3ll* is returned as follows (note the hyphens):\n\n```python\n>>> b.lookup(\"s\u00edamskattarkj\u00f3ll\")\n('s\u00edamskattarkj\u00f3ll', [\n    (ord='s\u00edamskattar-kj\u00f3ll', kk/alm/0, bmynd='s\u00edamskattar-kj\u00f3ll', NFET)\n])\n```\n\nLookups that are resolved via the compounding algorithm have a `bin_id` of zero.\nNote that the compounding algorithm will occasionally recognize nonexistent\nwords, for instance spelling errors, as compounds.\n\nIf desired, the compounding algorithm can be disabled\nvia an optional flag; see the documentation below.\n\n# Examples\n\n## Querying for word forms\n\n*Uppfletting beygingarmynda*\n\n```python\n>>> from islenska import Bin\n>>> b = Bin()\n>>> b.lookup(\"f\u00e6ri\")\n('f\u00e6ri', [\n    (ord='fara', so/alm/433568, bmynd='f\u00e6ri', OP-\u00deGF-GM-VH-\u00deT-1P-ET),\n    (ord='fara', so/alm/433568, bmynd='f\u00e6ri', OP-\u00deGF-GM-VH-\u00deT-1P-FT),\n    (ord='fara', so/alm/433568, bmynd='f\u00e6ri', OP-\u00deGF-GM-VH-\u00deT-2P-ET),\n    (ord='fara', so/alm/433568, bmynd='f\u00e6ri', OP-\u00deGF-GM-VH-\u00deT-2P-FT),\n    (ord='fara', so/alm/433568, bmynd='f\u00e6ri', OP-\u00deGF-GM-VH-\u00deT-3P-ET),\n    (ord='fara', so/alm/433568, bmynd='f\u00e6ri', OP-\u00fea\u00f0-GM-VH-\u00deT-3P-ET),\n    (ord='fara', so/alm/433568, bmynd='f\u00e6ri', OP-\u00deGF-GM-VH-\u00deT-3P-FT),\n    (ord='fara', so/alm/433568, bmynd='f\u00e6ri', GM-VH-\u00deT-1P-ET),\n    (ord='fara', so/alm/433568, bmynd='f\u00e6ri', GM-VH-\u00deT-3P-ET),\n    (ord='f\u00e6r', lo/alm/448392, bmynd='f\u00e6ri', FVB-KK-NFET),\n    (ord='f\u00e6ra', so/alm/434742, bmynd='f\u00e6ri', GM-FH-NT-1P-ET),\n    (ord='f\u00e6ra', so/alm/434742, bmynd='f\u00e6ri', GM-VH-NT-1P-ET),\n    (ord='f\u00e6ra', so/alm/434742, bmynd='f\u00e6ri', GM-VH-NT-3P-ET),\n    (ord='f\u00e6ra', so/alm/434742, bmynd='f\u00e6ri', GM-VH-NT-3P-FT),\n    (ord='f\u00e6ri', hk/alm/1198, bmynd='f\u00e6ri', NFET),\n    (ord='f\u00e6ri', hk/alm/1198, bmynd='f\u00e6ri', \u00deFET),\n    (ord='f\u00e6ri', hk/alm/1198, bmynd='f\u00e6ri', \u00deGFET),\n    (ord='f\u00e6ri', hk/alm/1198, bmynd='f\u00e6ri', NFFT),\n    (ord='f\u00e6ri', hk/alm/1198, bmynd='f\u00e6ri', \u00deFFT)\n])\n```\n\n`Bin.lookup()` returns the matched search key, usually identical to the\npassed-in word (here *f\u00e6ri*), and a list of matching entries\nin the basic format (*Sigr\u00fanarsni\u00f0*), i.e. as instances of `BinEntry`.\n\nEach entry is a named tuple containing the\nlemma (`ord`), the word class, domain and id number (`hk/alm/1198`),\nthe inflectional form (`bmynd`) and tag (`GM-VH-NT-3P-FT`).\nThe tag strings are documented in detail\n[here in Icelandic](https://bin.arnastofnun.is/gogn/greiningarstrengir/) and\n[here in English](https://bin.arnastofnun.is/DMII/LTdata/tagset/).\n\n## Detailed word query\n\n*Uppfletting \u00edtarlegra uppl\u00fdsinga*\n\n```python\n>>> from islenska import Bin\n>>> b = Bin()\n>>> w, m = b.lookup_ksnid(\"allskonar\")\n>>> # m is a list of 24 matching entries; we look at the first item only\n>>> m[0].malfraedi\n'STAFS'\n>>> m[0].einkunn\n4\n```\n\n`Bin.lookup_ksnid()` returns the matched search key and a list of all matching\nentries in the augmented format (*Krist\u00ednarsni\u00f0*). The fields of *Krist\u00ednarsni\u00f0*\nare documented in detail [here in Icelandic](https://bin.arnastofnun.is/gogn/k-snid)\nand [here in English](https://bin.arnastofnun.is/DMII/LTdata/k-format/).\n\nAs the example shows, the word `allskonar` is marked with the\ntag `STAFS` in the `malfraedi` field, and has an `einkunn` (correctness grade)\nof 4 (where 1 is the normal grade), giving a clue that this spelling is\nnonstandard. (A more correct form is `alls konar`, in two words.)\n\n## Lemmas and classes\n\n*Lemmur, uppflettior\u00f0; or\u00f0flokkar*\n\nBinPackage can find all possible lemmas (headwords) of a word,\nand the classes/categories to which it may belong.\n\n```python\n>>> from islenska import Bin\n>>> b = Bin()\n>>> b.lookup_lemmas_and_cats(\"laga\")\n{('lag', 'hk'), ('l\u00f6g', 'hk'), ('laga', 'so'), ('lagi', 'kk'), ('l\u00f6gur', 'kk')}\n```\n\nHere we see, perhaps unexpectedly, that the word form *laga* has five possible lemmas:\nfour nouns (*lag*, *l\u00f6g*, *lagi* and *l\u00f6gur*, neutral (`hk`) and masculine (`kk`)\nrespectively), and one verb (`so`), having the infinitive (*nafnh\u00e1ttur*) *a\u00f0 laga*.\n\n## Lookup by B\u00cdN identifier\n\nGiven a B\u00cdN identifier (id number), BinPackage can return all entries for that id:\n\n```python\n>>> from islenska import Bin\n>>> b = Bin()\n>>> b.lookup_id(495410)\n[<Ksnid: bmynd='sko', ord/ofl/hluti/bin_id='sko'/uh/alm/495410, mark=OBEYGJANLEGT, ksnid='1;;;;K;1;;;'>]\n```\n\n## Grammatical variants\n\nWith BinPackage, it is easy to obtain grammatical variants\n(alternative inflectional forms) of words: convert them between cases,\nsingular and plural, persons, degrees, moods, etc. Let's look\nat an example:\n\n```python\n>>> from islenska import Bin\n>>> b = Bin()\n>>> m = b.lookup_variants(\"Laugavegur\", \"kk\", \"\u00deGF\")\n>>> # m is a list of all possible variants of 'Laugavegur' in dative case.\n>>> # In this particular example, m has only one entry.\n>>> m[0].bmynd\n'Laugavegi'\n```\n\nThis is all it takes to convert the (masculine, `kk`) street name *Laugavegur*\nto dative case, commonly used in addresses.\n\n```python\n>>> from islenska import Bin\n>>> b = Bin()\n>>> m = b.lookup_variants(\"fallegur\", \"lo\", (\"EVB\", \"HK\", \"NF\", \"FT\"))\n>>> # m contains a list of all inflectional forms that meet the given\n>>> # criteria. In this example, we use the first form in the list.\n>>> adj = m[0].bmynd\n>>> f\"\u00c9g s\u00e1 {adj} nor\u00f0urlj\u00f3sin\"\n'\u00c9g s\u00e1 fallegustu nor\u00f0urlj\u00f3sin'\n```\n\nHere, we obtained the superlative degree, weak form (`EVB`, *efsta stig*,\n*veik beyging*), neutral gender (`HK`), nominative case (`NF`), plural (`FT`),\nof the adjective (`lo`) *fallegur* and used it in a sentence.\n\n# Documentation\n\n## `Bin()` constructor\n\nTo create an instance of the `Bin` class, do as follows:\n\n```python\n>>> from islenska import Bin\n>>> b = Bin()\n```\n\nYou can optionally specify the following boolean flags in the `Bin()`\nconstructor call:\n\n| Flag              | Default | Description                                    |\n|-------------------|---------|------------------------------------------------|\n| `add_negation`    | `True`    | For adjectives, find forms with the prefix `\u00f3` even if only the non-prefixed version is present in B\u00cdN. Example: find `\u00f3f\u00edkinn` because `f\u00edkinn` is in B\u00cdN. |\n| `add_legur`       | `True`    | For adjectives, find all forms with an \"adjective-like\" suffix, i.e. `-legur`, `-leg`, etc. even if they are not present in B\u00cdN. Example: `s\u00f3larol\u00edulegt`. |\n| `add_compounds`   | `True`    | Find compound words that can be derived from BinPackage's collection of allowed prefixes and suffixes. The algorithm finds the compound word with the fewest components and the longest suffix. Example: `s\u00edamskattar-kj\u00f3ll`. |\n| `replace_z`       | `True`    | Find words containing `tzt` and `z` by replacing these strings by `st` and `s`, respectively. Example: `veitzt` -> `veist`. |\n| `only_bin`        | `False`   | Find only word forms that are originally present in B\u00cdN, disabling all of the above described flags. |\n\nAs an example, to create a `Bin` instance that only returns word forms that occur\nin the original B\u00cdN database, do like so:\n\n```python\n>>> from islenska import Bin\n>>> b = Bin(only_bin=True)\n```\n\n## `lookup()` function\n\nTo look up word forms and return summarized data in the Basic Format\n(`BinEntry` tuples), call the `lookup` function:\n\n```python\n>>> w, m = b.lookup(\"m\u00e6la\")\n>>> w\n'm\u00e6la'\n>>> m\n[\n    (ord='m\u00e6la', kvk/alm/16302, bmynd='m\u00e6la', NFET),\n    (ord='m\u00e6la', kvk/alm/16302, bmynd='m\u00e6la', EFFT2),\n    (ord='m\u00e6la', so/alm/469211, bmynd='m\u00e6la', GM-NH),\n    (ord='m\u00e6la', so/alm/469211, bmynd='m\u00e6la', GM-FH-NT-3P-FT),\n    (ord='m\u00e6la', so/alm/469210, bmynd='m\u00e6la', GM-NH),\n    (ord='m\u00e6la', so/alm/469210, bmynd='m\u00e6la', GM-FH-NT-3P-FT),\n    (ord='m\u00e6li', hk/alm/2512, bmynd='m\u00e6la', EFFT),\n    (ord='m\u00e6lir', kk/alm/4474, bmynd='m\u00e6la', \u00deFFT),\n    (ord='m\u00e6lir', kk/alm/4474, bmynd='m\u00e6la', EFFT)\n]\n```\n\nThis function returns a `Tuple[str, List[BinEntry]]` containing the string that\nwas actually used as a search key, and a list of `BinEntry` instances that\nmatch the search key. The list is empty if no matches were found, in which\ncase the word is probably not Icelandic or at least not spelled correctly.\n\nIn this example, however, the list has nine matching entries.\nWe see that the word form *m\u00e6la* is an inflectional form of five different\nheadwords (lemmas), including two verbs (`so`):\n(1) *m\u00e6la* meaning *to measure* (past tense *m\u00e6ldi*), and (2) *m\u00e6la* meaning *to speak*\n(past tense *m\u00e6lti*). Other headwords are nouns, in all three genders:\nfeminine (`kvk`), neutral (`hk`) and masculine (`kk`).\n\nLet's try a different twist:\n\n```python\n>>> w, m = b.lookup(\"s\u00edamskattarkj\u00f3lanna\")\n>>> w\n's\u00edamskattarkj\u00f3lanna'\n>>> m\n[\n    (ord='s\u00edamskattar-kj\u00f3ll', kk/alm/0, bmynd='s\u00edamskattar-kj\u00f3lanna', EFFTgr)\n]\n```\n\nHere we see that *s\u00edamskattarkj\u00f3lanna* is a compound word, amalgamated\nfrom *s\u00edamskattar* and *kj\u00f3lanna*, with *kj\u00f3ll* being the base lemma of the compound\nword. This is a masculine noun (`kk`), in the `alm` (general vocabulary) domain.\nNote that it has an id number (*bin_id*) equal to 0 since it is constructed\non-the-fly by BinPackage, rather than being found in B\u00cdN. The grammatical\ntag string is `EFFTgr`, i.e. genitive (*eignarfall*, `EF`), plural (*fleirtala*,\n`FT`) and definite (*me\u00f0 greini*, `gr`).\n\nYou can specify the `at_sentence_start` option as being `True`, in which case\nBinPackage will also look for lower case words in B\u00cdN even if the lookup word\nis upper case. As an example:\n\n```python\n>>> _, m = b.lookup(\"Geysir\", at_sentence_start=True)\n>>> m\n[\n    (ord='geysa', so/alm/483756, bmynd='geysir', GM-FH-NT-2P-ET),\n    (ord='geysa', so/alm/483756, bmynd='geysir', GM-FH-NT-3P-ET),\n    (ord='geysa', so/alm/483756, bmynd='geysir', GM-VH-NT-2P-ET),\n    (ord='Geysir', kk/b\u00e6r/263617, bmynd='Geysir', NFET)\n]\n>>> _, m = b.lookup(\"Geysir\", at_sentence_start=False)  # This is the default\n>>> m\n[\n    (ord='Geysir', kk/b\u00e6r/263617, bmynd='Geysir', NFET)\n]\n```\n\nAs you can see, the lowercase matches for *geysir* are returned as well\nas the single uppercase one, if `at_sentence_start` is set to `True`.\n\nAnother example:\n\n```python\n>>> b.lookup(\"Heftaranum\", at_sentence_start=True)\n('heftaranum', [\n    (ord='heftari', kk/alm/7958, bmynd='heftaranum', \u00deGFETgr)\n])\n```\n\nNote that here, the returned search key is `heftaranum` in lower case,\nsince `Heftaranum` in upper case was not found in B\u00cdN.\n\nAnother option is `auto_uppercase`, which if set to `True`, causes the returned\nsearch key to be in upper case if any upper case entry exists in B\u00cdN for the\nlookup word. This can be helpful when attempting to normalize\nall-lowercase input, for example from voice recognition systems. (Additional\ndisambiguation is typically still needed, since many common words and names do\nexist both in lower case and in upper case, and BinPackage cannot infer which\nform is desired in the output.)\n\nA final example of when the returned search key is different from the lookup word:\n\n```python\n>>>> b.lookup(\"\u00fe\u00fdzk\")\n('\u00fe\u00fdsk', [\n    (ord='\u00fe\u00fdskur', lo/alm/408914, bmynd='\u00fe\u00fdsk', FSB-KVK-NFET),\n    (ord='\u00fe\u00fdskur', lo/alm/408914, bmynd='\u00fe\u00fdsk', FSB-HK-NFFT),\n    (ord='\u00fe\u00fdskur', lo/alm/408914, bmynd='\u00fe\u00fdsk', FSB-HK-\u00deFFT)\n])\n```\n\nHere, the input contains `z` or `tzt` which is translated to `s` or `st`\nrespectively to find a lookup match in B\u00cdN. In this case, the actual matching\nword `\u00fe\u00fdsk` is returned as the search key instead of `\u00fe\u00fdzk`. (This behavior\ncan be disabled with the `replace_z` flag on the `Bin()` constructor,\nas described above.)\n\n`lookup()` has the following parameters:\n\n| Name | Type | Default | Description |\n|------|------|---------|-------------|\n| w | `str` | | The word to look up |\n| at_sentence_start | `bool` | `False` | `True` if BinPackage should also return lower case forms of the word, if it is given in upper case. |\n| auto_uppercase | `bool` | `False` | `True` if BinPackage should use and return upper case search keys, if the word exists in upper case. |\n\nThe function returns a `Tuple[str, List[BinEntry]]` instance.\nThe first element of the tuple is the search key that was matched in B\u00cdN,\nand the second element is the list of matches, each represented\nby a `BinEntry` instance.\n\n## `lookup_ksnid()` function\n\nTo look up word forms and return full augmented format (*Krist\u00ednarsni\u00f0*)\nentries, call the `lookup_ksnid()` function:\n\n```python\n>>> w, m = b.lookup_ksnid(\"allskonar\")\n>>> w\n'allskonar'\n>>> # m is a list of all matches of the word form; here we show the first item\n>>> str(m[0])\n\"<Ksnid: bmynd='allskonar', ord/ofl/hluti/bin_id='allskonar'/lo/alm/175686, mark=FSB-KK-NFET, ksnid='4;;STAFS;496369;V;1;;;'>\"\n>>> m[0].malfraedi\n'STAFS'\n>>> m[0].einkunn\n4\n>>> m[0].millivisun\n496369\n```\n\nThis function is identical to `lookup()` except that it returns full\naugmented format entries of class `Ksnid`, with 15 attributes each, instead of\nbasic format (`BinEntry`) tuples. The same option flags are available\nand the logic for returning the search key is the same.\n\nThe example shows how the word *allskonar* has a grammatical comment\nregarding spelling (`m[0].malfraedi == 'STAFS'`) and a correctness grade\n(`m[0].einkunn`) of 4, as well as a cross-reference\nto the entry with id number (`bin_id`) 496369 - which is the lemma\n*alls konar*.\n\n`lookup_ksnid()` has the following parameters:\n\n| Name | Type | Default | Description |\n|------|------|---------|-------------|\n| w | `str` | | The word to look up |\n| at_sentence_start | `bool` | `False` | `True` if BinPackage should also return lower case forms of the word, if it is given in upper case. |\n| auto_uppercase | `bool` | `False` | `True` if BinPackage should use and return upper case search keys, if the word exists in upper case. |\n\nThe function returns a tuple of type `Tuple[str, List[Ksnid]]`.\nThe first element of the tuple is the search key that was matched in B\u00cdN,\nand the second element is the list of matching entries, each represented\nby an instance of class `Ksnid`.\n\n## `lookup_id()` function\n\nIf you have a B\u00cdN identifier (integer id) and need to look up the associated\naugmented format (*Krist\u00ednarsni\u00f0*) entries, call the `lookup_id()` function:\n\n```python\n>>> b.lookup_id(495410)\n[<Ksnid: bmynd='sko', ord/ofl/hluti/bin_id='sko'/uh/alm/495410, mark=OBEYGJANLEGT, ksnid='1;;;;K;1;;;'>]\n\n```\n\n`lookup_id()` has a single mandatory parameter:\n\n| Name | Type | Default | Description |\n|------|------|---------|-------------|\n| bin_id | `int` | | The B\u00cdN identifier of the entries to look up. |\n\nThe function returns a list of type `List[Ksnid]`. If the given id number is not found\nin B\u00cdN, an empty list is returned.\n\n## `lookup_cats()` function\n\nTo look up the possible classes/categories of a word (*or\u00f0flokkar*),\ncall the `lookup_cats` function:\n\n```python\n>>> b.lookup_cats(\"laga\")\n{'so', 'hk', 'kk'}\n```\n\nThe function returns a `Set[str]` with all possible word classes/categories\nof the word form. If the word is not found in B\u00cdN, or recognized using the\ncompounding algorithm, the function returns an empty set.\n\n`lookup_cats()` has the following parameters:\n\n| Name | Type | Default | Description |\n|------|------|---------|-------------|\n| w | `str` | | The word to look up |\n| at_sentence_start | `bool` | `False` | `True` if BinPackage should also include lower case forms of the word, if it is given in upper case. |\n\n## `lookup_lemmas_and_cats()` function\n\nTo look up the possible lemmas/headwords and classes/categories of a word\n(*lemmur og or\u00f0flokkar*), call the `lookup_lemmas_and_cats` function:\n\n```python\n>>> b.lookup_lemmas_and_cats(\"laga\")\n{('lagi', 'kk'), ('l\u00f6gur', 'kk'), ('laga', 'so'), ('lag', 'hk'), ('l\u00f6g', 'hk')}\n```\n\nThe function returns a `Set[Tuple[str, str]]` where each tuple contains\na lemma/headword and a class/category, respectively.\nIf the word is not found in B\u00cdN, or recognized using the\ncompounding algorithm, the function returns an empty set.\n\n`lookup_lemmas_and_cats()` has the following parameters:\n\n| Name | Type | Default | Description |\n|------|------|---------|-------------|\n| w | `str` | | The word to look up |\n| at_sentence_start | `bool` | `False` | `True` if BinPackage should also include lower case forms of the word, if it is given in upper case. |\n\n## `lookup_variants()` function\n\nThis function returns grammatical variants (particular inflectional forms)\nof a given word. For instance,\nit can return a noun in a different case, plural instead of singular,\nand/or with or without an attached definite article (*greinir*). It can return\nadjectives in different degrees (*frumstig*, *mi\u00f0stig*, *efsta stig*), verbs\nin different persons or moods, etc.\n\nHere is a simple example, converting the masculine noun *heftaranum* from dative\nto nominative case (`NF`):\n\n```python\n>>> m = b.lookup_variants(\"heftaranum\", \"kk\", \"NF\")\n>>> m[0].bmynd\n'heftarinn'\n```\n\nHere we add a conversion to plural (`FT`) as well - note that we can pass multiple\ninflectional tags in a tuple:\n\n```python\n>>> m = b.lookup_variants(\"heftaranum\", \"kk\", (\"NF\", \"FT\"))\n>>> m[0].bmynd\n'heftararnir'\n```\n\nFinally, we specify a conversion to indefinite form (`nogr`):\n\n```python\n>>> m = b.lookup_variants(\"heftaranum\", \"kk\", (\"NF\", \"FT\", \"nogr\"))\n>>> m[0].bmynd\n'heftarar'\n```\n\nDefinite form is requested via `gr`, and indefinite form via `nogr`.\n\nTo see how `lookup_variants()` handles ambiguous word forms, let's\ntry our old friend *m\u00e6li* again:\n\n```python\n>>> b.lookup_variants(\"m\u00e6li\", \"no\", \"NF\")\n[\n    <Ksnid: bmynd='m\u00e6li', ord/ofl/hluti/bin_id='m\u00e6li'/hk/alm/2512, mark=NFET, ksnid='1;;;;K;1;;;'>,\n    <Ksnid: bmynd='m\u00e6li', ord/ofl/hluti/bin_id='m\u00e6li'/hk/alm/2512, mark=NFFT, ksnid='1;;;;K;1;;;'>,\n    <Ksnid: bmynd='m\u00e6lir', ord/ofl/hluti/bin_id='m\u00e6lir'/kk/alm/4474, mark=NFET, ksnid='1;;;;K;1;;;'>\n]\n```\n\nWe specified `no` (noun) as the word class constraint. The result thus contains\nnominative case forms of two nouns, one neutral (*m\u00e6li*, definite form *m\u00e6li\u00f0*,\nwith identical singular `NFET` and plural `NFFT` form), and one\nmasculine (*m\u00e6lir*, definite form *m\u00e6lirinn*). If we had specified `hk` as the\nword class constraint, we would have gotten back the first two (neutral) entries only;\nfor `kk` we would have gotten back the third entry (masculine) only.\n\nLet's try modifying a verb from subjunctive (*vi\u00f0tengingarh\u00e1ttur*)\n(e.g., *\u00c9g/h\u00fan hra\u00f0l\u00e6si b\u00f3kina ef \u00e9g hef\u00f0i t\u00edma til \u00feess*) to\nindicative mood (*frams\u00f6guh\u00e1ttur*), present tense\n(e.g. *\u00c9g/h\u00fan hra\u00f0les b\u00f3kina \u00ed flugfer\u00f0inni*):\n\n```python\n>>> m = b.lookup_variants(\"hra\u00f0l\u00e6si\", \"so\", (\"FH\", \"NT\"))\n>>> for mm in m: print(f\"{mm.ord} | {mm.bmynd} | {mm.mark}\")\nhra\u00f0lesa | hra\u00f0les | GM-FH-NT-1P-ET\nhra\u00f0lesa | hra\u00f0les | GM-FH-NT-3P-ET\n```\n\nWe get back both the 1st and the 3rd person inflection forms,\nsince they can both be derived from *hra\u00f0l\u00e6si* and we don't constrain\nthe person in our variant specification. If only third person\nresults are desired, we could have specified `(\"FH\", \"NT\", \"3P\")` in the\nvariant tuple.\n\nFinally, let's describe this functionality in superlative terms:\n\n```python\n>>> adj = b.lookup_variants(\"fr\u00e1b\u00e6r\", \"lo\", (\"EVB\", \"KVK\"))[0].bmynd\n>>> f\"\u00deetta er {adj} virknin af \u00f6llum\"\n'\u00deetta er fr\u00e1b\u00e6rasta virknin af \u00f6llum'\n```\n\nNote how we ask for a superlative weak form (`EVB`) for a feminine subject (`KVK`),\ngetting back the adjective *fr\u00e1b\u00e6rasta*. We could also ask for the\nstrong form (`ESB`), and then for the comparative (*mi\u00f0stig*, `MST`):\n\n```python\n>>> adj = b.lookup_variants(\"fr\u00e1b\u00e6r\", \"lo\", (\"ESB\", \"KVK\"))[0].bmynd\n>>> f\"\u00deessi virkni er {adj} af \u00f6llum\"\n'\u00deessi virkni er fr\u00e1b\u00e6rust af \u00f6llum'\n>>> adj = b.lookup_variants(\"fr\u00e1b\u00e6r\", \"lo\", (\"MST\", \"KVK\"))[0].bmynd\n>>> f\"\u00deessi virkni er {adj} en allt anna\u00f0\"\n'\u00deessi virkni er fr\u00e1b\u00e6rari en allt anna\u00f0'\n```\n\nFinally, for some cool Python code for converting any adjective to\nthe superlative degree (*efsta stig*):\n\n```python\nfrom islenska import Bin\nb = Bin()\ndef efsta_stig(lo: str, kyn: str, veik_beyging: bool=True) -> str:\n    \"\"\" Skilar efsta stigi l\u00fdsingaror\u00f0s, \u00ed umbe\u00f0nu kyni og beygingu \"\"\"\n    vlist = b.lookup_variants(lo, \"lo\", (kyn, \"EVB\" if veik_beyging else \"ESB\"))\n    return vlist[0].bmynd if vlist else \"\"\nprint(f\"\u00deetta er {efsta_stig('n\u00fdr', 'kvk')} framf\u00f6rin \u00ed \u00edslenskri m\u00e1lt\u00e6kni!\")\nprint(f\"\u00deetta er {efsta_stig('sni\u00f0ugur', 'hk')} verkf\u00e6ri\u00f0!\")\n```\n\nThis will output:\n\n```\n\u00deetta er n\u00fdjasta framf\u00f6rin \u00ed \u00edslenskri m\u00e1lt\u00e6kni!\n\u00deetta er sni\u00f0ugasta verkf\u00e6ri\u00f0!\n```\n\n`lookup_variants()` has the following parameters:\n\n| Name | Type | Default | Description |\n|------|------|---------|-------------|\n| w | `str` | | The word to use as a base for the lookup |\n| cat | `str` | | The word class, used to disambiguate the word. `no` (*nafnor\u00f0*) can be used to match any of `kk`, `kvk` and `hk`. |\n| to_inflection | `Union[str, Tuple[str, ...]]` | | One or more requested grammatical features, specified using fragments of the B\u00cdN tag string. As a special case, `nogr` means indefinite form (no `gr`) for nouns. The parameter can be a single string or a tuple of several strings. |\n| lemma | `Optional[str]` | `None` | The lemma of the word, optionally used to further disambiguate it |\n| bin_id | `Optional[int]` | `None` | The id number of the word, optionally used to further disambiguate it |\n| inflection_filter | `Optional[Callable[[str], bool]]` | `None` | A callable taking a single string parameter and returning a `bool`. The `mark` attribute of a potential match will be passed to this function, and only included in the result if the function returns `True`. |\n\nThe function returns `List[Ksnid]`, i.e. a list of `Ksnid` instances that\nmatch the grammatical features requested in `to_inflection`. If no such\ninstances exist, an empty list is returned.\n\n## `lookup_lemmas()` function\n\nTo look up all entries having the given string as a lemma/headword,\ncall the `lookup_lemmas` function:\n\n```python\n>>> b.lookup_lemmas(\"\u00feyrla\")\n('\u00feyrla', [\n    (ord='\u00feyrla', kvk/alm/16445, bmynd='\u00feyrla', NFET),  # Feminine noun\n    (ord='\u00feyrla', so/alm/425096, bmynd='\u00feyrla', GM-NH)  # Verb\n])\n>>> b.lookup_lemmas(\"\u00feyrlast\")\n('\u00feyrlast', [\n    (ord='\u00feyrla', so/alm/425096, bmynd='\u00feyrlast', MM-NH)  # Middle voice infinitive\n])\n>>> b.lookup_lemmas(\"\u00feyrlan\")\n('\u00feyrlan', [])\n```\n\nThe function returns a `Tuple[str, List[BinEntry]]` like `lookup()`,\nbut where the `BinEntry` list\nhas been filtered to include only lemmas/headwords. This is the reason why\n`b.lookup_lemmas(\"\u00feyrlan\")` returns an empty list in the example above -\n*\u00feyrlan* does not appear in B\u00cdN as a lemma/headword.\n\nLemmas/headwords of verbs include the middle voice (*mi\u00f0mynd*) of the\ninfinitive, `MM-NH`, as in the example for *\u00feyrlast*.\n\n`lookup_lemmas()` has a single parameter:\n\n| Name | Type | Default | Description |\n|------|------|---------|-------------|\n| lemma | `str` | | The word to look up as a lemma/headword. |\n\n# Implementation\n\nBinPackage is written in [Python 3](https://www.python.org/)\nand requires Python 3.9 or later. It runs on CPython and [PyPy](http://pypy.org/).\n\nThe Python code calls a small C++ library to speed up lookup of word forms in the\ncompressed binary structure into which B\u00cdN has been encoded.\nThis means that if a pre-compiled Python wheel is not\navailable on PyPI for your platform, you may need a set of development tools installed\non your machine, before you install BinPackage using `pip`:\n\n```bash\n# The following works on Debian/Ubuntu GNU/Linux\nsudo apt-get install python3-dev libffi-dev\n```\n\nBinPackage is fully type-annotated for use with Python static type checkers such\nas `mypy` and `Pylance` / `Pyright`.\n\n# Installation and setup\n\nYou must have Python >= 3.9 installed on your machine (CPython or PyPy).\nIf you are using a Python virtual environment (`virtualenv`), activate it\nfirst (substituting your environment name for `venv` below):\n\n```bash\nvenv/bin/activate\n```\n\n...or, on Windows:\n\n```cmd\nC:\\> venv\\scripts\\activate\n```\n\nThen, install BinPackage from the Python Package Index (PyPI),\nwhere the package is called `islenska`:\n\n```bash\npip install islenska\n```\n\nNow, you are ready to `import islenska` or `from islenska import Bin`\nin your Python code.\n\n----\n\nIf you want to install the package in editable source code mode,\ndo as follows:\n\n```bash\n# Clone the GitHub repository\ngit clone https://github.com/mideind/BinPackage\ncd BinPackage\n# Install the package in editable mode\npip install -e .  # Note the dot!\ncd src/islenska/resources\n# Fetch the newest B\u00cdN data (KRISTINsnid.csv.zip)\n# (We remind you that the B\u00cdN data is under the CC BY-SA 4.0 license; see below.)\nwget -O KRISTINsnid.csv.zip https://bin.arnastofnun.is/django/api/nidurhal/?file=KRISTINsnid.csv.zip\n# Unzip the data\nunzip -q KRISTINsnid.csv.zip\nrm KRISTINsnid.csv.*\ncd ../../..\n# Run the compressor to generate src/islenska/resources/compressed.bin\npython tools/binpack.py\n# Run the DAWG builder for the prefix and suffix files\npython tools/dawgbuilder.py\n# Now you're ready to go\n```\n\nThis will clone the GitHub repository into the BinPackage directory\nand install the package into your Python environment from the source files.\nThen, the newest B\u00cdN data is fetched via `wget`\nfrom *Stofnun \u00c1rna Magn\u00fassonar* and compressed into a binary file.\nFinally, the Directed Acyclic Word Graph builder is run to\ncreate DAWGs for word prefixes and suffixes, used by the compound word\nalgorithm.\n\n## File details\n\nThe following files are located in the `src/islenska` directory within\nBinPackage:\n\n* `bindb.py`: The main `Bin` class; high-level interfaces into BinPackage.\n* `bincompress.py`: The lower-level `BinCompressed` class, interacting directly with\n  the compressed data in a binary buffer in memory.\n* `basics.py`: Basic data structures, such as the `BinEntry` NamedTuple.\n* `dawgdictionary.py`: Classes that handle compound words.\n* `bin.h`, `bin.cpp`: C++ code for fast lookup of word forms, called from Python via CFFI.\n* `tools/binpack.py`: A command-line tool that reads vocabulary data in .CSV\n  form and outputs a compressed binary file, `compressed.bin`.\n* `tools/dawgbuilder.py`: A command-line tool that reads information about word prefixes and suffixes\n  and creates corresponding directed acyclic word graph (DAWG) structures for\n  the word compounding logic.\n* `resources/prefixes.txt`, `resources/suffixes.txt`: Text files containing\n  valid Icelandic word prefixes and suffixes, respectively.\n\n# Copyright and licensing\n\nBinPackage embeds the vocabulary of the\n**[Database of Icelandic Morphology](https://bin.arnastofnun.is/DMII/)**\n(**[Beygingarl\u00fdsing \u00edslensks n\u00fat\u00edmam\u00e1ls](https://bin.arnastofnun.is/)**),\nabbreviated *B\u00cdN*.\n\nThe copyright holder for B\u00cdN is *The \u00c1rni Magn\u00fasson Institute*\n*for Icelandic Studies*. The B\u00cdN data used herein are publicly available\nfor use under the terms of the\n[CC BY-SA 4.0 license](https://creativecommons.org/licenses/by-sa/4.0/legalcode),\nas further detailed\n[here in English](https://bin.arnastofnun.is/DMII/LTdata/conditions/) and\n[here in Icelandic](https://bin.arnastofnun.is/gogn/mimisbrunnur/).\n\nIn accordance with the B\u00cdN license terms, credit is hereby given as follows:\n\n*Beygingarl\u00fdsing \u00edslensks n\u00fat\u00edmam\u00e1ls. Stofnun \u00c1rna Magn\u00fassonar \u00ed \u00edslenskum fr\u00e6\u00f0um.*\n*H\u00f6fundur og ritstj\u00f3ri Krist\u00edn Bjarnad\u00f3ttir.*\n\n----\n\n**Mi\u00f0eind ehf., the publisher of BinPackage, claims no endorsement, sponsorship,**\n**or official status granted to it by the B\u00cdN copyright holder.**\n\nBinPackage includes certain program logic, created by Mi\u00f0eind ehf.,\nthat optionally exposes additions and modifications to the original\nB\u00cdN source data. Such logic is enabled or disabled by user-settable flags,\nas described in the documentation above.\n\n----\n\nBinPackage is Copyright \u00a9 2024 [Mi\u00f0eind ehf.](https://mideind.is)\nThe original author of this software is *Vilhj\u00e1lmur \u00deorsteinsson*.\n\n<img src=\"img/MideindLogoVert400.png\" alt=\"Mi\u00f0eind ehf.\"\n   width=\"118\" height=\"100\" align=\"left\"\n   style=\"margin-right:20px; margin-top: 10px; margin-bottom: 10px;\">\n\nThis software is licensed under the **MIT License**:\n\n*Permission is hereby granted, free of charge, to any person obtaining a*\n*copy of this software and associated documentation files (the \"Software\"),*\n*to deal in the Software without restriction, including without limitation*\n*the rights to use, copy, modify, merge, publish, distribute, sublicense,*\n*and/or sell copies of the Software, and to permit persons to whom the*\n*Software is furnished to do so, subject to the following conditions:*\n\n*The above copyright notice and this permission notice shall be included*\n*in all copies or substantial portions of the Software.*\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nIf you would like to use this software in ways that are incompatible with the\nstandard MIT license, [contact Mi\u00f0eind ehf.](mailto:mideind@mideind.is) to negotiate custom arrangements.\n\n# Acknowledgements\n\nParts of this software were developed under the auspices of the\nIcelandic Government's 5-year Language Technology Programme for Icelandic,\nmanaged by [Almannar\u00f3mur](https://almannaromur.is). The LT Programme is described\n[here](https://www.stjornarradid.is/lisalib/getfile.aspx?itemid=56f6368e-54f0-11e7-941a-005056bc530c>)\n(English version [here](https://clarin.is/media/uploads/mlt-en.pdf>)).\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "The vocabulary of modern Icelandic, encapsulated in a Python package",
    "version": "1.0.3",
    "project_urls": {
        "Repository": "https://github.com/mideind/BinPackage"
    },
    "split_keywords": [
        "nlp",
        " icelandic",
        " language",
        " vocabulary",
        " dictionary"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "221ac19ad9c9150fea5046336867b61e07079cf7f73efbbb1227a3c15ab4692d",
                "md5": "d64e1a8390600f4ce31051e3437d0abe",
                "sha256": "867161bfee488e2a705cbf91a0cbfc305c5686ffd23767f5426323aa7aee80b3"
            },
            "downloads": -1,
            "filename": "islenska-1.0.3-cp310-cp310-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "d64e1a8390600f4ce31051e3437d0abe",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.9",
            "size": 50099331,
            "upload_time": "2024-08-26T17:15:18",
            "upload_time_iso_8601": "2024-08-26T17:15:18.104559Z",
            "url": "https://files.pythonhosted.org/packages/22/1a/c19ad9c9150fea5046336867b61e07079cf7f73efbbb1227a3c15ab4692d/islenska-1.0.3-cp310-cp310-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2a315949ec7bd82e020aacee6e78c31a3b41678e8e51c3ca8a0f9998b4932ea4",
                "md5": "b0fdafe6b8caf4084fa74daa675f13bd",
                "sha256": "ebbe29bb81a4dcfc9394a28b7d9b4838af57cbdcc8d3025919072c38fca9d67a"
            },
            "downloads": -1,
            "filename": "islenska-1.0.3-cp310-cp310-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "b0fdafe6b8caf4084fa74daa675f13bd",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.9",
            "size": 50099591,
            "upload_time": "2024-08-26T17:15:26",
            "upload_time_iso_8601": "2024-08-26T17:15:26.582733Z",
            "url": "https://files.pythonhosted.org/packages/2a/31/5949ec7bd82e020aacee6e78c31a3b41678e8e51c3ca8a0f9998b4932ea4/islenska-1.0.3-cp310-cp310-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1c1c4481bd54689ddc4edfcc783fb141079bba3f003879de4872b7d01079e3ac",
                "md5": "732962184b9865cc409df5b25ffb8139",
                "sha256": "8736636558688d3ada46993ecca046b19e60efc02d965118eae9f9bbf3254031"
            },
            "downloads": -1,
            "filename": "islenska-1.0.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "732962184b9865cc409df5b25ffb8139",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.9",
            "size": 50117314,
            "upload_time": "2024-08-26T17:15:35",
            "upload_time_iso_8601": "2024-08-26T17:15:35.321899Z",
            "url": "https://files.pythonhosted.org/packages/1c/1c/4481bd54689ddc4edfcc783fb141079bba3f003879de4872b7d01079e3ac/islenska-1.0.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c2a657da9a610a71dbf7a3e351baf9cd0241ad6eac0c2a846d078b3af06ca878",
                "md5": "7c0e1b36e7eae8d0d077c46bc16c7286",
                "sha256": "02f75487f4d69f2d1e43f0e6c09d36a33e79fc5dc73babf31af391e29ce8887d"
            },
            "downloads": -1,
            "filename": "islenska-1.0.3-cp310-cp310-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "7c0e1b36e7eae8d0d077c46bc16c7286",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.9",
            "size": 50101834,
            "upload_time": "2024-08-26T17:15:44",
            "upload_time_iso_8601": "2024-08-26T17:15:44.095123Z",
            "url": "https://files.pythonhosted.org/packages/c2/a6/57da9a610a71dbf7a3e351baf9cd0241ad6eac0c2a846d078b3af06ca878/islenska-1.0.3-cp310-cp310-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "027f1bb04723d6a9fc0360e5506495b02061f3206fb24688b807161dc867fa9c",
                "md5": "8a0cdade6a9d74f55a6725e963fd69f5",
                "sha256": "47a804af480a9791ed703371d7447a12c5c6ad6d99f23f2cf47cd2b317265986"
            },
            "downloads": -1,
            "filename": "islenska-1.0.3-cp311-cp311-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "8a0cdade6a9d74f55a6725e963fd69f5",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.9",
            "size": 50099334,
            "upload_time": "2024-08-26T17:15:53",
            "upload_time_iso_8601": "2024-08-26T17:15:53.991574Z",
            "url": "https://files.pythonhosted.org/packages/02/7f/1bb04723d6a9fc0360e5506495b02061f3206fb24688b807161dc867fa9c/islenska-1.0.3-cp311-cp311-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "52ef9a071acbbc693b873c59ff525b85d354821ce883aa3c3ae102b8f2ada9cd",
                "md5": "598de446c7bfa2f95102f88058a5d733",
                "sha256": "767937e0be9d685e1fe3992d827b243e7d0df91f817247fca26235c3bfda67d3"
            },
            "downloads": -1,
            "filename": "islenska-1.0.3-cp311-cp311-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "598de446c7bfa2f95102f88058a5d733",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.9",
            "size": 50099594,
            "upload_time": "2024-08-26T17:16:02",
            "upload_time_iso_8601": "2024-08-26T17:16:02.676047Z",
            "url": "https://files.pythonhosted.org/packages/52/ef/9a071acbbc693b873c59ff525b85d354821ce883aa3c3ae102b8f2ada9cd/islenska-1.0.3-cp311-cp311-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "91fa4fb097313e6b78dfee11e6ed7e92f7ad1a14d62612c2b5a523adbc303c13",
                "md5": "d22dd7770f973432490ab18cd0ead537",
                "sha256": "7f34bef6f5b78610a0cd932c729839b102b45b9b4aac0d442bbc715f42b3efbd"
            },
            "downloads": -1,
            "filename": "islenska-1.0.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "d22dd7770f973432490ab18cd0ead537",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.9",
            "size": 50117303,
            "upload_time": "2024-08-26T17:16:11",
            "upload_time_iso_8601": "2024-08-26T17:16:11.116273Z",
            "url": "https://files.pythonhosted.org/packages/91/fa/4fb097313e6b78dfee11e6ed7e92f7ad1a14d62612c2b5a523adbc303c13/islenska-1.0.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "341c884be7be6ee748abe29b9f14b3789bd70842baf5163d7551693d27968297",
                "md5": "d257ff0628d01944b36964c9d6cf7c5b",
                "sha256": "1c5ceaa384a4bc02f04078681661b598502bc031b6632d082b4b68be254f8ddf"
            },
            "downloads": -1,
            "filename": "islenska-1.0.3-cp311-cp311-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "d257ff0628d01944b36964c9d6cf7c5b",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.9",
            "size": 50101835,
            "upload_time": "2024-08-26T17:16:19",
            "upload_time_iso_8601": "2024-08-26T17:16:19.619547Z",
            "url": "https://files.pythonhosted.org/packages/34/1c/884be7be6ee748abe29b9f14b3789bd70842baf5163d7551693d27968297/islenska-1.0.3-cp311-cp311-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "75edc240f35652bdd95466a9f8ccd260a8cad1e29ec230893934f86a254c87cb",
                "md5": "fd4f8fea125d1a558a32d592dc58b457",
                "sha256": "05a5069a1b62b325c6953214d4f959e61dded119e1d1021b7d90aaf47b82a6d5"
            },
            "downloads": -1,
            "filename": "islenska-1.0.3-cp312-cp312-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "fd4f8fea125d1a558a32d592dc58b457",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.9",
            "size": 50099335,
            "upload_time": "2024-08-26T17:16:29",
            "upload_time_iso_8601": "2024-08-26T17:16:29.502802Z",
            "url": "https://files.pythonhosted.org/packages/75/ed/c240f35652bdd95466a9f8ccd260a8cad1e29ec230893934f86a254c87cb/islenska-1.0.3-cp312-cp312-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "007c3119b15eac12e5c430fd3a771702998bd7aee1735ed4b44b61fd6bcfbdad",
                "md5": "12df10968ebf4687e5d389e77d75cb54",
                "sha256": "24d645616cdd7a898f5f352b60ff34d339db643af9eb0132b3709e0314192c07"
            },
            "downloads": -1,
            "filename": "islenska-1.0.3-cp312-cp312-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "12df10968ebf4687e5d389e77d75cb54",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.9",
            "size": 50099590,
            "upload_time": "2024-08-26T17:16:38",
            "upload_time_iso_8601": "2024-08-26T17:16:38.086777Z",
            "url": "https://files.pythonhosted.org/packages/00/7c/3119b15eac12e5c430fd3a771702998bd7aee1735ed4b44b61fd6bcfbdad/islenska-1.0.3-cp312-cp312-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a97f325e8cc9e510f28e7b71c94bdb380653131f7eafea0bf88623487003d6c8",
                "md5": "5e3c51754e408c56bd6c5ec135ca8e03",
                "sha256": "40f9cd87a789b4c52c4c2ef73cc590bcd9397230c67cb1193b2500c180e66160"
            },
            "downloads": -1,
            "filename": "islenska-1.0.3-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "5e3c51754e408c56bd6c5ec135ca8e03",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.9",
            "size": 50117582,
            "upload_time": "2024-08-26T17:16:46",
            "upload_time_iso_8601": "2024-08-26T17:16:46.623177Z",
            "url": "https://files.pythonhosted.org/packages/a9/7f/325e8cc9e510f28e7b71c94bdb380653131f7eafea0bf88623487003d6c8/islenska-1.0.3-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f910a492692474572ecf713eaa563b0f74cf0a7df303e12929e0b92e1c5d23ee",
                "md5": "201e35538ae2c89cec0f1c2a92db8eb0",
                "sha256": "be64aa0de203df90540d810bec92ac601941742fd187f83192a58aa3ba3d2fd2"
            },
            "downloads": -1,
            "filename": "islenska-1.0.3-cp312-cp312-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "201e35538ae2c89cec0f1c2a92db8eb0",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.9",
            "size": 50101837,
            "upload_time": "2024-08-26T17:16:55",
            "upload_time_iso_8601": "2024-08-26T17:16:55.634637Z",
            "url": "https://files.pythonhosted.org/packages/f9/10/a492692474572ecf713eaa563b0f74cf0a7df303e12929e0b92e1c5d23ee/islenska-1.0.3-cp312-cp312-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5eb439c32b620e1503d9a60aeaa98ce05fcccd3dbb6f34465e7e15945672c20d",
                "md5": "a1d095fb5c94126d017e247d6ff5cb00",
                "sha256": "f7c7892f35768f93c682b1badff3875002a00582d7811a29a01c5d29707a8f4b"
            },
            "downloads": -1,
            "filename": "islenska-1.0.3-cp313-cp313-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "a1d095fb5c94126d017e247d6ff5cb00",
            "packagetype": "bdist_wheel",
            "python_version": "cp313",
            "requires_python": ">=3.9",
            "size": 50099328,
            "upload_time": "2024-08-26T17:17:06",
            "upload_time_iso_8601": "2024-08-26T17:17:06.616589Z",
            "url": "https://files.pythonhosted.org/packages/5e/b4/39c32b620e1503d9a60aeaa98ce05fcccd3dbb6f34465e7e15945672c20d/islenska-1.0.3-cp313-cp313-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b21e233939189641a109ecfaf761247447bbd47df0f703b8f6b05272fdcb95c2",
                "md5": "bd0a4cef5d6ea2a4d43efb940dbd2f67",
                "sha256": "e7b82f220b147b86610608906856018a295e07c92267c734c8eb793fec2fe2f0"
            },
            "downloads": -1,
            "filename": "islenska-1.0.3-cp313-cp313-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "bd0a4cef5d6ea2a4d43efb940dbd2f67",
            "packagetype": "bdist_wheel",
            "python_version": "cp313",
            "requires_python": ">=3.9",
            "size": 50099590,
            "upload_time": "2024-08-26T17:17:17",
            "upload_time_iso_8601": "2024-08-26T17:17:17.006298Z",
            "url": "https://files.pythonhosted.org/packages/b2/1e/233939189641a109ecfaf761247447bbd47df0f703b8f6b05272fdcb95c2/islenska-1.0.3-cp313-cp313-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0dc148586cfc85c499d2b0d59cdb0e493c02790c46cb1324eba2a1bb779c2b51",
                "md5": "f5bf8605a3aeebaa20ba910ebcd681da",
                "sha256": "5571185f13f2370b2ee5befa8bf8702e716a9930dd5c25f4fa2b1980b0d7b507"
            },
            "downloads": -1,
            "filename": "islenska-1.0.3-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "f5bf8605a3aeebaa20ba910ebcd681da",
            "packagetype": "bdist_wheel",
            "python_version": "cp313",
            "requires_python": ">=3.9",
            "size": 50117555,
            "upload_time": "2024-08-26T17:17:25",
            "upload_time_iso_8601": "2024-08-26T17:17:25.700883Z",
            "url": "https://files.pythonhosted.org/packages/0d/c1/48586cfc85c499d2b0d59cdb0e493c02790c46cb1324eba2a1bb779c2b51/islenska-1.0.3-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "86263708b9ffbba1016195ea492ec92c668b637619e83959aa7ed19a82e9b4c6",
                "md5": "7fc279384478d1867f1d562f9576b080",
                "sha256": "1e52792ac76be9e2b50fcfcc1a93fc5879722cdcb405ac56b83366a49a9b1fd1"
            },
            "downloads": -1,
            "filename": "islenska-1.0.3-cp313-cp313-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "7fc279384478d1867f1d562f9576b080",
            "packagetype": "bdist_wheel",
            "python_version": "cp313",
            "requires_python": ">=3.9",
            "size": 50101841,
            "upload_time": "2024-08-26T17:17:33",
            "upload_time_iso_8601": "2024-08-26T17:17:33.590573Z",
            "url": "https://files.pythonhosted.org/packages/86/26/3708b9ffbba1016195ea492ec92c668b637619e83959aa7ed19a82e9b4c6/islenska-1.0.3-cp313-cp313-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5c7995c4c0264fb90b173eea575cc60837b0d28ea984842b86e23f76b944db60",
                "md5": "edf59883f7af5c83f6b38b4667693084",
                "sha256": "505b016b8fe65b43d5a8010731c6fffd004e44cf665a700bb80eb3ed2981b6d8"
            },
            "downloads": -1,
            "filename": "islenska-1.0.3-cp39-cp39-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "edf59883f7af5c83f6b38b4667693084",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.9",
            "size": 50099327,
            "upload_time": "2024-08-26T17:17:42",
            "upload_time_iso_8601": "2024-08-26T17:17:42.487808Z",
            "url": "https://files.pythonhosted.org/packages/5c/79/95c4c0264fb90b173eea575cc60837b0d28ea984842b86e23f76b944db60/islenska-1.0.3-cp39-cp39-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "30b551fa43084406c56e4e5074e2c9066f31a2a0d5708e05419d654d895b35fa",
                "md5": "c4c46a4ffb4bc5c2d4bce282360916ca",
                "sha256": "27dd08989b548cf34530020195d7c94f93a677999da55dabec15898501be5b94"
            },
            "downloads": -1,
            "filename": "islenska-1.0.3-cp39-cp39-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "c4c46a4ffb4bc5c2d4bce282360916ca",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.9",
            "size": 50099591,
            "upload_time": "2024-08-26T17:17:51",
            "upload_time_iso_8601": "2024-08-26T17:17:51.971323Z",
            "url": "https://files.pythonhosted.org/packages/30/b5/51fa43084406c56e4e5074e2c9066f31a2a0d5708e05419d654d895b35fa/islenska-1.0.3-cp39-cp39-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "42def46f8f035c6e521c6f197a8c0e9aaae595f402b2eaa957e00a4f93dc9aeb",
                "md5": "3fc831573063cfbc6bff06961496a921",
                "sha256": "438a99716f88ccbd34d00dc16731b95644970ff6ee973e2e11ca804a6bab25e9"
            },
            "downloads": -1,
            "filename": "islenska-1.0.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "3fc831573063cfbc6bff06961496a921",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.9",
            "size": 50117305,
            "upload_time": "2024-08-26T17:18:00",
            "upload_time_iso_8601": "2024-08-26T17:18:00.391565Z",
            "url": "https://files.pythonhosted.org/packages/42/de/f46f8f035c6e521c6f197a8c0e9aaae595f402b2eaa957e00a4f93dc9aeb/islenska-1.0.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "285b6bbbf97cfd29293cec7a6d922c9bde0737ff5b28c45c470c5fa5bc5704a2",
                "md5": "26ab8a9271ca11818549b62193913735",
                "sha256": "1f0ea873ac1dab93fb603e6db34f5f129029284490fca99530bbd55f519aaf8a"
            },
            "downloads": -1,
            "filename": "islenska-1.0.3-cp39-cp39-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "26ab8a9271ca11818549b62193913735",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.9",
            "size": 50101832,
            "upload_time": "2024-08-26T17:18:09",
            "upload_time_iso_8601": "2024-08-26T17:18:09.111055Z",
            "url": "https://files.pythonhosted.org/packages/28/5b/6bbbf97cfd29293cec7a6d922c9bde0737ff5b28c45c470c5fa5bc5704a2/islenska-1.0.3-cp39-cp39-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "afb8d4dbbb0ade6c35ab5ca428d006e32fc740aef511e1c69e2048f8ea294b1c",
                "md5": "53dc9eaacc549c76107153fcaaec17d2",
                "sha256": "a10c637a7514887944d9289f33c7881ea31afdcde1855fddcef14859a7ece534"
            },
            "downloads": -1,
            "filename": "islenska-1.0.3-pp310-pypy310_pp73-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "53dc9eaacc549c76107153fcaaec17d2",
            "packagetype": "bdist_wheel",
            "python_version": "pp310",
            "requires_python": ">=3.9",
            "size": 50097987,
            "upload_time": "2024-08-26T17:18:22",
            "upload_time_iso_8601": "2024-08-26T17:18:22.744563Z",
            "url": "https://files.pythonhosted.org/packages/af/b8/d4dbbb0ade6c35ab5ca428d006e32fc740aef511e1c69e2048f8ea294b1c/islenska-1.0.3-pp310-pypy310_pp73-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "41a3cf2f023721ab29becf76609225ea8d7901bcacb954b535cf60e0be9570af",
                "md5": "f37827322befb4a2a2dedfc61f71b93a",
                "sha256": "d70d3e5dae30ba651d5841ea27337d56ff3598f95e92d4b31adb46050aa6f5ab"
            },
            "downloads": -1,
            "filename": "islenska-1.0.3-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "f37827322befb4a2a2dedfc61f71b93a",
            "packagetype": "bdist_wheel",
            "python_version": "pp310",
            "requires_python": ">=3.9",
            "size": 50099692,
            "upload_time": "2024-08-26T17:18:32",
            "upload_time_iso_8601": "2024-08-26T17:18:32.516619Z",
            "url": "https://files.pythonhosted.org/packages/41/a3/cf2f023721ab29becf76609225ea8d7901bcacb954b535cf60e0be9570af/islenska-1.0.3-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7bd0fb3a06875ad3da5af67a17d9fc5cd69dd65bbf2e8997ea3428a2783beaae",
                "md5": "c634490b7065444fecdd8013323d5e67",
                "sha256": "4b84b30dc7db8be6fee00d08627972d7a765111b3fefb27e7da82cd338c0d4d9"
            },
            "downloads": -1,
            "filename": "islenska-1.0.3-pp310-pypy310_pp73-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "c634490b7065444fecdd8013323d5e67",
            "packagetype": "bdist_wheel",
            "python_version": "pp310",
            "requires_python": ">=3.9",
            "size": 50107258,
            "upload_time": "2024-08-26T17:18:41",
            "upload_time_iso_8601": "2024-08-26T17:18:41.188841Z",
            "url": "https://files.pythonhosted.org/packages/7b/d0/fb3a06875ad3da5af67a17d9fc5cd69dd65bbf2e8997ea3428a2783beaae/islenska-1.0.3-pp310-pypy310_pp73-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1512c8854ea5dc872f724a9fded2235b70f4493ecfad5a74067722618b0a6593",
                "md5": "13194ae93a320e1d00f5546b75c266f9",
                "sha256": "41d84f251467accf61ec1f8278f5bf59a235f3fd85e0f42e087d1d748c30402c"
            },
            "downloads": -1,
            "filename": "islenska-1.0.3-pp39-pypy39_pp73-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "13194ae93a320e1d00f5546b75c266f9",
            "packagetype": "bdist_wheel",
            "python_version": "pp39",
            "requires_python": ">=3.9",
            "size": 50097986,
            "upload_time": "2024-08-26T17:18:49",
            "upload_time_iso_8601": "2024-08-26T17:18:49.672986Z",
            "url": "https://files.pythonhosted.org/packages/15/12/c8854ea5dc872f724a9fded2235b70f4493ecfad5a74067722618b0a6593/islenska-1.0.3-pp39-pypy39_pp73-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "aba1e9e92136310b5e44910628305cb74c0dc8181348fcbce336f47045223e9a",
                "md5": "e84ecb712ae41a74661d735f56cc1c10",
                "sha256": "945c55864554316e71e63f22e1bd6e6b82a64e2b431a6f4259e7d9ca80e2a873"
            },
            "downloads": -1,
            "filename": "islenska-1.0.3-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "e84ecb712ae41a74661d735f56cc1c10",
            "packagetype": "bdist_wheel",
            "python_version": "pp39",
            "requires_python": ">=3.9",
            "size": 50099686,
            "upload_time": "2024-08-26T17:18:58",
            "upload_time_iso_8601": "2024-08-26T17:18:58.448378Z",
            "url": "https://files.pythonhosted.org/packages/ab/a1/e9e92136310b5e44910628305cb74c0dc8181348fcbce336f47045223e9a/islenska-1.0.3-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "58f74bcb44dbfcf1f88e014f119bc6f9ae011c8de5a53c25ebfbc20918f10968",
                "md5": "750e3be3a4abcd34b9173d5076adc71d",
                "sha256": "486979d3b28a64683571bb2dec3fd538aad792d1a66ee7a338075cf227912624"
            },
            "downloads": -1,
            "filename": "islenska-1.0.3-pp39-pypy39_pp73-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "750e3be3a4abcd34b9173d5076adc71d",
            "packagetype": "bdist_wheel",
            "python_version": "pp39",
            "requires_python": ">=3.9",
            "size": 50107256,
            "upload_time": "2024-08-26T17:19:09",
            "upload_time_iso_8601": "2024-08-26T17:19:09.537902Z",
            "url": "https://files.pythonhosted.org/packages/58/f7/4bcb44dbfcf1f88e014f119bc6f9ae011c8de5a53c25ebfbc20918f10968/islenska-1.0.3-pp39-pypy39_pp73-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-26 17:15:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mideind",
    "github_project": "BinPackage",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "islenska"
}
        
Elapsed time: 0.57632s