davebulaval commited on
Commit
4d851bb
·
verified ·
1 Parent(s): d38ddcd

Add the model card

Browse files
Files changed (1) hide show
  1. README.md +56 -4
README.md CHANGED
@@ -2,10 +2,62 @@
2
  tags:
3
  - model_hub_mixin
4
  - pytorch_model_hub_mixin
 
 
5
  license: mit
 
6
  ---
7
 
8
- This model has been pushed to the Hub using the [PytorchModelHubMixin](https://huggingface.co/docs/huggingface_hub/package_reference/mixins#huggingface_hub.PyTorchModelHubMixin) integration:
9
- - Code: [More Information Needed]
10
- - Paper: [More Information Needed]
11
- - Docs: [More Information Needed]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  tags:
3
  - model_hub_mixin
4
  - pytorch_model_hub_mixin
5
+ - address-parsing
6
+ - deepparse
7
  license: mit
8
+ library_name: deepparse
9
  ---
10
 
11
+ # deepparse BPEmb Attention
12
+
13
+ A [deepparse](https://deepparse.org) address parser (Seq2Seq, with attention mechanism) using the multilingual [BPEmb](https://nlp.h-its.org/bpemb/) subword embeddings (100,000 merges, 300 dimensions), embedded per word by a bidirectional LSTM.
14
+
15
+ ```python
16
+ from deepparse.parser import AddressParser
17
+
18
+ address_parser = AddressParser(model_type="bpemb", attention_mechanism=True)
19
+ address_parser("350 rue des Lilas Ouest Québec Québec G1L 1B6")
20
+ ```
21
+
22
+ ## Architecture
23
+
24
+ One-layer LSTM encoder and decoder, hidden size 1,024, BPEmb embeddings of 300 dimensions, with an attention mechanism. The
25
+ model predicts 8 tags (`StreetNumber`, `StreetName`, `Unit`, `Municipality`, `Province`, `PostalCode`, `Orientation`
26
+ and `GeneralDelivery`) and the end-of-sequence tag.
27
+
28
+ ## Training
29
+
30
+ Trained in 2020 on the dataset described in the
31
+ [deepparse-address-data](https://github.com/GRAAL-Research/deepparse-address-data) repository (addresses of 20
32
+ countries, built from the [libpostal](https://github.com/openvenues/libpostal) data). See
33
+ [Leveraging Subword Embeddings for Multinational Address Parsing](https://arxiv.org/abs/2006.16152) and
34
+ [Multinational Address Parsing: A Zero-Shot Evaluation](https://arxiv.org/abs/2112.04008).
35
+
36
+ ## Results
37
+
38
+ - 41 zero-shot countries: 86.00% mean per-country accuracy (24.48% to 99.77%).
39
+ - On the 20 training countries, the attention mechanism improves the accuracy by around 0.5%.
40
+
41
+ Per-country tables: the [Results page](https://deepparse.org/results.html) of the documentation.
42
+
43
+ ## Limitations
44
+
45
+ - On the test split of the newer
46
+ [worldwide-addresses](https://huggingface.co/datasets/deepparse/worldwide-addresses) data (same 20 countries,
47
+ clean and incomplete addresses, 260,000 addresses), this model reaches 84.38% per-word accuracy (measured in
48
+ November 2026). It is weaker on incomplete addresses (e.g. a postal code or a municipality alone) than on complete
49
+ ones.
50
+ - In practice, it rarely predicts the `Orientation` and `GeneralDelivery` tags: in November 2026, it predicted
51
+ neither on 12,000 addresses of the worldwide-addresses test split.
52
+
53
+ ## Citation
54
+
55
+ ```bibtex
56
+ @misc{yassine2020leveraging,
57
+ title={{Leveraging Subword Embeddings for Multinational Address Parsing}},
58
+ author={Marouane Yassine and David Beauchemin and François Laviolette and Luc Lamontagne},
59
+ year={2020},
60
+ eprint={2006.16152},
61
+ archivePrefix={arXiv}
62
+ }
63
+ ```