Skip to main content

Lookup AT&T-format FSTs

Project description

FST Lookup

Build Status

Implements lookup for gzip'd AT&T format finite state transducers (FOMA saves in this format).

Supports Python 3.5 and up.

Usage

Import the library, and load an FST from a file:

>>> from fst_lookup import FST
>>> fst = FST.from_file('eat.fst')

Then call fst.lookup() on whatever surface form you want to analyze; fst.lookup() is a generator, so you must call list() to get back a list.

>>> list(sorted(fst.lookup('eats')))
[('eat', '+N', '+Mass'),
 ('eat', '+V', '+3P', '+Sg')]

License

Copyright © 2019 Eddie Antonio Santos. Released under the terms of the Apache license. See LICENSE for more info.

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

fst-lookup-2019.1.22a0.tar.gz (6.2 kB view hashes)

Uploaded Source

Built Distribution

fst_lookup-2019.1.22a0-py3-none-any.whl (9.0 kB view hashes)

Uploaded Python 3

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