-
-
Notifications
You must be signed in to change notification settings - Fork 4
Phrase and Head objects
Mika Hämäläinen edited this page Sep 1, 2017
·
4 revisions
When a phrase is created, a Phrase object is instantiated. This object has the following variables you can modify by your self or through syntax_maker's methods:
- head contains a Head object, i.e. the head word of the phrase
- components a list of components of the phrase derived from the grammar.json. Such as {"subject": "NP", "dir_object": "NP", "indir_object": "NP"}
- order the order of components and the head when the phrase is printed as defined in grammar.json. ["subject", "head", "dir_object", "indir_object"]
- agreement as in grammar.json. Affects on the head words morphology. { "subject": ["PERS", "NUM"]}
- governance added in runtime for verb phrases and adposition phrases according to word specific rules. {"dir_object": {"CASE": "Gen"}, "indir_object": {"CASE": "All"}}
- morphology additional rules that can be specified when creating a phrase
This object stores a lemmatized word form. It has the following variables:
- lemma a string containing the word. This may also be None if you need to create phrases that will not be printed such as with pro drop.
- pos "part-of-speech" used to get the correct inflection from Omorfi.