Seeking Advice on Named Entity Recognition with AI
Hello everyone,I hope I’m in the right place for my question, as I am new to the Hugging Face community. I am currently working on “Named Entity Recognition” in connection with AI. My idea was to use a pre-trained model to extract certain information from a text. However, it turns out that this is quite time-consuming for me, given my limited experience with AI, and I would like to shorten my research process. That’s why I thought I’d ask here for advice on the best approach or model recommendations.Thank you in advance!
2025-01-22T08:45:00Z
Hello,Welcome to the Hugging Face community! For Named Entity Recognition (NER), a great way to speed up your work is by using pre-trained models available in the Hugging Face model hub. If you’re just starting out, I recommend trying models likedbmdz/bert-large-cased-finetuned-conll03-englishordbmdz/bert-large-cased-finetuned-ontonotesas they are fine-tuned on NER tasks and can directly extract entities such as names, locations, and organizations from text.Here’s a simple example of how to use the model with the Hugging Facetransformerslibrary:from transformers import pipeline

# Load pre-trained NER model
ner_pipeline = pipeline("ner", model="dbmdz/bert-large-cased-finetuned-conll03-english")

# Example text
text = "Hugging Face is based in New York City."

# Run NER
entities = ner_pipeline(text)
print(entities)This should give you a quick start, and from there, you can fine-tune the model or experiment with different ones depending on your needs.Good luck with your project! Feel free to reach out if you need further help.
2025-01-22T16:15:06Z
Hello Alanturner2, thank you very much for this great answer, it really helps me a lot. I will definitely give it a try soon. One quick question: I mainly work with German texts, so there must be pretrained models for the German language as well, right?
2025-01-23T00:07:23Z
Yeah, you absolutely right. you can use pre trained German models like google-bert/bert-base-german-dbmdz-uncased, distilbert/distilbert-base-german-cased,  FacebookAI/xlm-roberta-large-finetuned-conll03-german, dbmdz/bert-base-german-cased and so on.
2025-01-23T07:12:41Z
HelloI have same issue with my AI