Skip to main content

A pure-python implementation of the Omorfi library that provides Finnish morphological analysis

Project description

PyOmorfi

This is a pure-python implementation of Omorfi, a free and open source morphological analyzer for Finnish.

Most of the files have been copied from the Omorfi repository. HFST has been replaced with KFST, a pure-python implementation of finite state transducers.

This package includes a pre-built transducer, so you don't need to build the transducer yourself. For most part, this library should be a drop-in replacement for Omorfi.

Installation

Pyomorfi is available on PyPI and can be installed with pip:

pip install pyomorfi

Usage

PyOmorfi has the same API as Omorfi, so you can use it in the same way as Omorfi. Please refer to the Omorfi documentation for more information. Just import pyomorfi.omorfi instead of omorfi.

from pyomorfi.omorfi import Omorfi

omorfi = Omorfi()
omorfi.load_analyser("omorfi.analyse.att")

analyses = omorfi.analyse("kissa")

There is also a function that loads the built-in transducers and returns an Omorfi object:

from pyomorfi import load_omorfi

omorfi = load_omorfi()

analyses = omorfi.analyse("kissa")

Development

This package is in very early stages of its development and there are probably many bugs. Please report them if you find them!

If you want to contribute code, feel free to open pull requests.

License

PyOmorfi is licensed under the GNU GPL version 3. See the LICENSE file for details.

Project details


Download files

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

Source Distribution

pyomorfi-0.9.9a0.tar.gz (15.5 MB view details)

Uploaded Source

Built Distribution

pyomorfi-0.9.9a0-py3-none-any.whl (15.7 MB view details)

Uploaded Python 3

File details

Details for the file pyomorfi-0.9.9a0.tar.gz.

File metadata

  • Download URL: pyomorfi-0.9.9a0.tar.gz
  • Upload date:
  • Size: 15.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for pyomorfi-0.9.9a0.tar.gz
Algorithm Hash digest
SHA256 6ed8c4ad9986f81438b0ff27a6d7c62b7a6d7b3ee16da0add9e80706ca460006
MD5 1fbb958b8213933e2fbded2f7b8d45c4
BLAKE2b-256 6dfb4f923fb6f1c38746bd5a583574f17c8daacf9438ce68cc1819ac8f9dcb6c

See more details on using hashes here.

File details

Details for the file pyomorfi-0.9.9a0-py3-none-any.whl.

File metadata

  • Download URL: pyomorfi-0.9.9a0-py3-none-any.whl
  • Upload date:
  • Size: 15.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for pyomorfi-0.9.9a0-py3-none-any.whl
Algorithm Hash digest
SHA256 957622922f51d81956d4d47a008f41e4edcf35417f95db88f828e67c6624fc7a
MD5 1bc6a35473040931c33d6418ad2c25fe
BLAKE2b-256 94855c6b463c4c00a77258658974957c2f45941714836de1d28e13c713e6ef27

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