Repository navigation
Historic French model v6 for Spacy 3.8
Improvements
Compared with v5 on the same test data:
| Test set | v5 POS / TAG / Lemma | v6 POS / TAG / Lemma |
|---|---|---|
| Hand-corrected gold (99 sentences) | 98.15% / 97.63% / 98.11% | 98.02% / 97.57% / 98.03% |
| Second gold set (100 sentences) | 97.49% / 96.58% / 97.36% | 97.63% / 96.66% / 97.76% |
| Held-out test set (4,999 sentences) | 98.38% / 97.74% / 97.26% | 98.50% / 97.85% / 97.53% |
| Sequoia (modern French) | 95.03% / – / 93.84% | 95.39% / – / 93.95% |
On the hand-corrected gold, v6 is a few tokens lower, within the variation between training runs.
What Changed
The model now uses spaCy's French tokenizer adapted to historic printing:
- Dashes are split from words, both dialogue dashes printed as a single hyphen (
-Mais→-+Mais) and dashes printed as--,---or—(---Oui,monde.--je). - Words spaCy keeps whole stay whole in any capitalization (
Peut-être,Celui-ci) and in historic spellings (peut-estre,aujourd'huy,celuy-cy,luy-mesme). Every pronoun + même form (moi-même,eux-mêmes) andceux-ciare kept whole too. - Clitics spaCy missed are split off:
as-tu→as+-tu, likewise -elles, -le, -la, -les, -lui, -leur, -y, -toi;Est-il→Est+-il; and elided clitics after a hyphen, as ina-t'il→a+-t'+il,va-t'en,donne-m'en.
The training annotations were tokenized the same way before retraining, so these tokens now get proper labels: -tu is PRON with lemma tu, luy-mesme has lemma lui-même. Token boundaries for these forms differ from v5's. The tokenizer rules are saved in the model, so it loads with spacy.load as before.
Performance by Century
| Period | POS | TAG | Lemma |
|---|---|---|---|
| 1500-1600 | 97.52% | 96.93% | 95.05% |
| 1600-1700 | 98.59% | 97.67% | 97.41% |
| 1700-1800 | 98.88% | 98.20% | 98.27% |
| 1800-1900 | 98.81% | 98.27% | 98.59% |
| 1900-2000 | 98.75% | 98.27% | 98.49% |
The test data were retokenized for this release, so these scores can't be compared with the figures in the v5 release notes.
Requirements: spaCy >=3.8.5,<3.9.0 and spacy-transformers