Views
No views yet
[!WARNING] THIS PROJECT HAS BEEN ARCHIVED.This project and its associated code on GitHub are no longer under active development or maintained.
bert-base-NER is a fine-tuned BERT model that is ready to use for Named Entity Recognition and achieves state-of-the-art performance for the NER task. It has been trained to recognize four types of entities: location (LOC), organizations (ORG), person (PER) and Miscellaneous (MISC).bert-base-cased model that was fine-tuned on the English version of the standard CoNLL-2003 Named Entity Recognition dataset.1from optimum.onnxruntime import ORTModelForTokenClassification
2from transformers import AutoTokenizer, pipeline
3
4
5tokenizer = AutoTokenizer.from_pretrained("laiyer/bert-base-NER-onnx")
6model = ORTModelForTokenClassification.from_pretrained("laiyer/bert-base-NER-onnx")
7ner = pipeline(
8 task="ner",
9 model=model,
10 tokenizer=tokenizer,
11)
12
13ner_output = ner("My name is John Doe.")
14print(ner_output)