NER Travel Order
French entity extraction system using CamemBERT fine-tuning
Problem
Travel order processing required manual extraction of key entities (departure location, arrival location, dates, transportation type) from unstructured French text. This was time-consuming, error-prone, and didn't scale for batch processing.
Solution
Built a production-ready NER pipeline using CamemBERT (French BERT variant) with token-level classification and BIO tagging scheme. The system:
- Fine-tuned CamemBERT on 413 annotated French travel order sentences
- Token classification with BIO tagging (Begin, Inside, Outside) for 6 entity types: DEP, ARR, TEMP, TRANSPORT, PER, MISC
- Evaluation-first approach: entity-level F1, precision, recall metrics (not token-level)
- Production pipeline: inference optimized for batch and real-time processing
- Bilingual support: French text input with structured JSON output
Results & Metrics
413
Training Sentences
6
Entity Types
70/15/15
Train/Val/Test Split
Technology Stack
CamemBERT
Hugging Face
PyTorch
spaCy
Python
seqeval
JSON
Flask
Key Learnings
- French NLP matters: CamemBERT outperforms multilingual models on French-specific text
- Entity-level evaluation is crucial: Token-level accuracy hides extraction failures; entity F1 is the real metric
- Annotation quality drives performance: Small, high-quality dataset beats large, noisy one
- BIO tagging disambiguation: Careful label scheme design prevents entity boundary errors
- Production readiness: Inference optimization + versioning + monitoring separate research from deployment