Download FreeLing User Manual
Transcript
3.21. DEPENDENCY PARSER MODULE
47
• At the first stage, the <GRPAR> rules are used to complete the shallow parsing produced by
the chart into a complete parsing tree. The rules are applied to a pair of adjacent chunks.
At each step, the selected pair is fused in a single chunk. The process stops when only one
chunk remains
• The next step is an automatic conversion of the complete parse tree to a dependency tree.
Since the parsing grammar encodes information about the head of each rule, the conversion
is straighforward
• The last step is the labeling. Each edge in the dependeny tree is labeled with a syntactic
function, using the <GRLAB> rules
The syntax and semantics of <GRPAR> and <GRLAB> rules are described in section 3.21.1.
3.21.1
Dependency Parsing Rule File
The dependency rules file contains a set of rules to perform dependency parsing.
The file consists of four sections: sections: <GRPAR>, <GRLAB>, <SEMDB>, and <CLASS>, respectively closed by tags </GRPAR>, </GRLAB>, </SEMDB>, and </CLASS>.
Parse–tree completion rules
Section <GRPAR> contains rules to complete the partial parsing provided by the chart parser. The
tree is completed by combining chunk pairs as stated by the rules. Rules are applied from highest
priority (lower values) to lowest priority (higher values), and left-to right. That is, the pair of
adjacent chunks matching the most prioritary rule is found, and the rule is applied, joining both
chunks in one. The process is repeated until only one chunk is left.
The rules can be enabled/disabled via the activation of global flags. Each rule may be stated
to be enabled only if certain flags are on. If none of its enabling flags are on, the rule is not
applied. Each rule may also state which flags have to be toggled on/off after its application, thus
enabling/disabling other rule subsets.
Each line contains a rule, with the format:
priority flags context (ancestor,descendant) operation op-params flag-ops
where:
• priority is a number stating the priority of a rule (the lower the number, the higher the
priority).
• flags is a list of strings separated by vertical bars (“|”). Each string is the name of a flag
that will cause the rule to be enabled. If enabling_flags equals “-”, the rule will be always
enabled.
• context is a context limiting the application of the rule only to chunk pairs that are surrounded by the appropriate context (“-” means no limitations, and the rule is applied to
any matching chunk pair) (see below).
• (ancestor,descendant) are the labels of the adjacent pair of chunks the rule will be applied
to. The labels are either assigned by the chunk parser, or by a RELABEL operation on some
other completion rule. The pair must be enclosed in parenthesis, separated by a comma,
and contain NO whitespaces.
The chunk labels may be suffixed with one extra condition of the form: (form), <lemma>,
[class], or {PoS_regex}.
For instance,