explosion / spaCy

💫 Industrial-strength Natural Language Processing (NLP) in Python
https://spacy.io
MIT License
29.82k stars 4.37k forks source link

Spacy french NER transformer based model fr_dep_news_trf not working #13275

Closed zmy1116 closed 8 months ago

zmy1116 commented 8 months ago

Hello, we want to use spacy to do NER extraction for french texts. The transformer based model fr_dep_news_trf seems to be broken. The list of entities is always empty.

How to reproduce the behaviour

We create a minimum example to reproduce the issue with google colab https://colab.research.google.com/drive/1mngC0EBDOP3SAngeTeNRdK2d3EP2Mc-v?authuser=0#scrollTo=eXeJRQvflErl

import spacy
doc = nlp("Bonjour, Emmanuel. Bonjour, monsieur. Donc voilà, je fais plein de choses. Biologie, c'est du pire veau, museau, lentilles, c'est voilà. Donc la pièce est bouchée au sep, c'est pareil. Je fais une sauce au sep avec la crème. Ah, ça doit être pas mal aussi. C'est pas mal aussi.  Alors on va prendre un petit pot de quoi ? On a le Beaujolais, on a le Saint-Joseph, le Trois-Hermitages. Ah non, je suis une fille du Beaujolais, moi. Merci. Alors attends, je pousse.")

for w in doc.ents:
  print(w.text,w.label_)

the model doesn't detect anything.

Your Environment

It's the default colab environment

Info about spaCy

svlandeg commented 8 months ago

Hi! Let me move this to the discussion board and answer you there.