问题
Can someone please elaborate on how to obtain " pharse level dependency" using the Stanfords's Natural Language Processing Lexical Parser- open source Java code? http://svn.apache.org/repos/asf/nutch/branches/branch-1.2/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/RobotRulesParser.java
http://docs.mongodb.org/manual/reference/sql-comparison/
such as
pharse dependency
The accident --------->happened
falling ---------> as
the night ---------->falling
as such as many more...
Thanks!
回答1:
You can group the words in one token, so you can get phrase-level dependency. At the very least, this covers multi-word expressions (MWE) and named-entities. This can also increase the accuracy (particularly for grouping named-entities as one token) during dependency parsing.
In your example, on determiners being grouped together, what I think you can do is to post-process them. After getting the dependency parse tree , you can add "the" to "accident". You can base it from the constituent parse tree if you want,
(NP (DT The) (NN accident))
looking at those that belongs to the same noun phrase or other phrases. Not quite sure how this will be useful, or what issues may arise from this approach. You can do some experiments using Stanford parser (demo).
来源:https://stackoverflow.com/questions/11985585/pharse-level-dependency-parser-using-java-nlp