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.
dbmdz/bert-large-cased-finetuned-conll03-english is designed for named-entity recognition (NER), capable of finding person, organization, and other entities in the text.1from optimum.onnxruntime import ORTModelForTokenClassification
2from transformers import AutoTokenizer, pipeline
3
4
5tokenizer = AutoTokenizer.from_pretrained("laiyer/bert-large-cased-finetuned-conll03-english-onnx")
6model = ORTModelForTokenClassification.from_pretrained("laiyer/bert-large-cased-finetuned-conll03-english-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)