|
|
| (15 intermediate revisions by the same user not shown) |
| Line 1: |
Line 1: |
| The following Grammar Specs are used for writing rules for the UNDL Foundation tools ([[IAN]], [[EUGENE]], [[SEAN]], [[NORMA]], etc.).
| | #REDIRECT [[Grammar]] |
| | |
| == Basic symbols ==
| |
| | |
| {| border="1" cellpadding="2" align=center
| |
| |+Basic symbols used in UNL grammar rules
| |
| !Symbol
| |
| !Definition
| |
| !Example
| |
| |-
| |
| |align=center|<nowiki>^</nowiki>
| |
| |not
| |
| |^a = not a
| |
| |-
| |
| |align=center|{ | }
| |
| |or
| |
| |<nowiki>{a|b}</nowiki> = a or b
| |
| |-
| |
| |align=center|%
| |
| |index for nodes, attributes and values
| |
| |%x (see [[#Indexes|below]])
| |
| |-
| |
| |align=center|#
| |
| |index for sub-NLWs
| |
| |#01 (see [[#Indexes|below]])
| |
| |-
| |
| |align=center|=
| |
| |attribute-value assignment
| |
| |POS=NOU
| |
| |-
| |
| |align=center|!
| |
| |rule trigger
| |
| |!PLR
| |
| |-
| |
| |align=center|&
| |
| |merge operator
| |
| |%x&%y
| |
| |-
| |
| |align=center|?
| |
| |dictionary lookup operator
| |
| |?[a]
| |
| |-
| |
| |align=center|“ “
| |
| |string
| |
| |"went"
| |
| |-
| |
| |align=center|[ ]
| |
| |natural language entry (headword)
| |
| |[go]
| |
| |-
| |
| |align=center|[[ ]]
| |
| |UW
| |
| |[[to go(icl>to move)]]
| |
| |-
| |
| |align=center|( )
| |
| |node
| |
| |(a)
| |
| |-
| |
| |align=center|//
| |
| |regular expression
| |
| |/a{2,3}/ = aa,aaa
| |
| |}
| |
| | |
| == Basic concepts ==
| |
| ;[[Node]]
| |
| :A node is the most elementary unit in the graph. It is the result of the [[tokenization]] process, and corresponds to the notion of "lexical item". At the surface level, a natural language sentence is considered a list of nodes, and a UNL graph a set of relations between nodes.
| |
| ;[[Relation]]
| |
| :In order to form a natural language sentence or a UNL graph, nodes are inter-related by relations. In the UNL framework, there can be three different types of relations: linear, syntactic or semantic.
| |
| ;[[Hyper-Node]]
| |
| :A hyper-node is a sub-graph, i.e., a node containing relations between nodes.
| |
| ;[[Hyper-Relation]]
| |
| :A hyper-relation is a relation between relations.
| |