How do I approach this named-entity classification

2019-04-02 17:13发布

I am asking a related question here but this question is more general. I have taken a large corpora and annotated some words with their named-entities. In my case, they are domain-specific and I call them: Entity, Action, Incident. I want to use these as a seed for extracting more named-entities. For example, following is one sentence:

When the robot had a technical glitch, the object was thrown but was later caught by another robot.

is tagged as:

When the (robot)/Entity had a (technical glitch)/Incident, the (object)/Entity was (thrown)/Action but was later (caught)/Action by (another robot)/Entity.

Given examples like this, is there anyway I can train a classifier to recognize new named-entities? For instance, given a sentence like this:

The nanobot had a bug and so it crashed into the wall.

should be tagged somewhat like this:

The (nanobot)/Entity had a (bug)/Incident and so it (crashed)/Action into the (wall)/Entity.

Of course, I am aware that 100% accuracy is not possible but I would be interested in knowing any formal approaches to do this. Any suggestions?

3条回答
闹够了就滚
2楼-- · 2019-04-02 17:32

This is not named-entity recognition at all, since none of the labeled parts are names, so the feature sets for NER systems won't help you (English NER systems tend to rely on capitalization quite strongly and will prefer nouns). This is a kind of information extraction/semantic interpretation. I suspect this is going to be quite hard in a machine learning setting because your annotation is really inconsistent:

When the (robot)/Entity had a (technical glitch)/Incident, the (object)/Entity was (thrown)/Action but was later (caught)/Action by another robot.

Why is "another robot" not annotated?

If you want to solve this kind of problem, you'd better start out with some regular expressions, maybe matched against POS-tagged versions of the string.

查看更多
地球回转人心会变
3楼-- · 2019-04-02 17:39

You could try object role modeling at http://www.ormfoundation.com/ which looks at the semantics(facts) between one or more entities or names and their relationships with other objects. There are also tools to convert the orm models into xml and other languages and vice versa. See http://orm.sourceforge.net/

查看更多
贼婆χ
4楼-- · 2019-04-02 17:46

I can think of 2 approaches.

First is pattern matching over words in sentence. Something like this (pseudocode, though it is similar to NLTK chunk parser syntax):

<some_word>+ (<NN|NNS>) <have|has|had> (<NN|NNS>) 
<NN|NNS> (<VB>|was <VB>) (<and|but> (<VB>|was <VB>))* <into|onto|by> (<NN|NNS>)

These 2 patterns can (roughly) catch 2 parts of your first sentence. This is a good choice if you have not very much kinds of sentences. I believe it is possible to get up to 90% accuracy with well-chosen patterns. Drawback is that this model is hard to extend/modify.

Another approach is to mine dependencies between words in sentence, for example, with Stanford Dependency Parser. Among other things, it allows to mine object, subject and predicate, that seems very similar to what you want: in your first sentence "robot" is subject, "had" is predicate and "glitch" is object.

查看更多
登录 后发表回答