Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Python bindings for SFST focusing on transducer usage

License

NotificationsYou must be signed in to change notification settings

zentrum-lexikographie/sfst-transduce

Repository files navigation

Python bindings for SFST focusing on transducer usage

PyPI – VersionPyPI - Python VersionPyPI - WheelGitHub License

A Python library providing bindings for the Stuttgart Finite State Transducersystem with a focus on the usage of compiled and serialized transducers,excluding code for transducer development and testing, which reduces compile andruntime dependencies.

Should you need theSFSTtools for transducergeneration, please take a look at their homepage for installation and usageinstructions.

Installation

sfst-transduce is available atPyPI:

pip install sfst-transduce

Usage

importsfst_transduce# Create instance from compiled transducertransducer=sfst_transduce.Transducer('path/to/fst.a')# Analysisanalysis_results=transducer.analyse("easier")# Returns ['easy<ADJ><comp>'] for example.# Generate a string. results are a list of analysis.generate_results=transducer.generate("easy<ADJ><comp>")# Returns ['easier'] for example.# Create instance from compiled transducer (compacted serialisation)transducer=sfst_transduce.CompactTransducer('path/to/fst.ca')# Activate output of aligned input and output layertransducer.both_layers=True# Analysistransducer.analyse('easier')# Returns ['easy:i<ADJ>:<><comp>:e<>:r'] for example.

Development

pip install -e.pip install -r requirements-dev.txtpre-commit install

Release

scripts/release$NEW_VERSIONgit push&& git push --tags

Credits

TheSFST tools have beenimplemented by Helmut Schmid, Institute for Computational Linguistics,University of Stuttgart, Germany and they are available under the GNU publiclicense version 2 or higher.

Please cite the following publication if you want to refer to the SFST tools:

Schmid, Helmut. "A programming language for finite state transducers." FSMNLP.Vol. 4002. 2005.pdf

This Python library is a fork of the excellentSFSTadaptation by Santhosh Thottingal, changingthe focus of the Python part.


[8]ページ先頭

©2009-2025 Movatter.jp