Metadata-Version: 2.4
Name: lectura-p2g
Version: 4.6.3
Summary: Pipeline P2G complet du francais — Graphemiseur + Formules + Noms propres (IPA -> orthographe)
Author-email: Max Carriere <admin@lectura.world>
License: AGPL-3.0-or-later
Project-URL: Homepage, https://www.lectura.world/developpement/modules/
Project-URL: Repository, https://github.com/maxcarriere/lectura-modules/tree/main/P2G-Pipeline
Project-URL: Issues, https://github.com/maxcarriere/lectura-modules/issues
Keywords: p2g,phoneme-to-grapheme,inverse-g2p,french,nlp,phonetics,ipa,orthography,speech-to-text
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Classifier: Natural Language :: French
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Text Processing :: Linguistic
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENCE.txt
Requires-Dist: lectura-graphemiseur>=4.3
Requires-Dist: lectura-formules>=3.7
Requires-Dist: lectura-lexique>=1.4
Provides-Extra: aligneur
Requires-Dist: lectura-aligneur>=4.0; extra == "aligneur"
Dynamic: license-file

# lectura-p2g

Pipeline P2G complet du francais : Graphemiseur + Formules + Noms propres (IPA -> orthographe).

Couche 2 du pipeline P2G, en miroir de `lectura-g2p` pour le G2P.

## Installation

```bash
pip install lectura-p2g              # pipeline complet
pip install lectura-p2g[aligneur]    # + alignement grapheme-phoneme
```

## Usage

```python
from lectura_p2g import analyser, creer_engine

engine = creer_engine()
result = analyser(["le", "sha", "eh", "bon"], engine=engine)
print(result["ortho"])
```

### Avec alignement

```python
from lectura_p2g import analyser, creer_engine
from lectura_aligneur.lectura_aligneur import LecturaSyllabeur

engine = creer_engine()
syl = LecturaSyllabeur()
result = analyser(["bɔ̃ʒuʁ"], engine=engine, aligner=syl)
print(result["alignments"][0].syllabes)
```

## Architecture

- **Couche 1** : `lectura-graphemiseur` — modele P2G core (lex_select + coherence morpho + accents)
- **Couche 2** : `lectura-p2g` — pipeline complet (graphemiseur + formules + noms propres)

## Licence

AGPL-3.0-or-later — voir [LICENCE.txt](LICENCE.txt).

**Licence commerciale et modeles locaux disponibles** — contacter [admin@lectura.world](mailto:admin@lectura.world).
