legacy-datasets/wikipedia
Updated • 124k • 632
How to use rmihaylov/bert-base-ner-theseus-bg with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("token-classification", model="rmihaylov/bert-base-ner-theseus-bg") # Load model directly
from transformers import AutoTokenizer, AutoModelForTokenClassification
tokenizer = AutoTokenizer.from_pretrained("rmihaylov/bert-base-ner-theseus-bg")
model = AutoModelForTokenClassification.from_pretrained("rmihaylov/bert-base-ner-theseus-bg")Pretrained model on Bulgarian language using a masked language modeling (MLM) objective. It was introduced in this paper and first released in this repository. This model is cased: it does make a difference between bulgarian and Bulgarian. The training data is Bulgarian text from OSCAR, Chitanka and Wikipedia.
It was finetuned on public named-entity-recognition Bulgarian data.
Then, it was compressed via progressive module replacing.
Here is how to use this model in PyTorch:
>>> from transformers import pipeline
>>>
>>> model = pipeline(
>>> 'ner',
>>> model='rmihaylov/bert-base-ner-theseus-bg',
>>> tokenizer='rmihaylov/bert-base-ner-theseus-bg',
>>> device=0,
>>> revision=None)
>>> output = model('Здравей, аз се казвам Иван.')
>>> print(output)
[{'end': 26,
'entity': 'B-PER',
'index': 6,
'score': 0.9937722,
'start': 21,
'word': '▁Иван'}]