是否可以在句子中识别不同的查询/问题?

数据挖掘 机器学习 数据挖掘 nlp 社会网络分析
2021-09-30 23:11:49

我想识别句子中的不同查询。

Like -Who is Bill Gates and where he was born?Who is Bill Gates, where he was born?包含两个查询

  1. 比尔盖茨是谁?
  2. 比尔盖茨出生的地方

我从事共指解析,所以我可以确定he指向Bill Gates如此解析的句子是“谁是比尔·盖茨,比尔·盖茨出生的地方”

同样地

MGandhi is good guys, Where he was born?
single query
who is MGandhi and where was he born?
2 queries
who is MGandhi, where he was born and died?
3 quries
India won world cup against Australia, when?
1 query (when India won WC against Auz)

我可以执行共指解析(识别并转换heGandhi),但不知道如何区分其中的查询。

这个怎么做?

我检查了各种句子解析器,但由于这是纯 nlp 的东西,句子解析器无法识别它。

我试图找到像“词义消歧”这样的“句子消歧”,但没有这样的东西。

任何帮助或建议都将是非常可观的。

1个回答

在这种情况下,您可以做的基本事情是将您的查询分成 N 个简单的句子,考虑到该句子是否是一个查询,每个句子都应该被处理,以便接收是/否的答案。这样,您将收到以下结果:

Input: Gandhi is good guys, Where he was born?
->
Gandhi is good guys - not query
Where he was born?  - query
===
1 query

Input: who is MGandhi and where was he born?
->
who is MGandhi     - query
where was he born? - query
===
2 queries

这种方法将需要回指解析(以便在第一个示例中转换heGandhi)和解析器以正确地将复杂句子划分为简单句子。