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:
NOUNADJEVERB
Allowed person values:
FSTSNDTHD_MTHD_FFST_PLSND_PLTHD_PLMTHD_PLF
Allowed mode values:
INDISUBJCONDPARTIMPEINFI
Allowed tense values in current implementation:
PRESIMPAFUTUPASS
Package Build (for PyPI upload)
python -m pip install --upgrade build
python -m build
Generated artifacts:
dist/pyfrspell-<version>-py3-none-any.whldist/pyfrspell-<version>.tar.gz
Then upload to PyPI:
python -m pip install --upgrade twine
python -m twine upload dist/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5529de30aeb435f066f2d3a74a526561fb0a640e3cc28a8dcb306206ea276ac
|
|
| MD5 |
83c5796425c0ec791ab1de198ec8c601
|
|
| BLAKE2b-256 |
05776ac4e5ae18297405bb249e5f299c28f72702a7fc9838ff23f153adf21444
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2b1462442c420ce2e381e4226a8fa8ff7e927298196fa0a86d26df532167030
|
|
| MD5 |
2b315911a250f8e9461907cee07a00de
|
|
| BLAKE2b-256 |
e891ec9985d31efee91460dd0341250b1cdc198d1820587fcff449853378f4cd
|