Negative examples for the relation extraction task

#2
by Amirhj - opened

In the original dataset, there is a list of negative sentences useful for the classification task; I'm wondering is there any negative examples for the relation extraction task? i.e. sentences annotated with drug and effect but the relationship does not represent an ADE relationship?

Use heutirsitc negative sampling method to obtain negative samples from positive samples. You will be able to get a balanced dataset.

@chintagunta85 Could you please explain a bit more about How I can obtain negative samples from positive samples?

Sure.

Let's say you have a positive relation in your dataset.

Positive Example 1: Delhi is the capital of India.
We have two entities: Delhi --> capital & India --> country

In the dataset you can search for another capital which is not related to India. A random search would be ok, if you think there is only one-to-one between capitals & countries.
In case of one-to-many relation between the entities, make sure (using custom logic) to pick up unrelated entity.

You can then create a negative sample by replacing a new capital OR country like this:
Negative Example 1: London is the capital of India.

That's it. For every potive sample create a negative sample, and you would get a balanced dataset.
Hope this helps.

If you are going for Relation extraction, make sure to add entity markers for each entity for in sentence.

Thank you very much for the explanation.

albertvillanova changed discussion status to closed

Sign up or log in to comment