使用StanfordNLP解析命令式句子是否可以获得更好的结果? [英] Is it possible to get better results for parsing imperative sentences with StanfordNLP?

查看:160
本文介绍了使用StanfordNLP解析命令式句子是否可以获得更好的结果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在句子结构中找到模式.因此,我试图将解析树作为预处理.

I want to find patterns in sentence structure. Therefore I'm trying to get the parse tree as preprocessing.

直到现在,我仍使用Stanford CoreNLPParser. 我的许多句子都是命令式句子. 在收到比我预期更多的聚类之后,我查看了语法分析树,发现命令式句子开头的动词经常被解析为名词短语(NP).

Until now I used the Stanford CoreNLPParser. Many of my sentences are imperative sentences. After receiving much more clusters as I expected, I reviewed the parse tree and found out that often verbs at the beginning of my imperative sentences were parsed as Noun Phrases (NP).

我找到了以下答案: https://stackoverflow.com/a/35887762/6068675

因为这个答案是从2016年开始的,所以我希望可能会有另一种选择来获得更好的结果. 句子中只有第一个单词的小写看起来并不理想.

Since this answer is from 2016 I was hoping there might be another option to get better results. Only lowercase every first word in a sentence doesn't look like an ideal solution.

我提供了一些错误解析的示例:

I include a few examples that got parsed wrong:

(ROOT (S (S (NP (NNP View)) (NP (NP (DT a) (NN list)) (PP (IN of) (NP (JJ ongoing) (NNS sales) (NNS quotes))) (PP (IN for) (NP (DT the) (NN customer))))) (. .)))

(ROOT (NP (NP (NN Request) (NN approval) (S (VP (TO to) (VP (VB change) (NP (DT the) (NN record)))))) (. .)))

更多示例

(ROOT (NP (NP (NNP View)) (CC or) (VP (VB change) (NP (NP (JJ detailed) (NN information)) (PP (IN about) (NP (DT the) (NN customer))))) (. .)))
(ROOT (FRAG (PP (IN Post) (NP (DT the) (VBN specified) (NN prepayment) (NN information))) (. .)))
(ROOT (S (S (NP (NNP View)) (NP (NP (DT a) (NN summary)) (PP (IN of) (NP (DT the) (NN debit) (CC and) (NN credit) (NNS balances))) (PP (IN for) (NP (JJ different) (NN time) (NNS periods))))) (. .)))
(ROOT (NP (NP (NP (NN Offer) (NNS items)) (CC or) (NP (NP (NNS services)) (PP (TO to) (NP (DT a) (NN customer))))) (. .)))
(ROOT (NP (NP (NP (NNP View)) (CC or) (VP (VB add) (NP (NP (NNS comments)) (PP (IN for) (NP (DT the) (NN record)))))) (. .)))

推荐答案

不幸的是,几年前《华尔街日报》对词性标记器进行了培训.因此,在某些情况下,训练数据中没有必要使用命令性陈述.因此,有时会猜错.但是,在某些命令性声明中,它也做正确的事情.我认为,如果第一个单词是清晰的动词,例如"Call",您将获得更好的性能.

Unfortunately the part-of-speech tagger is trained on the Wall Street Journal from years ago. So there are issues where imperative statements aren't in the training data. So it's going to guess wrong at times. But on some imperative statements it does the right thing as well. I think if the first word is a clear verb like "Call" you will get better performance.

我看到的另一个问题是动词文本"(如发送短信)处理得不好.

Another issue I saw is the verb "text" (as in send a text message) is not being handled well.

我认为我们很高兴添加一些现代数据并添加一些命令式培训数据以提供帮助.

I think we would be excited to add some contemporary data and add some imperative training data to help out.

这篇关于使用StanfordNLP解析命令式句子是否可以获得更好的结果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆