Skip to main content

A light-weight NLP library for Finnish language

Project description

Akrikola

An early version of a light-weight NLP library for Finnish language.

Use case

In Finnish language the rules for selecting noun cases "in", "from" and "into" for municipality names are complicated. Even Finns have problem selecting the correct case when using a less common municipality name. In Finland there are over 300 municipalities. This library provides correct case endings.

Use case explained in Finnish / Käyttötarkoitus suomeksi

Suomalaisten kuntien, kaupunkien ja muiden asutusten nimiä taivutetaan siten kuin paikkakunnalla on totuttu taivuttamaan. Tämä kirjasto taivuttaa suomalaisten kuntien nimet sisä- ja ulkopaikallissijoissa sekä partitiivissa ja genetiivissä. Lisäksi kirjastolla voi tunnistaa kuntien nimiä kaikissa mainituissa taivutusmuodoissa.

Using Akrikola

To conjugate municipalities just import Municipality class and create an instance with the name of the municipality.

from akrikola import Municipality

town = Municipality("Ylivieska")
print(town.departure)
print(town.destination)
print(town.at)

Will produce:

Ylivieska
Ylivieskaan
Ylivieskassa

Also nominative, partitive and genetive forms can be produced:

city = Municipality("Kauniainen")
print(city.name)
print(city.partitive)
print(city.genetive)
print(city.in_swedish)

Will produce:

Kauniainen
Kauniaista
Kauniaisten
Grankulla

Note that the class will throw KeyError at instance creation if the word is not a name of a municipality.

To check if a word is a municipality name in any the six recognized noun cases (plus in swedish):

from akrikola import Municipality

Municipality.exists("Hattula")
# return True
Municipality.exists("Hattula")
# return False

Author

This project is licensed under the terms of the GNU Lesser General Public License v3.0 (GNU LGPLv3). See LICENSE.txt for more information.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

akrikola-0.1.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

akrikola-0.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file akrikola-0.1.tar.gz.

File metadata

  • Download URL: akrikola-0.1.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.9

File hashes

Hashes for akrikola-0.1.tar.gz
Algorithm Hash digest
SHA256 eee9c3a01dd8b50d544e06f8d1e9d8971371172432cdbb26637c774e8b422efd
MD5 48c0f3328c6bb00ba152a1ee88e76b49
BLAKE2b-256 52efbfab729d1230755d96a283e5e17e34aa396cac04a7ab3e4d3b6736230f16

See more details on using hashes here.

File details

Details for the file akrikola-0.1-py3-none-any.whl.

File metadata

  • Download URL: akrikola-0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.9

File hashes

Hashes for akrikola-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e840844862084e3f5f4c14606db74a1438879aabf1dc684a3a07b0ec7177c65e
MD5 dd9231bcd20ddfb7ac25a18489c3d50a
BLAKE2b-256 7f62e1d0f36b6c9e9f77c30650df8db9b14793f6ff737a535352d5d0066202d5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page