NorbertRop commited on
Commit
cfc0234
1 Parent(s): 99838ce

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +3 -4
README.md CHANGED
@@ -25,16 +25,15 @@ Here is how to use this model to get the Named Entities in text:
25
 
26
  ```python
27
  from transformers import pipeline
28
- ner = pipeline('ner', model='clarin-pl/FastPDN')
29
 
30
  text = "Nazywam się Jan Kowalski i mieszkam we Wrocławiu."
31
  ner_results = ner(text)
32
  for output in ner_results:
33
  print(output)
34
 
35
- {'entity': 'B-nam_liv_person', 'score': 0.99957544, 'index': 4, 'word': 'Jan</w>', 'start': 12, 'end': 15}
36
- {'entity': 'I-nam_liv_person', 'score': 0.99963534, 'index': 5, 'word': 'Kowalski</w>', 'start': 16, 'end': 24}
37
- {'entity': 'B-nam_loc_gpe_city', 'score': 0.998931, 'index': 9, 'word': 'Wrocławiu</w>', 'start': 39, 'end': 48}
38
  ```
39
 
40
  Here is how to use this model to get the logits for every token in text:
 
25
 
26
  ```python
27
  from transformers import pipeline
28
+ ner = pipeline('ner', model='clarin-pl/FastPDN', aggregation_strategy='simple')
29
 
30
  text = "Nazywam się Jan Kowalski i mieszkam we Wrocławiu."
31
  ner_results = ner(text)
32
  for output in ner_results:
33
  print(output)
34
 
35
+ {'entity_group': 'nam_liv_person', 'score': 0.9996054, 'word': 'Jan Kowalski', 'start': 12, 'end': 24}
36
+ {'entity_group': 'nam_loc_gpe_city', 'score': 0.998931, 'word': 'Wrocławiu', 'start': 39, 'end': 48}
 
37
  ```
38
 
39
  Here is how to use this model to get the logits for every token in text: