Inflectional paradigms

From UNL Wiki
(Difference between revisions)
Jump to: navigation, search
(Syntax)
Line 13: Line 13:
 
Inflectional paradigm rules follow the UNL syntactic general formalism:
 
Inflectional paradigm rules follow the UNL syntactic general formalism:
  
  <DICTIONARY ATTRIBUTE VALUES> “:=” <ACTION> [“,” <ACTION>]*
+
  <DICTIONARY ATTRIBUTE VALUES> “:=” <ACTION> [“,” <ACTION>]* ";"
  
 
where
 
where

Revision as of 17:54, 21 August 2009

Inflectional paradigms are used to generate the inflected forms out of the lemma.

Contents

When to use inflectional paradigms

Inflectional paradigms must be used in the case of inflectional words (such as nouns, adjectives and verbs), regardless if they are regular or not.

When not to use inflectional paradigms

Inflectional paradigms should not be used in the case of non-inflectional words (such as adverbs) or words that are already inflected (such as personal pronouns).

Syntax

Inflectional paradigm rules follow the UNL syntactic general formalism:

<DICTIONARY ATTRIBUTE VALUES> “:=” <ACTION> [“,” <ACTION>]* ";"

where

<DICTIONARY ATTRIBUTE VALUES> is a set dictionary tags extracted from the UNL Dictionary Tagset
<ACTION> is the action to be performed in the event of the dictionary value (see below)
“ “ = constant
[ ] = optional
* to be repeated zero or more times

Dictionary Attribute Values

The dictionary attribute values should comply with the UNL Dictionary Tagset. They can be used in isolation or conjoined by “&”.

PLR (= PLURAL)
1PS&ET1&IND (= FIRST PERSON OF SINGULAR [1PS] + PRESENT [ET1] + INDICATIVE [ IND])

Actions

There are three different types of actions that can be performed over the entries. The syntax for each of them is depicted below:

Type Syntax
right appending <RIGHT DELETION>”>”<RIGHT ADDITION>
left appending <LEFT ADDITION>”<”<LEFT DELETION>
replacement <SOURCE>”:”<TARGET>

where

<LEFT DELETION>
the string or the number of characters from the beginning of the entry to be deleted before the addition of the LEFT ADDITION.
<LEFT ADDITION>
the string to be added to the beginning of the entry along with its corresponding features
<RIGHT DELETION>
the string or the number of characters from the end of the entry to be deleted before the addition of the RIGHT ADDITION.
<RIGHT ADDITION>
the string to be added to the end of the entry along with its corresponding features
<SOURCE>
the string to be replaced (if empty, it means that the whole string will be replaced).
<TARGET>
the string to be used instead of the source (if empty, it means that the whole entry should be deleted)

Observations

Strings must come between double quotes.
<LEFT ADDITION> and <RIGHT ADDITION> must comme between parentheses.
<LEFT ADDITION> and <RIGHT ADDITION> may have as many features as necessary, provided that they are separated by ",".
Features must comply with the values defined in the UNL Dictionary Tagset.
<LEFT ADDITION> and <RIGHT ADDITION> may be split into several different nodes, each of which enclosed between parentheses.
<LEFT DELETION> and <RIGHT DELETION> may be empty (or equal to 0) if nothing is to be deleted.
<SOURCE> may also be the interval of characters to be replaced. In this case, the number of the beginning character and of the ending character should be informed between square brackets and should be separated with a semicolon.
Blank spaces are not inserted automatically. They can be inserted either as a string (" ") or as a feature (BLK).
[Square brackets] may be used to indicate optional elements: a[b]c = ac, abc
{braces} may be used to indicate alternative elements: a{b,c}d = abd, acd
Phrase types (NP, PP, VP, CP, AP, JP, SP) may be used to indicate embedded phrases in separable words or multiword expressions.

Examples

Type Rule Behavior Examples
right appending PLR:=”y”>”ies” in case of the feature “PLR” (=plural), the rightmost "y" will be deleted and the "ies" string will be added to the right of the entry baby>babies, lady>ladies
right appending PLR:=1>”ies” in case of the feature “PLR” (=plural), the rightmost character will be deleted and the "ies" string will be added to the right of the entry baby>babies, lady>ladies
left appending NOT:="un"< in case of the feature NOT (=negation), the string "un" will be added to the left of the entry, and nothing will be deleted dress>undress
left appending NOT:=”un”<0 in case of the feature NOT (=negation), the string "un" will be added to the left of the entry, and nothing will be deleted dress>undress
replacement PLR:=”oo”:”ee” in case of the feature "PLR” (=plural), the "oo" string will be replaced by "ee" foot>feet, tooth>teeth
replacement PLR:=[2;3]:”ee” in case of the feature "PLR” (=plural), the string "ee" will replace the string that goes from the second to the third character foot>feet, tooth>teeth
replacement 1PS&ET1&IND:=”am” in case of the features “1PS” (=first person of singular) AND “ET1” (=present tense) AND “IND” (indicative), the whole string will be replaced by “am” be>am
Software