Skip to main content

French lemma prediction and derivative form generation with ONNX Runtime.

Project description

pyfrspell

Python package for French lemma prediction and derivative form generation, ported from FR-SPELL and bundled with ONNX INT8 model files.

Install

pip3 install pyfrspell

Quick Start

from pyfrspell import FrSpell

predictor = FrSpell()

lemma = predictor.lemma("mangeons")
noun = predictor.noun_derive("chat", "THD_PLF")
adje = predictor.adje_derive("beau", "THD_F")
verb = predictor.verb_derive("manger", "FST_PL", "INDI", "PRES")

print(lemma)
print(noun)
print(adje)
print(verb)

API

  • predictor.lemma(input_word)
  • predictor.noun_derive(lemma, person)
  • predictor.adje_derive(lemma, person)
  • predictor.verb_derive(lemma, person, mode, tense)
  • predictor.derive(lemma, word_type, person, mode, tense)

Allowed word_type values:

  • NOUN
  • ADJE
  • VERB

Allowed person values:

  • FST
  • SND
  • THD_M
  • THD_F
  • FST_PL
  • SND_PL
  • THD_PLM
  • THD_PLF

Allowed mode values:

  • INDI
  • SUBJ
  • COND
  • PART
  • IMPE
  • INFI

Allowed tense values in current implementation:

  • PRES
  • IMPA
  • FUTU
  • PASS

Package Build (for PyPI upload)

python -m pip install --upgrade build
python -m build

Generated artifacts:

  • dist/pyfrspell-<version>-py3-none-any.whl
  • dist/pyfrspell-<version>.tar.gz

Then upload to PyPI:

python -m pip install --upgrade twine
python -m twine upload dist/*

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

pyfrspell-0.1.0.tar.gz (2.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyfrspell-0.1.0-py3-none-any.whl (2.8 MB view details)

Uploaded Python 3

File details

Details for the file pyfrspell-0.1.0.tar.gz.

File metadata

  • Download URL: pyfrspell-0.1.0.tar.gz
  • Upload date:
  • Size: 2.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for pyfrspell-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d5529de30aeb435f066f2d3a74a526561fb0a640e3cc28a8dcb306206ea276ac
MD5 83c5796425c0ec791ab1de198ec8c601
BLAKE2b-256 05776ac4e5ae18297405bb249e5f299c28f72702a7fc9838ff23f153adf21444

See more details on using hashes here.

File details

Details for the file pyfrspell-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyfrspell-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for pyfrspell-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a2b1462442c420ce2e381e4226a8fa8ff7e927298196fa0a86d26df532167030
MD5 2b315911a250f8e9461907cee07a00de
BLAKE2b-256 e891ec9985d31efee91460dd0341250b1cdc198d1820587fcff449853378f4cd

See more details on using hashes here.

Supported by

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