deepparse FastText Attention

A deepparse address parser (Seq2Seq, with attention mechanism) using the French fastText Common Crawl word embeddings (cc.fr.300.bin, with character n-grams).

from deepparse.parser import AddressParser

address_parser = AddressParser(model_type="fasttext", attention_mechanism=True)
address_parser("350 rue des Lilas Ouest Québec Québec G1L 1B6")

Architecture

One-layer LSTM encoder and decoder, hidden size 1,024, fastText embeddings of 300 dimensions, with an attention mechanism. The model predicts 8 tags (StreetNumber, StreetName, Unit, Municipality, Province, PostalCode, Orientation and GeneralDelivery) and the end-of-sequence tag.

Training

Trained in 2020 on the dataset described in the deepparse-address-data repository (addresses of 20 countries, built from the libpostal data). See Leveraging Subword Embeddings for Multinational Address Parsing and Multinational Address Parsing: A Zero-Shot Evaluation.

Results

  • 41 zero-shot countries: 87.83% mean per-country accuracy (46.91% to 99.61%).
  • On the 20 training countries, the attention mechanism improves the accuracy by around 0.5%.

Per-country tables: the Results page of the documentation.

Limitations

  • On the test split of the newer worldwide-addresses data (same 20 countries, clean and incomplete addresses, 260,000 addresses), this model reaches 76.91% per-word accuracy (measured in November 2026). It is weaker on incomplete addresses (e.g. a postal code or a municipality alone) than on complete ones.
  • In practice, it rarely predicts the Orientation and GeneralDelivery tags: in November 2026, it predicted neither on 12,000 addresses of the worldwide-addresses test split.

Citation

@misc{yassine2020leveraging,
    title={{Leveraging Subword Embeddings for Multinational Address Parsing}},
    author={Marouane Yassine and David Beauchemin and François Laviolette and Luc Lamontagne},
    year={2020},
    eprint={2006.16152},
    archivePrefix={arXiv}
}
Downloads last month
251
Safetensors
Model size
15.9M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Papers for deepparse/fasttext-attention