Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
metrics:
|
3 |
+
- accuracy
|
4 |
+
- bleu
|
5 |
+
widget:
|
6 |
+
- text: 19, asbury place,mason city, iowa, 50401, us
|
7 |
+
example_title: Adress 1
|
8 |
+
- text: 1429, birch drive, mason city, iowa, 50401, us
|
9 |
+
example_title: Adress 2
|
10 |
+
---
|
11 |
+
|
12 |
+
# Address Standardization and Correction Model
|
13 |
+
|
14 |
+
This model is [t5-base](https://huggingface.co/t5-base) fine-tuned to transform incorrect and non-standard addresses into standardized addresses.
|
15 |
+
|
16 |
+
|
17 |
+
## How to use the model
|
18 |
+
|
19 |
+
```python
|
20 |
+
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
|
21 |
+
|
22 |
+
model = AutoModelForSeq2SeqLM.from_pretrained("Hnabil/t5-address-standardizer")
|
23 |
+
tokenizer = AutoTokenizer.from_pretrained("Hnabil/t5-address-standardizer")
|
24 |
+
|
25 |
+
inputs = tokenizer("220, soyth rhodeisland aveune, mason city, iowa, 50401, us", return_tensors="pt")
|
26 |
+
outputs = model.generate(**inputs, max_length=100)
|
27 |
+
print(tokenizer.batch_decode(outputs, skip_special_tokens=True))
|
28 |
+
|
29 |
+
# ['220, s rhode island ave, mason city, ia, 50401, us']
|
30 |
+
```
|
31 |
+
|
32 |
+
## Training data
|
33 |
+
|
34 |
+
The model has been trained on data from [openaddresses.io](https://openaddresses.io/).
|
35 |
+
|