-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
testi.py
41 lines (27 loc) · 1.13 KB
/
testi.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#encoding: utf-8
from syntaxmaker.syntax_maker import *
"""
vp = create_verb_pharse("uneksia")
add_auxiliary_verb_to_vp(vp)
subject = create_phrase("NP", "rantaleijona", {u"PERS": "3", u"NUM": "PL"})
dobject = create_phrase("NP", "aalto", {u"PERS": "3", u"NUM": "PL"})
dobject.components["attribute"] = create_phrase("AP", "korkea")
dobject.components["attribute"].components["attribute"] = create_phrase("AdvP", "erittäin")
vp.order.insert(0, "Advl")
advl = {u"CASE": "Ess" }
vp.governance["Advl"] = advl
vp.components["Advl"] = create_phrase("NP","hipsteri",{u"PERS": "3", u"NUM": "PL"})
vp.components["subject"] = subject
vp.components["dir_object"] = dobject
print vp
"""
vp = create_verb_pharse("antaa")
subject = create_phrase("NP", "hevonen", {"NUM": "PL"})
dobject = create_phrase("NP", "lahja", {"NUM": "PL"})
dobject.components["attribute"] = create_phrase("AP", "mahtava")
dobject.components["attribute"].components["attribute"] = create_phrase("AdvP", "erittäin")
indobject = create_phrase("NP", "lehmä")
vp.components["subject"] = subject
vp.components["dir_object"] = dobject
vp.components["indir_object"] = indobject
print(vp)