deepparse model2vec-32m
A deepparse address parser (Seq2Seq, without attention mechanism) using the minishlab/potion-base-32M Model2Vec static embeddings (512 dimensions).
from deepparse.parser import AddressParser
address_parser = AddressParser(model_type="model2vec-32m")
address_parser("350 rue des Lilas Ouest Québec Québec G1L 1B6")
Install it with pip install deepparse[model2vec].
Training
- Data: the deepparse/worldwide-addresses dataset
(20 countries, 100,000 clean and 50,000 incomplete addresses per country), 90% for training and 10% for validation.
SuburbandDistrictare mapped toMunicipality, and theCountyandCountrywords are removed. - Architecture: encoder and decoder hidden size 1024, one layer each.
- Selection: the hidden size (128, 256, 512 or 1024) with the lowest mean validation loss over 5 seeds, then the seed with the lowest validation loss (seed 46, best epoch 86).
Results
| Accuracy (%) | |
|---|---|
| Test, this model | 98.73 |
| Test, mean ± std over the 5 seeds of this configuration | 98.04 ± 0.50 |
| Validation, this model | 98.94 |
The accuracy is the per-word tag accuracy on the test split of the rebuilt worldwide-addresses data.
Limitations
The source data has no Orientation nor GeneralDelivery tags: the model has these outputs but never predicts them
(the street orientation, e.g. Ouest or NW, is part of the StreetName). South Korea has almost only incomplete
addresses.