English grammar
(→UNLization (ENG->UNL)) |
(→UNLization (ENG->UNL)) |
||
Line 35: | Line 35: | ||
</ol> | </ol> | ||
<li>General transformation is performed by the [[Default grammar]] and is divided in six steps: | <li>General transformation is performed by the [[Default grammar]] and is divided in six steps: | ||
− | #Pre-processing (prepares the input for the processing) | + | #'''Pre-processing''' (prepares the input for the processing) |
− | #Normalization (standardizes the feature structure) | + | #'''Normalization''' (standardizes the feature structure) |
− | #Parsing (converts the input list structure into a tree structure) | + | #'''Parsing''' (converts the input list structure into a tree structure) |
− | #Transformation (converts the surface tree struture into the deep tree structure) | + | #'''Transformation''' (converts the surface tree struture into the deep tree structure) |
− | #Dearborization (converts the tree structure into a network structure) | + | #'''Dearborization''' (converts the tree structure into a network structure) |
− | #Interpretation (converts the syntactic network into a semantic network) | + | #'''Interpretation''' (converts the syntactic network into a semantic network) |
− | #Post-processing (adjusts the final output) | + | #'''Post-processing''' (adjusts the final output) |
</ol> | </ol> | ||
</ol> | </ol> | ||
== NLization (UNL->ENG) == | == NLization (UNL->ENG) == |
Revision as of 22:58, 29 October 2012
The English grammars follow, in general, the X-bar approach, with some adaptations. They are used for transforming English sentences into UNL (UNLization) and for generating English sentences out of UNL graphs (NLization). They follow the syntax defined at the UNL Grammar Specs and the tags described at the Tagset.
Contents |
Structure
The English grammars are unidirectional. There is a grammar for UNLization (the ENG->UNL Analysis Grammar) and another grammar for NLization (the UNL->ENG Generation Grammar). The former takes natural languages sentences as inputs and provides the corresponding UNL graphs as outputs; the latter takes UNL graphs as inputs and provides the corresponding English sentences as outputs.
The English grammars are of two types: the transformation grammar, or simply t-grammar, which is used to manipulate data structures (i.e., to convert lists into trees, trees into networks, networks into a trees, trees into lists); and the disambiguation grammar, or simply d-grammar, which is used to control the behavior of the t-grammar (by prohibiting or inducing some of its possibilities).
The English grammars are divided into two parts: the English Grammar itself, which contains rules that are specific to English, and the Default Grammar, which contains language-independent rules and may be used by any language. The English Grammar applies first (i.e., the rules of the English Grammar have higher priority); the Default Grammar applies when no rule from the English Grammar can be fired.
Features
The grammars play with a set of features that come from three different sources:
- Dictionary features are the features ascribed to the entries in the dictionary, and appear as attribute-value pairs (LEX=N,GEN=MCL,NUM=SNG).
- System-defined features are features automatically assigned by EUGENE and IAN during the processing. They are the following:
- SHEAD = beggining of the sentence (system-defined feature assigned automatically by the machine)
- CHEAD = beginning of a scope (system-defined feature assigned automatically by the machine)
- STAIL = end of the sentence (system-defined feature assigned automatically by the machine)
- CTAIL = end of a scope (system-defined feature assigned automatically by the machine)
- TEMP = temporary entry (system-defined feature assigned to the strings that are not present in the dictionary)
- SCOPE = scopes entry (system-defined feature assigned to hyper-nodes)
- DIGIT = digits (system-defined feature assigned to digits)
- Grammar features are features created inside the grammar in any of its intermediate states between the input and the output.
The dictionary and system-defined features are described at the Tagset.
UNLization (ENG->UNL)
The UNLization process is performed in three different steps:
- Segmentation of English sentences is done automatically by the machine. It uses some punctuation signs (such as ".","?","!") and special characters (end of line, end of paragraph) as sentence boundaries. As the sentences are provided one per line, this step does not require any action from the grammar developer.
- Tokenization of each sentence is done against the dictionary entries, from left to right, following the principle of the longest first. As there are several lexical ambiguities, some disambiguation rules are required to induce the correct lexical choice. The tokenization is done with the English Disambiguation Grammar.
- Transformation applies after tokenization and is divided in two modules:
- English-specific transformation is performed by the ENG->UNL T-Grammar and is divided in two steps:
- Morphology, where English features (such as PLR, PAS and [not]) are mapped into attributes (@pl, @past and @not, respectively).
- Syntax, where structures that are specific to English (such as determiners, compounds and coordination) are mapped into UNL.
- General transformation is performed by the Default grammar and is divided in six steps:
- Pre-processing (prepares the input for the processing)
- Normalization (standardizes the feature structure)
- Parsing (converts the input list structure into a tree structure)
- Transformation (converts the surface tree struture into the deep tree structure)
- Dearborization (converts the tree structure into a network structure)
- Interpretation (converts the syntactic network into a semantic network)
- Post-processing (adjusts the final output)