Default grammar

From UNL Wiki
Revision as of 20:28, 26 October 2012 by Martins (Talk | contribs)
Jump to: navigation, search

The Default grammar is expected to be language-independent and is normally loaded, after the language-specific grammars, in order to handle phenomena that are not covered by them. The default grammar is used only in transformation (t-grammar) and is unidirectional: there is a default grammar for UNLization, and a different default grammar for NLization.

Contents

Files

NL>UNL Default Grammar (UNLization)

The NL>UNL Default Grammar is divided into 7 sections

  1. Pre-processing (prepares the input for the processing)
  2. Normalization (standardizes the feature structure)
  3. Parsing (converts the input list structure into a tree structure)
  4. Transformation (converts the surface tree struture into the deep tree structure)
  5. Dearborization (converts the tree structure into a network structure)
  6. Interpretation (converts the syntactic network into a semantic network)
  7. Post-processing (adjusts the final output)

Pre-processing

The pre-processing module aims at preparing the input for processing. It includes rule such as the following:

(TEMP,%x)(BLK,%y)(TEMP,%z):=(%x&%y&%z,-BLK); merges temporary nodes

if there are two nodes (TEMP) isolated by a blank space (BLK) they become one single node

("asdfgh")(" ")("asdfgh")>("asdfgh asdfgh")
(PPN,%x)(BLK,%y)(PPN,%z):=(%x&%y&%z,+TEMP,-BLK); merges sequences of proper names

if there are two proper names (PPN) isolated by a blank space (BLK) they become one single node

("John")(" ")("Smith") > ("John Smith")
(BLK):=; deletes the blank space

deletes all blank spaces

("a")(" ")("b") > ("a")("b")

Normalization

The normalization section is divided into three modules:

  • Standardization, where isolated features are rewritten in the attribute-value format.

This is used when the feature list of entries are not represented in the dictionary in the attribute-value format, or as a cross-check for the feature assignment operations performed by the grammar itself. An example of standardization rules is:

(CAU,^ASP):=(-CAU,+ASP=CAU);

if a node has the feature "CAU" (= causative) but does not have the attribute "ASP" (aspect), then rewrite CAU as ASP=CAU

  • Propagation, where the features of top categories are copied to their children.

This is used to avoid proliferating rules. For instance, every word having the feature SNGT (singulare tantum) is also SNG (singular). This information is not stated in the dictionary, and must be made explicit in the grammar, in order not to simply duplicate all rules dealing with SNG. This generalization movement is performed by rules such as:

(SNGT,^SNG):=(-NUM,-SGNT,+NUM=SNG,+NUM=SNGT);

if a node has the feature SNGT (singulare tantum) and does not have the feature SNG (singular), then copy the feature SNG to it

  • Other normalization rules, to deal with special cases such as temporary UW's, pronouns and numbers, such as:
(TEMP,^LEX):=(+LEX=N,+POS=PPN); treats all temporary words as proper nouns

temporary UW's, which are absent from the dictionary, do not have any information other than the feature TEMP. In order to manipulate them inside the grammar, we assign them the feature PPN (proper name) (i.e., all temporary words are interpreted as proper names)

Parsing

Transformation

Dearborization

Interpretation

Post-processing

UNL>NL Default Grammar (NLization)

The NL>UNL Default Grammar is divided into 6 sections

  • Pre-processing (prepares the input for the processing)
  • Normalization (standardizes the feature structure)
  • Arborization (converts the syntactic network into a syntactic tree)
  • Transformation (converts the deep syntactic structure into the surface syntactic structure)
  • Linearization (converts the syntactic structure into a list structure)
  • Post-processing (adjusts the final output)

Pre-processing

Normalization

Arborization

Transformation

Linearization

Post-processing

Software