This model detects name-entity on Turkish texts. It tags the words Person, Location, Organization.
The model usage is as follows:
import torch
from transformers import AutoModelForTokenClassification, AutoTokenizer, AutoConfig, pipeline
config_ner = AutoConfig.from_pretrained("erythropygia/bert-turkish-entityrecognition")
model_ner = AutoModelForTokenClassification.from_pretrained("erythropygia/bert-turkish-entityrecognition",config=config_ner)
tokenizer_ner= AutoTokenizer.from_pretrained("erythropygia/bert-turkish-entityrecognition")
device = torch.device('cpu') #or 'cuda'
ner_pipeline = pipeline(
task='ner',
model=model_ner,
tokenizer=tokenizer_ner,
framework='pt',
#device=device
)
input = "Bugün Fenerbahçe maçına gideceğim. Maçtan sonra Mehmet Yıldırım'la Bostancıda buluşacağım"
ner_result = ner_pipeline(input)
print(ner_result)
- Downloads last month
- 17
Inference Providers
NEW
This model is not currently available via any of the supported Inference Providers.