Jorge Lopez Grisman commited on
Commit
6a91a8a
1 Parent(s): 89bc7b4

Update README.md

Browse files

adding usage examples

Files changed (1) hide show
  1. README.md +21 -2
README.md CHANGED
@@ -54,9 +54,28 @@ It achieves the following results on the evaluation set:
54
 
55
  More information needed
56
 
57
- ## Intended uses & limitations
58
 
59
- More information needed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
 
61
  ## Training and evaluation data
62
 
 
54
 
55
  More information needed
56
 
57
+ ## limitations
58
 
59
+ #### Limitations and bias
60
+
61
+ This model is limited by its training dataset of entity-annotated news articles from a specific span of time. This may not generalize well for all use cases in different domains. Furthermore, the model occassionally tags subword tokens as entities and post-processing of results may be necessary to handle those cases.
62
+
63
+
64
+ #### How to use
65
+
66
+ You can use this model with Transformers *pipeline* for NER.
67
+
68
+ ```python
69
+ from transformers import pipeline
70
+ from transformers import AutoTokenizer, AutoModelForTokenClassification
71
+ tokenizer = AutoTokenizer.from_pretrained("Jorgeutd/albert-base-v2-finetuned-ner")
72
+
73
+ model = AutoModelForTokenClassification.from_pretrained("Jorgeutd/albert-base-v2-finetuned-ner")
74
+ nlp = pipeline("ner", model=model, tokenizer=tokenizer)
75
+ example = "My name is Scott and I live in Ohio"
76
+ ner_results = nlp(example)
77
+ print(ner_results)
78
+ ```
79
 
80
  ## Training and evaluation data
81