Commit ·
29bedc1
1
Parent(s): 4a08cd1
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,102 @@
|
|
| 1 |
---
|
| 2 |
license: wtfpl
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: wtfpl
|
| 3 |
---
|
| 4 |
+
from transformers import pipeline
|
| 5 |
+
tokenizer = AutoTokenizer.from_pretrained("xlm-roberta-large-finetuned-conll03-english")
|
| 6 |
+
model = AutoModelForTokenClassification.from_pretrained("xlm-roberta-large-finetuned-conll03-english")
|
| 7 |
+
classifier = pipeline("ner", model=model, tokenizer=tokenizer)
|
| 8 |
+
classifier("Alya told Jasmine that Andrew could pay with cash..")
|
| 9 |
+
[{'end': 2,
|
| 10 |
+
'entity': 'I-PER',
|
| 11 |
+
'index': 1,
|
| 12 |
+
'score': 0.9997861,
|
| 13 |
+
'start': 0,
|
| 14 |
+
'word': '▁Al'},
|
| 15 |
+
{'end': 4,
|
| 16 |
+
'entity': 'I-PER',
|
| 17 |
+
'index': 2,
|
| 18 |
+
'score': 0.9998591,
|
| 19 |
+
'start': 2,
|
| 20 |
+
'word': 'ya'},
|
| 21 |
+
{'end': 16,
|
| 22 |
+
'entity': 'I-PER',
|
| 23 |
+
'index': 4,
|
| 24 |
+
'score': 0.99995816,
|
| 25 |
+
'start': 10,
|
| 26 |
+
'word': '▁Jasmin'},
|
| 27 |
+
{'end': 17,
|
| 28 |
+
'entity': 'I-PER',
|
| 29 |
+
'index': 5,
|
| 30 |
+
'score': 0.9999584,
|
| 31 |
+
'start': 16,
|
| 32 |
+
'word': 'e'},
|
| 33 |
+
{'end': 29,
|
| 34 |
+
'entity': 'I-PER',
|
| 35 |
+
'index': 7,
|
| 36 |
+
'score': 0.99998057,
|
| 37 |
+
'start': 23,
|
| 38 |
+
'word': '▁Andrew'}]
|
| 39 |
+
|
| 40 |
+
Recommendations
|
| 41 |
+
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model.
|
| 42 |
+
|
| 43 |
+
Training
|
| 44 |
+
See the following resources for training data and training procedure details:
|
| 45 |
+
|
| 46 |
+
XLM-RoBERTa-large model card
|
| 47 |
+
CoNLL-2003 data card
|
| 48 |
+
Associated paper
|
| 49 |
+
Evaluation
|
| 50 |
+
See the associated paper for evaluation details.
|
| 51 |
+
|
| 52 |
+
Environmental Impact
|
| 53 |
+
Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).
|
| 54 |
+
|
| 55 |
+
Hardware Type: 500 32GB Nvidia V100 GPUs (from the associated paper)
|
| 56 |
+
Hours used: More information needed
|
| 57 |
+
Cloud Provider: More information needed
|
| 58 |
+
Compute Region: More information needed
|
| 59 |
+
Carbon Emitted: More information needed
|
| 60 |
+
Technical Specifications
|
| 61 |
+
See the associated paper for further details.
|
| 62 |
+
|
| 63 |
+
Citation
|
| 64 |
+
BibTeX:
|
| 65 |
+
|
| 66 |
+
@article{conneau2019unsupervised,
|
| 67 |
+
title={Unsupervised Cross-lingual Representation Learning at Scale},
|
| 68 |
+
author={Conneau, Alexis and Khandelwal, Kartikay and Goyal, Naman and Chaudhary, Vishrav and Wenzek, Guillaume and Guzm{\'a}n, Francisco and Grave, Edouard and Ott, Myle and Zettlemoyer, Luke and Stoyanov, Veselin},
|
| 69 |
+
journal={arXiv preprint arXiv:1911.02116},
|
| 70 |
+
year={2019}
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
APA:
|
| 74 |
+
|
| 75 |
+
Conneau, A., Khandelwal, K., Goyal, N., Chaudhary, V., Wenzek, G., Guzmán, F., ... & Stoyanov, V. (2019). Unsupervised cross-lingual representation learning at scale. arXiv preprint arXiv:1911.02116.
|
| 76 |
+
Model Card Authors
|
| 77 |
+
This model card was written by the team at Hugging Face.
|
| 78 |
+
|
| 79 |
+
How to Get Started with the Model
|
| 80 |
+
Use the code below to get started with the model. You can use this model directly within a pipeline for NER.
|
| 81 |
+
|
| 82 |
+
Click to expand
|
| 83 |
+
from transformers import AutoTokenizer, AutoModelForTokenClassification
|
| 84 |
+
from transformers import pipeline
|
| 85 |
+
tokenizer = AutoTokenizer.from_pretrained("xlm-roberta-large-finetuned-conll03-english")
|
| 86 |
+
model = AutoModelForTokenClassification.from_pretrained("xlm-roberta-large-finetuned-conll03-english")
|
| 87 |
+
classifier = pipeline("ner", model=model, tokenizer=tokenizer)
|
| 88 |
+
classifier("Hello I'm Omar and I live in Zürich.")
|
| 89 |
+
|
| 90 |
+
[{'end': 14,
|
| 91 |
+
'entity': 'I-PER',
|
| 92 |
+
'index': 5,
|
| 93 |
+
'score': 0.9999175,
|
| 94 |
+
'start': 10,
|
| 95 |
+
'word': '▁Omar'},
|
| 96 |
+
{'end': 35,
|
| 97 |
+
'entity': 'I-LOC',
|
| 98 |
+
'index': 10,
|
| 99 |
+
'score': 0.9999906,
|
| 100 |
+
'start': 29,
|
| 101 |
+
'word': '▁Zürich'}]
|
| 102 |
+
|