How to handle two entity extraction methods in NLP

醉酒当歌 提交于 2019-11-29 12:50:36

You are facing 2 problems here. I am suggesting few ways that i found helpful.

1. Custom entity recognition: To solve this you need to add more training sentences with all possible lengths of entities. ner_crf is going to predict better when there are identifiable markers around entities (e.g. prepositions)

2. Extracting entities from single word answer : As a workaround, i suggest you to do below manipulations on client end.

When you are sending question like What´s your favorite animal?, append a marker to question to indicate to client that a single answer is expected. e.g. You can send ##SINGLE## What´s your favorite animal? to client.

Client can remove the ##SINGLE## from question and show it to user. But when client sends user's response to server, it doesn't send Dog, it send something like User responded with single answer as Dog

You can train your model to extract entities from such an answer.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!