glample / tagger

Named Entity Recognition Tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tagger.py returning empty file

ysser opened this issue · comments

I am getting an empty file when I am running tagger.py . I have at first generated my own model and the model generated is fine. But when I launch tagger.py based on my model, I am getting no labels, all words are labeled with O. Even when I tried your own model "english" with simple tokenized sentences, I am getting no results, all words with "O" labels. Am I missing smtg?

Mmm I'm not sure. Can you give me an example of sentences before and after they were tagged? Are you sure the input format is the correct one? Note that the input format for train.py and for tagger.py is not the same (one word by line vs one sentence by line).

@glample thanks for your reply.
Here is an example, in input.txt file, a tokenized sentence and pasted in one line (sentence taken from Reuters as example):
A Senate panel is expected to advance President Donald Trump Supreme Court nominee, Neil Gorsuch , to a full Senate vote later in the week , setting up a political showdown as Democrats seek to block his confirmation.
When I run tagger.py with english model, I am getting only PER tags for Donald Trump and Neil Gorsush which is good, but no tags for VB, NN ... Nothing. Is this expected?

Did you attach a file or something? I can't see it. Otherwise yet, it's expected that VB and NN don't have anything. Only named entities are expected to have a tag different from O (O stands for "out", which means it's not a named entity).

I thought that the script processes, at the same time VB, N...N tags. When I reviewed your script, I knew that that this issue is bad. Sorry.
But also, I want to ask you, when I train with my own data using 25 tags, I am getting only 2 tags as results. Anyway, Thanks.
Closed.