| 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 | |
| 59 | Besides 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 |
| 60 | deriving implicit out-of-vocabulary type information |
| 61 | |
| 62 | |
| 63 | == Language Dependent Files == |
| 64 | |
| 65 | The core of AST system is universal and can be used for semantic analysis of any |
| 66 | language. Besides main core the system also uses input files that are language |
| 67 | dependent and that need to be modified for new language. |
| 68 | |
| 69 | |
| 70 | '''The Semantic Grammar''': resulting semantic construction is built by |
| 71 | bottom-up analysis based on the input syntactic tree provided by the syntactic |
| 72 | parser and by a semantic extension of the actual grammar used in the parsing |
| 73 | process. To know which rule was used by the parser, AST needs the semantic |
| 74 | grammar file. This file contains specification of semantic actions that need |
| 75 | to be done before propagation of particular node constructions to the higher |
| 76 | level in the syntactic tree. The semantic actions define what logical functions |
| 77 | correspond to each particular syntactic rule. For instance, the <np> node in |
| 78 | graphical representation corresponds to the rule and action: |
| 79 | |
| 80 | {{{ |
| 81 | np -> left_modif np |
| 82 | rule_schema ( "[#1,#2]" ) |
| 83 | }}} |
| 84 | |
| 85 | which says that the resulting logical construction of the left-hand side np is |
| 86 | obtained as a (logical) application of the left_modif (sub)construction to the |
| 87 | right-hand side np (sub)construction. Example of building construction from two subconstructions is presnet in following example: |
| 88 | |
| 89 | [[Image(analysis.pdf, 700px)]] |