Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude sentence with only O #102

Open
ericcanadas opened this issue Jun 27, 2018 · 1 comment
Open

Exclude sentence with only O #102

ericcanadas opened this issue Jun 27, 2018 · 1 comment

Comments

@ericcanadas
Copy link

ericcanadas commented Jun 27, 2018

Hi,

More a question than an issue.
Is it useful to leave sentences that contain only O in the training set ?
Exemple : (here, the sentence, "The dog is brown")

EU B-ORG
rejects O
German B-MISC
call O
to O
boycott O
British B-MISC
lamb O
. O

The O
dog O
is O
brown O

Peter B-PER
Blackburn I-PER
@usptact
Copy link

usptact commented Jun 27, 2018

@ericc91 Yes, it is beneficial to keep the sentence with only "O" labels. Those are so-called negative examples. Having the select negatives in your training set makes your model much more robust to false positives (tagging where the model should not tag).

From my experience building many custom NER models, it is beneficial to add negative examples in small batches. The ones you add in the current iteration are the ones where the model tags. After a couple of iterations on some random examples, your model will learn pretty quickly. The added examples must be diverse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants