Views
No views yet
1from transformers import pipeline
2
3normalizer = pipeline(model="rayondemiel/freem-modernizer-lstm", trust_remote_code=True)
4
5# Single input
6result = normalizer("Elle haïſſoit particulierement le Cardinal de Lorraine;")
7print(result)
8
9# List of inputs
10inputs = ["Elle haïſſoit particulierement le Cardinal de Lorraine;",
11 "Adieu, i'iray chez vous tantoſt vous rendre grace."]
12outputs = normalizer(inputs)
13print(outputs)
14
15# With CUDA and batch processing
16normalizer = pipeline(
17 model="rayondemiel/freem-modernizer-lstm",
18 trust_remote_code=True,
19 device=0, # Use first CUDA device
20 batch_size=16 # Process 16 sentences at once
21)Architecture: LSTM
Vocabulary Size: 4000
Training Data: Freem corpus
Tokenizer: SentencePiece
Embedding Size: 384
Hidden Size: 768checkpoint_best.pt: Trained model finetuned weightsbpe_joint_4000.model: Sentencepiece model filedata_norm_bin_4000/: fairseq datapip install torch==2.5.1 --index-url https://download.pytorch.org/whl/cu118
transformers>=?
fairseq==0.12.2
torch==2.5.1
omegaconf==2.0.5
gdown==4.2.0
sentencepiece==0.2.0
numpy==1.25.2**Rachel Bawden, Jonathan Poinhos, Eleni Kogkitsidou, Philippe Gambette, Benoît Sagot, Simon Gabay** (2022). *Automatic Normalisation of Early Modern French*. In *Proceedings of the Thirteenth Language Resources and Evaluation Conference*, Marseille, France, European Language Resources Association. [Lien](https://aclanthology.org/2022.lrec-1.358/).