Changes between Version 1 and Version 2 of ast


Ignore:
Timestamp:
Mar 14, 2019, 3:20:11 PM (5 years ago)
Author:
xmedved1
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ast

    v1 v2  
    2222
    2323To create a semantic structure of a sentence, AST needs the output from
    24 previous analysis. A usual output is in the form of a syntactic tree [[Image()]]
     24previous analysis. A usual output is in the form of a syntactic tree.
    2525
     26'''Textual form of syntactic tree:'''
     27{{{
     28<tree>
     29{##start##
     30  {start
     31    {ss
     32      {clause
     33        {VL<leaf><idx>0</idx><w>Jedl</w>
     34         <l>jíst</l><c>k5eAaIgMnS</c></leaf>}
     35        {intr
     36          {adjp
     37            {ADJ<leaf><idx>1</idx><w>pečené</w>
     38             <l>pečený</l><c>k2eAgNnSc4</c></leaf>}
     39          }
     40          {np
     41            {N<leaf><idx>2</idx><w>kuře</w>
     42             <l>kuře</l><c>k1gNnSc4</c></leaf>}
     43          }
     44        }
     45      }
     46    }
     47    {ends
     48      {'.'<leaf><idx>3</idx><w>.</w><l>.</l><c>kX</c></leaf> }
     49    }     
     50  }
     51}
     52</tree>
     53}}}
     54
     55'''Corresponding graphical representation:'''
     56
     57[[Image(tree.png, 700px)]]
     58
     59Besides the tree nodes and edges, the tree contains morphological information about each word: a lemma and a PoS tag, which are used by AST for
     60deriving implicit out-of-vocabulary type information
     61
     62
     63== Language Dependent Files ==
     64
     65The core of AST system is universal and can be used for semantic analysis of any
     66language. Besides main core the system also uses input files that are language
     67dependent and that need to be modified for new language.
     68
     69
     70'''The Semantic Grammar''': resulting semantic construction is built by
     71bottom-up analysis based on the input syntactic tree provided by the syntactic
     72parser and by a semantic extension of the actual grammar used in the parsing
     73process. To know which rule was used by the parser, AST needs the semantic
     74grammar file. This file contains specification of semantic actions that need
     75to be done before propagation of particular node constructions to the higher
     76level in the syntactic tree. The semantic actions define what logical functions
     77correspond to each particular syntactic rule. For instance, the <np> node in
     78graphical representation corresponds to the rule and action:
     79
     80{{{
     81np -> left_modif np
     82rule_schema ( "[#1,#2]" )
     83}}}
     84
     85which says that the resulting logical construction of the left-hand side np is
     86obtained as a (logical) application of the left_modif (sub)construction to the
     87right-hand side np (sub)construction. Example of building construction from two subconstructions is presnet in following example:
     88
     89[[Image(analysis.pdf, 700px)]]