Java Reference
In-Depth Information
Chapter 7. Using Parser to Extract
Relationships
Parsing is the process of creating a parse tree for a textual unit. This unit may be for a line
of code or a sentence. It is easy to do for computer languages, since they were designed to
make the task easy. However, this has made it harder to write code. Natural language pars-
ing is considerably more difficult. This is due to the ambiguity found in natural languages.
This ambiguity makes a language difficult to learn but offers great flexibility and express-
ive power. Here, we are not interested in parsing computer languages, but rather natural
languages.
A parse tree is a hierarchical data structure that represents the syntactic structure of a sen-
tence. Often, this is presented as a tree graph with a root as we will illustrate shortly. We
will use the parse tree to help identify relationships between entities in the tree.
Parsing is used for many tasks, including:
• Machine translation of languages
• Synthesizing speech from text
• Speech recognition
• Grammar checking
• Information extraction
Coreference resolution is the condition where two or more expressions in text refer to the
same individual or thing. For example, in this sentence:
"Ted went to the party where he made an utter fool of himself."
The words "Ted", "he", and "himself" refer to the same entity, "Ted". This is important in
determining the correct interpretation of text and in determining the relative importance of
text sections. We will demonstrate how the Stanford API addresses this problem.
Extracting relationships and information from text is an important NLP task. Relationships
may exist between entities, such as the subject of a sentence and either its object, other en-
tities, or perhaps its behavior. We may also want to identify relationships and present them
in a structured form. We can use this information either to present the results for immediate
use by people or to format the relationships so that they can be better utilized for a down-
stream task.
Search WWH ::




Custom Search