nlptoolkit-morphologicalanalysis 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -1
- package/dist/MorphologicalAnalysis/FsmMorphologicalAnalyzer.d.ts +7 -0
- package/dist/MorphologicalAnalysis/FsmMorphologicalAnalyzer.js +15 -0
- package/dist/MorphologicalAnalysis/FsmMorphologicalAnalyzer.js.map +1 -1
- package/dist/MorphologicalAnalysis/FsmParse.d.ts +6 -0
- package/dist/MorphologicalAnalysis/FsmParse.js +44 -28
- package/dist/MorphologicalAnalysis/FsmParse.js.map +1 -1
- package/dist/MorphologicalAnalysis/FsmParseList.d.ts +10 -1
- package/dist/MorphologicalAnalysis/FsmParseList.js +110 -2
- package/dist/MorphologicalAnalysis/FsmParseList.js.map +1 -1
- package/dist/MorphologicalAnalysis/InflectionalGroup.js +3 -2
- package/dist/MorphologicalAnalysis/InflectionalGroup.js.map +1 -1
- package/dist/MorphologicalAnalysis/MorphologicalTag.d.ts +9 -1
- package/dist/MorphologicalAnalysis/MorphologicalTag.js +8 -0
- package/dist/MorphologicalAnalysis/MorphologicalTag.js.map +1 -1
- package/dist/MorphologicalAnalysis/Transition.js +1 -1
- package/package.json +5 -5
- package/parses/ac/314/247/304/261kla.txt +699 -0
- package/parses/ak.txt +873 -0
- package/parses/aksa.txt +536 -0
- package/parses/anla.txt +702 -0
- package/parses/azal.txt +629 -0
- package/parses/bo/314/210l.txt +528 -0
- package/parses/bul.txt +528 -0
- package/parses/cenk.txt +434 -0
- package/parses/cevapla.txt +865 -0
- package/parses/cos/314/247.txt +527 -0
- package/parses/c/314/247o/314/210k.txt +545 -0
- package/parses/c/314/247/304/261k.txt +535 -0
- package/parses/del.txt +480 -0
- package/parses/doldur.txt +479 -0
- package/parses/emlak.txt +178 -0
- package/parses/git.txt +575 -0
- package/parses/giy.txt +572 -0
- package/parses/go/314/210c/314/247.txt +853 -0
- package/parses/go/314/210ster.txt +628 -0
- package/parses/hal.txt +367 -0
- package/parses/kalp.txt +1060 -0
- package/parses/kavur.txt +783 -0
- package/parses/kaydol.txt +677 -0
- package/parses/resim.txt +403 -0
- package/parses/s/304/261ska.txt +351 -0
- package/parses/ye.txt +537 -0
- package/parses/yemek.txt +330 -0
- package/parses/y/304/261ka.txt +1015 -0
- package/parses/y/304/261ldo/314/210nu/314/210mu/314/210.txt +184 -0
- package/source/MorphologicalAnalysis/FsmMorphologicalAnalyzer.ts +15 -0
- package/source/MorphologicalAnalysis/FsmParse.ts +39 -25
- package/source/MorphologicalAnalysis/FsmParseList.ts +111 -2
- package/source/MorphologicalAnalysis/InflectionalGroup.ts +3 -2
- package/source/MorphologicalAnalysis/MorphologicalTag.ts +9 -1
- package/source/MorphologicalAnalysis/Transition.ts +1 -1
- package/tests/FiniteStateMachineTest.ts +2 -2
- package/tests/FsmMorphologicalAnalyzerTest.ts +28 -0
- package/tests/FsmParseListTest.ts +8 -0
- package/turkish_finite_state_machine.xml +4 -0
- package/turkish_morphological_lexicon.txt +48155 -0
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
yıldönümümü yıldönüm+NOUN+A3SG+P1SG+ACC
|
|
2
|
+
yıldönümümce yıldönüm+NOUN+A3SG+P1SG+EQU
|
|
3
|
+
yıldönümünü yıldönüm+NOUN+A3SG+P2SG+ACC
|
|
4
|
+
yıldönümünce yıldönüm+NOUN+A3SG+P2SG+EQU
|
|
5
|
+
yıldönümümüzü yıldönüm+NOUN+A3SG+P1PL+ACC
|
|
6
|
+
yıldönümümüzce yıldönüm+NOUN+A3SG+P1PL+EQU
|
|
7
|
+
yıldönümünüzü yıldönüm+NOUN+A3SG+P2PL+ACC
|
|
8
|
+
yıldönümünüzce yıldönüm+NOUN+A3SG+P2PL+EQU
|
|
9
|
+
yıldönümünü yıldönüm+NOUN+A3SG+P3SG+ACC
|
|
10
|
+
yıldönümü'nü yıldönüm+NOUN+A3SG+P3SG+ACC
|
|
11
|
+
yıldönümünce yıldönüm+NOUN+A3SG+P3SG+EQU
|
|
12
|
+
yıldönümü'nce yıldönüm+NOUN+A3SG+P3SG+EQU
|
|
13
|
+
yıldönümlerini yıldönüm+NOUN+A3PL+P3PL+ACC
|
|
14
|
+
yıldönümlersel yıldönüm+NOUN+A3PL+PNON+NOM^DB+ADJ+RELATED
|
|
15
|
+
yıldönümlerli yıldönüm+NOUN+A3PL+PNON+NOM^DB+ADJ+WITH
|
|
16
|
+
yıldönümlersiz yıldönüm+NOUN+A3PL+PNON+NOM^DB+ADJ+WITHOUT
|
|
17
|
+
yıldönümüm yıldönüm+NOUN+A3SG+P1SG+NOM
|
|
18
|
+
yıldönümümlük yıldönüm+NOUN+A3SG+P1SG+NOM^DB+ADJ+FITFOR
|
|
19
|
+
yıldönümümüm yıldönüm+NOUN+A3SG+P1SG+NOM^DB+VERB+ZERO+PRES+A1SG
|
|
20
|
+
yıldönümümsün yıldönüm+NOUN+A3SG+P1SG+NOM^DB+VERB+ZERO+PRES+A2SG
|
|
21
|
+
yıldönümümüz yıldönüm+NOUN+A3SG+P1SG+NOM^DB+VERB+ZERO+PRES+A1PL
|
|
22
|
+
yıldönümümler yıldönüm+NOUN+A3SG+P1SG+NOM^DB+VERB+ZERO+PRES+A3PL
|
|
23
|
+
yıldönümümken yıldönüm+NOUN+A3SG+P1SG+NOM^DB+VERB+ZERO^DB+ADV+WHILE
|
|
24
|
+
yıldönümüme yıldönüm+NOUN+A3SG+P1SG+DAT
|
|
25
|
+
yıldönümümelik yıldönüm+NOUN+A3SG+P1SG+DAT^DB+ADJ+FITFOR
|
|
26
|
+
yıldönümümeyim yıldönüm+NOUN+A3SG+P1SG+DAT^DB+VERB+ZERO+PRES+A1SG
|
|
27
|
+
yıldönümümesin yıldönüm+NOUN+A3SG+P1SG+DAT^DB+VERB+ZERO+PRES+A2SG
|
|
28
|
+
yıldönümümeyiz yıldönüm+NOUN+A3SG+P1SG+DAT^DB+VERB+ZERO+PRES+A1PL
|
|
29
|
+
yıldönümümeler yıldönüm+NOUN+A3SG+P1SG+DAT^DB+VERB+ZERO+PRES+A3PL
|
|
30
|
+
yıldönümümde yıldönüm+NOUN+A3SG+P1SG+LOC
|
|
31
|
+
yıldönümümden yıldönüm+NOUN+A3SG+P1SG+ABL
|
|
32
|
+
yıldönümümün yıldönüm+NOUN+A3SG+P1SG+GEN
|
|
33
|
+
yıldönümümünüm yıldönüm+NOUN+A3SG+P1SG+GEN^DB+VERB+ZERO+PRES+A1SG
|
|
34
|
+
yıldönümümünüz yıldönüm+NOUN+A3SG+P1SG+GEN^DB+VERB+ZERO+PRES+A1PL
|
|
35
|
+
yıldönümümle yıldönüm+NOUN+A3SG+P1SG+INS
|
|
36
|
+
yıldönümün yıldönüm+NOUN+A3SG+P2SG+NOM
|
|
37
|
+
yıldönümünlük yıldönüm+NOUN+A3SG+P2SG+NOM^DB+ADJ+FITFOR
|
|
38
|
+
yıldönümünüm yıldönüm+NOUN+A3SG+P2SG+NOM^DB+VERB+ZERO+PRES+A1SG
|
|
39
|
+
yıldönümünsün yıldönüm+NOUN+A3SG+P2SG+NOM^DB+VERB+ZERO+PRES+A2SG
|
|
40
|
+
yıldönümünüz yıldönüm+NOUN+A3SG+P2SG+NOM^DB+VERB+ZERO+PRES+A1PL
|
|
41
|
+
yıldönümünler yıldönüm+NOUN+A3SG+P2SG+NOM^DB+VERB+ZERO+PRES+A3PL
|
|
42
|
+
yıldönümünken yıldönüm+NOUN+A3SG+P2SG+NOM^DB+VERB+ZERO^DB+ADV+WHILE
|
|
43
|
+
yıldönümüne yıldönüm+NOUN+A3SG+P2SG+DAT
|
|
44
|
+
yıldönümünelik yıldönüm+NOUN+A3SG+P2SG+DAT^DB+ADJ+FITFOR
|
|
45
|
+
yıldönümüneyim yıldönüm+NOUN+A3SG+P2SG+DAT^DB+VERB+ZERO+PRES+A1SG
|
|
46
|
+
yıldönümünesin yıldönüm+NOUN+A3SG+P2SG+DAT^DB+VERB+ZERO+PRES+A2SG
|
|
47
|
+
yıldönümüneyiz yıldönüm+NOUN+A3SG+P2SG+DAT^DB+VERB+ZERO+PRES+A1PL
|
|
48
|
+
yıldönümüneler yıldönüm+NOUN+A3SG+P2SG+DAT^DB+VERB+ZERO+PRES+A3PL
|
|
49
|
+
yıldönümünde yıldönüm+NOUN+A3SG+P2SG+LOC
|
|
50
|
+
yıldönümünden yıldönüm+NOUN+A3SG+P2SG+ABL
|
|
51
|
+
yıldönümünün yıldönüm+NOUN+A3SG+P2SG+GEN
|
|
52
|
+
yıldönümününüm yıldönüm+NOUN+A3SG+P2SG+GEN^DB+VERB+ZERO+PRES+A1SG
|
|
53
|
+
yıldönümününüz yıldönüm+NOUN+A3SG+P2SG+GEN^DB+VERB+ZERO+PRES+A1PL
|
|
54
|
+
yıldönümünle yıldönüm+NOUN+A3SG+P2SG+INS
|
|
55
|
+
yıldönümümüz yıldönüm+NOUN+A3SG+P1PL+NOM
|
|
56
|
+
yıldönümümüzüm yıldönüm+NOUN+A3SG+P1PL+NOM^DB+VERB+ZERO+PRES+A1SG
|
|
57
|
+
yıldönümümüzüz yıldönüm+NOUN+A3SG+P1PL+NOM^DB+VERB+ZERO+PRES+A1PL
|
|
58
|
+
yıldönümümüze yıldönüm+NOUN+A3SG+P1PL+DAT
|
|
59
|
+
yıldönümümüzde yıldönüm+NOUN+A3SG+P1PL+LOC
|
|
60
|
+
yıldönümümüzün yıldönüm+NOUN+A3SG+P1PL+GEN
|
|
61
|
+
yıldönümümüzle yıldönüm+NOUN+A3SG+P1PL+INS
|
|
62
|
+
yıldönümünüz yıldönüm+NOUN+A3SG+P2PL+NOM
|
|
63
|
+
yıldönümünüzüm yıldönüm+NOUN+A3SG+P2PL+NOM^DB+VERB+ZERO+PRES+A1SG
|
|
64
|
+
yıldönümünüzüz yıldönüm+NOUN+A3SG+P2PL+NOM^DB+VERB+ZERO+PRES+A1PL
|
|
65
|
+
yıldönümünüze yıldönüm+NOUN+A3SG+P2PL+DAT
|
|
66
|
+
yıldönümünüzde yıldönüm+NOUN+A3SG+P2PL+LOC
|
|
67
|
+
yıldönümünüzün yıldönüm+NOUN+A3SG+P2PL+GEN
|
|
68
|
+
yıldönümünüzle yıldönüm+NOUN+A3SG+P2PL+INS
|
|
69
|
+
yıldönümü yıldönüm+NOUN+A3SG+P3SG+NOM
|
|
70
|
+
yıldönümülük yıldönüm+NOUN+A3SG+P3SG+NOM^DB+ADJ+FITFOR
|
|
71
|
+
yıldönümüyüm yıldönüm+NOUN+A3SG+P3SG+NOM^DB+VERB+ZERO+PRES+A1SG
|
|
72
|
+
yıldönümüsün yıldönüm+NOUN+A3SG+P3SG+NOM^DB+VERB+ZERO+PRES+A2SG
|
|
73
|
+
yıldönümüyüz yıldönüm+NOUN+A3SG+P3SG+NOM^DB+VERB+ZERO+PRES+A1PL
|
|
74
|
+
yıldönümüsünüz yıldönüm+NOUN+A3SG+P3SG+NOM^DB+VERB+ZERO+PRES+A2PL
|
|
75
|
+
yıldönümüler yıldönüm+NOUN+A3SG+P3SG+NOM^DB+VERB+ZERO+PRES+A3PL
|
|
76
|
+
yıldönümüyken yıldönüm+NOUN+A3SG+P3SG+NOM^DB+VERB+ZERO^DB+ADV+WHILE
|
|
77
|
+
yıldönümüne yıldönüm+NOUN+A3SG+P3SG+DAT
|
|
78
|
+
yıldönümünelik yıldönüm+NOUN+A3SG+P3SG+DAT^DB+ADJ+FITFOR
|
|
79
|
+
yıldönümüneyim yıldönüm+NOUN+A3SG+P3SG+DAT^DB+VERB+ZERO+PRES+A1SG
|
|
80
|
+
yıldönümünesin yıldönüm+NOUN+A3SG+P3SG+DAT^DB+VERB+ZERO+PRES+A2SG
|
|
81
|
+
yıldönümüneyiz yıldönüm+NOUN+A3SG+P3SG+DAT^DB+VERB+ZERO+PRES+A1PL
|
|
82
|
+
yıldönümüneler yıldönüm+NOUN+A3SG+P3SG+DAT^DB+VERB+ZERO+PRES+A3PL
|
|
83
|
+
yıldönümü'ne yıldönüm+NOUN+A3SG+P3SG+DAT
|
|
84
|
+
yıldönümünde yıldönüm+NOUN+A3SG+P3SG+LOC
|
|
85
|
+
yıldönümü'nde yıldönüm+NOUN+A3SG+P3SG+LOC
|
|
86
|
+
yıldönümünden yıldönüm+NOUN+A3SG+P3SG+ABL
|
|
87
|
+
yıldönümü'nden yıldönüm+NOUN+A3SG+P3SG+ABL
|
|
88
|
+
yıldönümünün yıldönüm+NOUN+A3SG+P3SG+GEN
|
|
89
|
+
yıldönümününüm yıldönüm+NOUN+A3SG+P3SG+GEN^DB+VERB+ZERO+PRES+A1SG
|
|
90
|
+
yıldönümününüz yıldönüm+NOUN+A3SG+P3SG+GEN^DB+VERB+ZERO+PRES+A1PL
|
|
91
|
+
yıldönümü'nün yıldönüm+NOUN+A3SG+P3SG+GEN
|
|
92
|
+
yıldönümüyle yıldönüm+NOUN+A3SG+P3SG+INS
|
|
93
|
+
yıldönümü'yle yıldönüm+NOUN+A3SG+P3SG+INS
|
|
94
|
+
yıldönümleri yıldönüm+NOUN+A3PL+P3PL+NOM
|
|
95
|
+
yıldönümlerine yıldönüm+NOUN+A3PL+P3PL+DAT
|
|
96
|
+
yıldönümleri yıldönüm+NOUN+A3PL+PNON+ACC
|
|
97
|
+
yıldönümlerce yıldönüm+NOUN+A3PL+PNON+EQU
|
|
98
|
+
yıldönümlerimi yıldönüm+NOUN+A3PL+P1SG+ACC
|
|
99
|
+
yıldönümlerini yıldönüm+NOUN+A3PL+P2SG+ACC
|
|
100
|
+
yıldönümlerini yıldönüm+NOUN+A3PL+P3SG+ACC
|
|
101
|
+
yıldönümümdü yıldönüm+NOUN+A3SG+P1SG+NOM^DB+VERB+ZERO+PAST+A3SG
|
|
102
|
+
yıldönümümdüm yıldönüm+NOUN+A3SG+P1SG+NOM^DB+VERB+ZERO+PAST+A1SG
|
|
103
|
+
yıldönümümdün yıldönüm+NOUN+A3SG+P1SG+NOM^DB+VERB+ZERO+PAST+A2SG
|
|
104
|
+
yıldönümümdük yıldönüm+NOUN+A3SG+P1SG+NOM^DB+VERB+ZERO+PAST+A1PL
|
|
105
|
+
yıldönümümse yıldönüm+NOUN+A3SG+P1SG+NOM^DB+VERB+ZERO+COND+A3SG
|
|
106
|
+
yıldönümümsem yıldönüm+NOUN+A3SG+P1SG+NOM^DB+VERB+ZERO+COND+A1SG
|
|
107
|
+
yıldönümümsen yıldönüm+NOUN+A3SG+P1SG+NOM^DB+VERB+ZERO+COND+A2SG
|
|
108
|
+
yıldönümümsek yıldönüm+NOUN+A3SG+P1SG+NOM^DB+VERB+ZERO+COND+A1PL
|
|
109
|
+
yıldönümümdür yıldönüm+NOUN+A3SG+P1SG+NOM^DB+VERB+ZERO+PRES+COP+A3SG
|
|
110
|
+
yıldönümümeydi yıldönüm+NOUN+A3SG+P1SG+DAT^DB+VERB+ZERO+PAST+A3SG
|
|
111
|
+
yıldönümümeyse yıldönüm+NOUN+A3SG+P1SG+DAT^DB+VERB+ZERO+COND+A3SG
|
|
112
|
+
yıldönümümedir yıldönüm+NOUN+A3SG+P1SG+DAT^DB+VERB+ZERO+PRES+COP+A3SG
|
|
113
|
+
yıldönümümündü yıldönüm+NOUN+A3SG+P1SG+GEN^DB+VERB+ZERO+PAST+A3SG
|
|
114
|
+
yıldönümümünse yıldönüm+NOUN+A3SG+P1SG+GEN^DB+VERB+ZERO+COND+A3SG
|
|
115
|
+
yıldönümündü yıldönüm+NOUN+A3SG+P2SG+NOM^DB+VERB+ZERO+PAST+A3SG
|
|
116
|
+
yıldönümündüm yıldönüm+NOUN+A3SG+P2SG+NOM^DB+VERB+ZERO+PAST+A1SG
|
|
117
|
+
yıldönümündün yıldönüm+NOUN+A3SG+P2SG+NOM^DB+VERB+ZERO+PAST+A2SG
|
|
118
|
+
yıldönümündük yıldönüm+NOUN+A3SG+P2SG+NOM^DB+VERB+ZERO+PAST+A1PL
|
|
119
|
+
yıldönümünse yıldönüm+NOUN+A3SG+P2SG+NOM^DB+VERB+ZERO+COND+A3SG
|
|
120
|
+
yıldönümünsem yıldönüm+NOUN+A3SG+P2SG+NOM^DB+VERB+ZERO+COND+A1SG
|
|
121
|
+
yıldönümünsen yıldönüm+NOUN+A3SG+P2SG+NOM^DB+VERB+ZERO+COND+A2SG
|
|
122
|
+
yıldönümünsek yıldönüm+NOUN+A3SG+P2SG+NOM^DB+VERB+ZERO+COND+A1PL
|
|
123
|
+
yıldönümündür yıldönüm+NOUN+A3SG+P2SG+NOM^DB+VERB+ZERO+PRES+COP+A3SG
|
|
124
|
+
yıldönümüneydi yıldönüm+NOUN+A3SG+P2SG+DAT^DB+VERB+ZERO+PAST+A3SG
|
|
125
|
+
yıldönümüneyse yıldönüm+NOUN+A3SG+P2SG+DAT^DB+VERB+ZERO+COND+A3SG
|
|
126
|
+
yıldönümünedir yıldönüm+NOUN+A3SG+P2SG+DAT^DB+VERB+ZERO+PRES+COP+A3SG
|
|
127
|
+
yıldönümünündü yıldönüm+NOUN+A3SG+P2SG+GEN^DB+VERB+ZERO+PAST+A3SG
|
|
128
|
+
yıldönümününse yıldönüm+NOUN+A3SG+P2SG+GEN^DB+VERB+ZERO+COND+A3SG
|
|
129
|
+
yıldönümümüzdü yıldönüm+NOUN+A3SG+P1PL+NOM^DB+VERB+ZERO+PAST+A3SG
|
|
130
|
+
yıldönümümüzse yıldönüm+NOUN+A3SG+P1PL+NOM^DB+VERB+ZERO+COND+A3SG
|
|
131
|
+
yıldönümünüzdü yıldönüm+NOUN+A3SG+P2PL+NOM^DB+VERB+ZERO+PAST+A3SG
|
|
132
|
+
yıldönümünüzse yıldönüm+NOUN+A3SG+P2PL+NOM^DB+VERB+ZERO+COND+A3SG
|
|
133
|
+
yıldönümüydü yıldönüm+NOUN+A3SG+P3SG+NOM^DB+VERB+ZERO+PAST+A3SG
|
|
134
|
+
yıldönümüydüm yıldönüm+NOUN+A3SG+P3SG+NOM^DB+VERB+ZERO+PAST+A1SG
|
|
135
|
+
yıldönümüydün yıldönüm+NOUN+A3SG+P3SG+NOM^DB+VERB+ZERO+PAST+A2SG
|
|
136
|
+
yıldönümüydük yıldönüm+NOUN+A3SG+P3SG+NOM^DB+VERB+ZERO+PAST+A1PL
|
|
137
|
+
yıldönümüyse yıldönüm+NOUN+A3SG+P3SG+NOM^DB+VERB+ZERO+COND+A3SG
|
|
138
|
+
yıldönümüysem yıldönüm+NOUN+A3SG+P3SG+NOM^DB+VERB+ZERO+COND+A1SG
|
|
139
|
+
yıldönümüysen yıldönüm+NOUN+A3SG+P3SG+NOM^DB+VERB+ZERO+COND+A2SG
|
|
140
|
+
yıldönümüysek yıldönüm+NOUN+A3SG+P3SG+NOM^DB+VERB+ZERO+COND+A1PL
|
|
141
|
+
yıldönümüdür yıldönüm+NOUN+A3SG+P3SG+NOM^DB+VERB+ZERO+PRES+COP+A3SG
|
|
142
|
+
yıldönümüneydi yıldönüm+NOUN+A3SG+P3SG+DAT^DB+VERB+ZERO+PAST+A3SG
|
|
143
|
+
yıldönümüneyse yıldönüm+NOUN+A3SG+P3SG+DAT^DB+VERB+ZERO+COND+A3SG
|
|
144
|
+
yıldönümünedir yıldönüm+NOUN+A3SG+P3SG+DAT^DB+VERB+ZERO+PRES+COP+A3SG
|
|
145
|
+
yıldönümünündü yıldönüm+NOUN+A3SG+P3SG+GEN^DB+VERB+ZERO+PAST+A3SG
|
|
146
|
+
yıldönümününse yıldönüm+NOUN+A3SG+P3SG+GEN^DB+VERB+ZERO+COND+A3SG
|
|
147
|
+
yıldönümler yıldönüm+NOUN+A3PL+PNON+NOM
|
|
148
|
+
yıldönümlerlik yıldönüm+NOUN+A3PL+PNON+NOM^DB+ADJ+FITFOR
|
|
149
|
+
yıldönümlersin yıldönüm+NOUN+A3PL+PNON+NOM^DB+VERB+ZERO+PRES+A2SG
|
|
150
|
+
yıldönümleriz yıldönüm+NOUN+A3PL+PNON+NOM^DB+VERB+ZERO+PRES+A1PL
|
|
151
|
+
yıldönümlerler yıldönüm+NOUN+A3PL+PNON+NOM^DB+VERB+ZERO+PRES+A3PL
|
|
152
|
+
yıldönümlerken yıldönüm+NOUN+A3PL+PNON+NOM^DB+VERB+ZERO^DB+ADV+WHILE
|
|
153
|
+
yıldönümlere yıldönüm+NOUN+A3PL+PNON+DAT
|
|
154
|
+
yıldönümlerde yıldönüm+NOUN+A3PL+PNON+LOC
|
|
155
|
+
yıldönümlerden yıldönüm+NOUN+A3PL+PNON+ABL
|
|
156
|
+
yıldönümlerin yıldönüm+NOUN+A3PL+PNON+GEN
|
|
157
|
+
yıldönümlerle yıldönüm+NOUN+A3PL+PNON+INS
|
|
158
|
+
yıldönümlerim yıldönüm+NOUN+A3PL+P1SG+NOM
|
|
159
|
+
yıldönümlerime yıldönüm+NOUN+A3PL+P1SG+DAT
|
|
160
|
+
yıldönümlerin yıldönüm+NOUN+A3PL+P2SG+NOM
|
|
161
|
+
yıldönümlerine yıldönüm+NOUN+A3PL+P2SG+DAT
|
|
162
|
+
yıldönümleri yıldönüm+NOUN+A3PL+P3SG+NOM
|
|
163
|
+
yıldönümlerine yıldönüm+NOUN+A3PL+P3SG+DAT
|
|
164
|
+
yıldönümümmüş yıldönüm+NOUN+A3SG+P1SG+NOM^DB+VERB+ZERO+NARR+A3SG
|
|
165
|
+
yıldönümümdeki yıldönüm+NOUN+A3SG+P1SG+LOC^DB+ADJ+REL
|
|
166
|
+
yıldönümümünki yıldönüm+NOUN+A3SG+P1SG+GEN^DB+ADJ+REL
|
|
167
|
+
yıldönümünmüş yıldönüm+NOUN+A3SG+P2SG+NOM^DB+VERB+ZERO+NARR+A3SG
|
|
168
|
+
yıldönümündeki yıldönüm+NOUN+A3SG+P2SG+LOC^DB+ADJ+REL
|
|
169
|
+
yıldönümününki yıldönüm+NOUN+A3SG+P2SG+GEN^DB+ADJ+REL
|
|
170
|
+
yıldönümüymüş yıldönüm+NOUN+A3SG+P3SG+NOM^DB+VERB+ZERO+NARR+A3SG
|
|
171
|
+
yıldönümündeki yıldönüm+NOUN+A3SG+P3SG+LOC^DB+ADJ+REL
|
|
172
|
+
yıldönümününki yıldönüm+NOUN+A3SG+P3SG+GEN^DB+ADJ+REL
|
|
173
|
+
yıldönümlerdi yıldönüm+NOUN+A3PL+PNON+NOM^DB+VERB+ZERO+PAST+A3SG
|
|
174
|
+
yıldönümlerdim yıldönüm+NOUN+A3PL+PNON+NOM^DB+VERB+ZERO+PAST+A1SG
|
|
175
|
+
yıldönümlerdin yıldönüm+NOUN+A3PL+PNON+NOM^DB+VERB+ZERO+PAST+A2SG
|
|
176
|
+
yıldönümlerdik yıldönüm+NOUN+A3PL+PNON+NOM^DB+VERB+ZERO+PAST+A1PL
|
|
177
|
+
yıldönümlerse yıldönüm+NOUN+A3PL+PNON+NOM^DB+VERB+ZERO+COND+A3SG
|
|
178
|
+
yıldönümlersem yıldönüm+NOUN+A3PL+PNON+NOM^DB+VERB+ZERO+COND+A1SG
|
|
179
|
+
yıldönümlersen yıldönüm+NOUN+A3PL+PNON+NOM^DB+VERB+ZERO+COND+A2SG
|
|
180
|
+
yıldönümlersek yıldönüm+NOUN+A3PL+PNON+NOM^DB+VERB+ZERO+COND+A1PL
|
|
181
|
+
yıldönümlerdir yıldönüm+NOUN+A3PL+PNON+NOM^DB+VERB+ZERO+PRES+COP+A3SG
|
|
182
|
+
yıldönümlermiş yıldönüm+NOUN+A3PL+PNON+NOM^DB+VERB+ZERO+NARR+A3SG
|
|
183
|
+
yıldönümlerlim yıldönüm+NOUN+A3PL+PNON+NOM^DB+ADJ+WITH^DB+NOUN+ZERO+A3SG+P1SG+NOM
|
|
184
|
+
yıldönümlerlin yıldönüm+NOUN+A3PL+PNON+NOM^DB+ADJ+WITH^DB+NOUN+ZERO+A3SG+P2SG+NOM
|
|
@@ -233,6 +233,13 @@ export class FsmMorphologicalAnalyzer {
|
|
|
233
233
|
* !isPlural, !isPortmanteau and isDuplicate, if root holds the conditions then it gets the state
|
|
234
234
|
* with the name of DuplicateRoot.
|
|
235
235
|
* Ex : Allak,
|
|
236
|
+
* !isPlural, !isPortmanteau and isCode, if root holds the conditions then it gets the state
|
|
237
|
+
* with the name of CodeRoot.
|
|
238
|
+
* Ex : 9400f,
|
|
239
|
+
* <p>
|
|
240
|
+
* !isPlural, !isPortmanteau and isMetric, if root holds the conditions then it gets the state
|
|
241
|
+
* with the name of MetricRoot.
|
|
242
|
+
* Ex : 11x8x12,
|
|
236
243
|
* <p>
|
|
237
244
|
* !isPlural, !isPortmanteau and isNumeral, if root holds the conditions then it gets the state
|
|
238
245
|
* with the name of CardinalRoot.
|
|
@@ -375,6 +382,14 @@ export class FsmMorphologicalAnalyzer {
|
|
|
375
382
|
currentFsmParse = new FsmParse(root, this.finiteStateMachine.getState("DuplicateRoot"));
|
|
376
383
|
fsmParse.push(currentFsmParse);
|
|
377
384
|
}
|
|
385
|
+
if (root.isCode()) {
|
|
386
|
+
currentFsmParse = new FsmParse(root, this.finiteStateMachine.getState("CodeRoot"));
|
|
387
|
+
fsmParse.push(currentFsmParse);
|
|
388
|
+
}
|
|
389
|
+
if (root.isMetric()) {
|
|
390
|
+
currentFsmParse = new FsmParse(root, this.finiteStateMachine.getState("MetricRoot"));
|
|
391
|
+
fsmParse.push(currentFsmParse);
|
|
392
|
+
}
|
|
378
393
|
if (root.isNumeral()) {
|
|
379
394
|
currentFsmParse = new FsmParse(root, this.finiteStateMachine.getState("CardinalRoot"));
|
|
380
395
|
fsmParse.push(currentFsmParse);
|
|
@@ -438,6 +438,12 @@ export class FsmParse extends MorphologicalParse{
|
|
|
438
438
|
* If it is "DuplicateRoot", it assigns concatenation of first item of formList and +DUP to the result String.
|
|
439
439
|
* Ex : Allak
|
|
440
440
|
* <p>
|
|
441
|
+
* If it is "CodeRoot", it assigns concatenation of first item of formList and +CODE to the result String.
|
|
442
|
+
* Ex : 5000-WX
|
|
443
|
+
* <p>
|
|
444
|
+
* If it is "MetricRoot", it assigns concatenation of first item of formList and +METRIC to the result String.
|
|
445
|
+
* Ex : 6cmx12cm
|
|
446
|
+
* <p>
|
|
441
447
|
* If it is "QuestionRoot", it assigns concatenation of first item of formList and +QUES to the result String.
|
|
442
448
|
* Ex : Mı
|
|
443
449
|
* <p>
|
|
@@ -538,40 +544,48 @@ export class FsmParse extends MorphologicalParse{
|
|
|
538
544
|
if (this.suffixList[0].getName() == "DuplicateRoot") {
|
|
539
545
|
result = this.formList[0] + "+DUP";
|
|
540
546
|
} else {
|
|
541
|
-
if (this.suffixList[0].getName() == "
|
|
542
|
-
result = "
|
|
547
|
+
if (this.suffixList[0].getName() == "CodeRoot"){
|
|
548
|
+
result = this.formList[0] + "+CODE";
|
|
543
549
|
} else {
|
|
544
|
-
if (this.suffixList[0].getName() == "
|
|
545
|
-
|
|
546
|
-
|
|
550
|
+
if (this.suffixList[0].getName() == "MetricRoot"){
|
|
551
|
+
result = this.formList[0] + "+METRIC";
|
|
552
|
+
} else {
|
|
553
|
+
if (this.suffixList[0].getName() == "QuestionRoot") {
|
|
554
|
+
result = "mi+QUES";
|
|
547
555
|
} else {
|
|
548
|
-
if (this.
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
if (this.formList[0] == "yanısıra") {
|
|
552
|
-
result = this.formList[0] + "+POSTP+PCGEN";
|
|
556
|
+
if (this.suffixList[0].getName() == "PostP") {
|
|
557
|
+
if (this.formList[0] == "karşı" || this.formList[0] == "ilişkin" || this.formList[0] == "göre" || this.formList[0] == "kadar" || this.formList[0] == "ait" || this.formList[0] == "yönelik" || this.formList[0] == "rağmen" || this.formList[0] == "değin" || this.formList[0] == "dek" || this.formList[0] == "doğru" || this.formList[0] == "karşın" || this.formList[0] == "dair" || this.formList[0] == "atfen" || this.formList[0] == "binaen" || this.formList[0] == "hitaben" || this.formList[0] == "istinaden" || this.formList[0] == "mahsuben" || this.formList[0] == "mukabil" || this.formList[0] == "nazaran") {
|
|
558
|
+
result = this.formList[0] + "+POSTP+PCDAT";
|
|
553
559
|
} else {
|
|
554
|
-
if (this.formList[0] == "
|
|
555
|
-
result = this.formList[0] + "+POSTP+
|
|
560
|
+
if (this.formList[0] == "sonra" || this.formList[0] == "önce" || this.formList[0] == "beri" || this.formList[0] == "fazla" || this.formList[0] == "dolayı" || this.formList[0] == "itibaren" || this.formList[0] == "başka" || this.formList[0] == "çok" || this.formList[0] == "evvel" || this.formList[0] == "ötürü" || this.formList[0] == "yana" || this.formList[0] == "öte" || this.formList[0] == "aşağı" || this.formList[0] == "yukarı" || this.formList[0] == "dışarı" || this.formList[0] == "az" || this.formList[0] == "gayrı") {
|
|
561
|
+
result = this.formList[0] + "+POSTP+PCABL";
|
|
556
562
|
} else {
|
|
557
|
-
if (this.formList[0] == "
|
|
558
|
-
result = this.formList[0] + "+POSTP+
|
|
563
|
+
if (this.formList[0] == "yanısıra") {
|
|
564
|
+
result = this.formList[0] + "+POSTP+PCGEN";
|
|
559
565
|
} else {
|
|
560
|
-
|
|
566
|
+
if (this.formList[0] == "birlikte" || this.formList[0] == "beraber") {
|
|
567
|
+
result = this.formList[0] + "+POSTP+PCINS";
|
|
568
|
+
} else {
|
|
569
|
+
if (this.formList[0] == "aşkın" || this.formList[0] == "takiben") {
|
|
570
|
+
result = this.formList[0] + "+POSTP+PCACC";
|
|
571
|
+
} else {
|
|
572
|
+
result = this.formList[0] + "+POSTP+PCNOM";
|
|
573
|
+
}
|
|
574
|
+
}
|
|
561
575
|
}
|
|
562
576
|
}
|
|
563
577
|
}
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
} else {
|
|
567
|
-
if (this.suffixList[0].getName().startsWith("PronounRoot")) {
|
|
568
|
-
result = this.pronounTransition();
|
|
569
|
-
} else {
|
|
570
|
-
if (this.suffixList[0].getName() == "OrdinalRoot") {
|
|
571
|
-
result = this.formList[0] + "+NUM+ORD";
|
|
572
578
|
} else {
|
|
573
|
-
if (this.suffixList[0].getName().startsWith("
|
|
574
|
-
result = this.
|
|
579
|
+
if (this.suffixList[0].getName().startsWith("PronounRoot")) {
|
|
580
|
+
result = this.pronounTransition();
|
|
581
|
+
} else {
|
|
582
|
+
if (this.suffixList[0].getName() == "OrdinalRoot") {
|
|
583
|
+
result = this.formList[0] + "+NUM+ORD";
|
|
584
|
+
} else {
|
|
585
|
+
if (this.suffixList[0].getName().startsWith("Adjective")) {
|
|
586
|
+
result = this.formList[0] + "+ADJ";
|
|
587
|
+
}
|
|
588
|
+
}
|
|
575
589
|
}
|
|
576
590
|
}
|
|
577
591
|
}
|
|
@@ -5,6 +5,86 @@ export class FsmParseList {
|
|
|
5
5
|
|
|
6
6
|
private readonly fsmParses: Array<FsmParse> = new Array<FsmParse>()
|
|
7
7
|
|
|
8
|
+
static longestRootExceptions = [
|
|
9
|
+
"acağı acak NOUN VERB", "acağım acak NOUN VERB", "acağımı acak NOUN VERB", "acağımız acak NOUN VERB",
|
|
10
|
+
"acağın acak NOUN VERB",
|
|
11
|
+
"acağına acak NOUN VERB", "acağını acak NOUN VERB", "acağının acak NOUN VERB", "acağınız acak NOUN VERB",
|
|
12
|
+
"acağınıza acak NOUN VERB",
|
|
13
|
+
"acağınızdır acak NOUN VERB", "acağınızı acak NOUN VERB", "acağınızın acak NOUN VERB", "acağız acak NOUN VERB",
|
|
14
|
+
"acakları acak NOUN VERB",
|
|
15
|
+
"acaklarını acak NOUN VERB", "acaksa acak NOUN VERB", "acaktır acak NOUN VERB", "ardım ar NOUN VERB",
|
|
16
|
+
"arız ar NOUN VERB",
|
|
17
|
+
"arken ar NOUN VERB", "arsa ar NOUN VERB", "arsak ar NOUN VERB", "arsanız ar NOUN VERB", "arsınız ar NOUN VERB",
|
|
18
|
+
"eceği ecek NOUN VERB", "eceğim ecek NOUN VERB", "eceğimi ecek NOUN VERB", "eceğimiz ecek NOUN VERB",
|
|
19
|
+
"eceğin ecek NOUN VERB",
|
|
20
|
+
"eceğine ecek NOUN VERB", "eceğini ecek NOUN VERB", "eceğinin ecek NOUN VERB", "eceğiniz ecek NOUN VERB",
|
|
21
|
+
"eceğinizdir ecek NOUN VERB",
|
|
22
|
+
"eceğinize ecek NOUN VERB", "eceğinizi ecek NOUN VERB", "eceğinizin ecek NOUN VERB", "eceğiz ecek NOUN VERB",
|
|
23
|
+
"ecekleri ecek NOUN VERB",
|
|
24
|
+
"eceklerini ecek NOUN VERB", "ecekse ecek NOUN VERB", "ecektir ecek NOUN VERB", "erdim er NOUN VERB",
|
|
25
|
+
"eriz er NOUN VERB",
|
|
26
|
+
"erken er NOUN VERB", "erse er NOUN VERB", "ersek er NOUN VERB", "erseniz er NOUN VERB", "ersiniz er NOUN VERB",
|
|
27
|
+
"ilen i VERB VERB", "ilene i VERB VERB", "ilin i VERB VERB", "ilince i VERB VERB", "imiz i ADJ NOUN",
|
|
28
|
+
"in i ADJ NOUN", "inde i ADJ NOUN", "ine i ADJ NOUN", "ini i ADJ NOUN", "inin i ADJ NOUN",
|
|
29
|
+
"ılan ı NOUN VERB", "ılana ı NOUN VERB", "ılın ı NOUN VERB", "ılınca ı NOUN VERB", "la la VERB NOUN",
|
|
30
|
+
"lar la VERB NOUN", "lardan la VERB NOUN", "lardandır la VERB NOUN", "lardır la VERB NOUN", "ları la VERB NOUN",
|
|
31
|
+
"larıdır la VERB NOUN", "larım la VERB NOUN", "larımdan la VERB NOUN", "larımız la VERB NOUN",
|
|
32
|
+
"larımıza la VERB NOUN",
|
|
33
|
+
"larımızda la VERB NOUN", "larımızdan la VERB NOUN", "larımızdaydı la VERB NOUN", "larımızı la VERB NOUN",
|
|
34
|
+
"larımızın la VERB NOUN",
|
|
35
|
+
"larımızla la VERB NOUN", "ların la VERB NOUN", "larına la VERB NOUN", "larında la VERB NOUN",
|
|
36
|
+
"larındaki la VERB NOUN",
|
|
37
|
+
"larındakiler la VERB NOUN", "larındakilere la VERB NOUN", "larındakileri la VERB NOUN",
|
|
38
|
+
"larındakilerin la VERB NOUN", "larından la VERB NOUN",
|
|
39
|
+
"larındandır la VERB NOUN", "larındaysa la VERB NOUN", "larını la VERB NOUN", "larının la VERB NOUN",
|
|
40
|
+
"larınız la VERB NOUN",
|
|
41
|
+
"larınıza la VERB NOUN", "larınızda la VERB NOUN", "larınızdaki la VERB NOUN", "larınızdan la VERB NOUN",
|
|
42
|
+
"larınızı la VERB NOUN",
|
|
43
|
+
"larınızın la VERB NOUN", "larınızla la VERB NOUN", "larıyla la VERB NOUN", "le le VERB NOUN",
|
|
44
|
+
"ler le VERB NOUN",
|
|
45
|
+
"lerden le VERB NOUN", "lerdendir le VERB NOUN", "lerdir le VERB NOUN", "leri le VERB NOUN",
|
|
46
|
+
"leridir le VERB NOUN",
|
|
47
|
+
"lerim le VERB NOUN", "lerimden le VERB NOUN", "lerimiz le VERB NOUN", "lerimizde le VERB NOUN",
|
|
48
|
+
"lerimizden le VERB NOUN",
|
|
49
|
+
"lerimizdeydi le VERB NOUN", "lerimize le VERB NOUN", "lerimizi le VERB NOUN", "lerimizin le VERB NOUN",
|
|
50
|
+
"lerimizle le VERB NOUN",
|
|
51
|
+
"lerin le VERB NOUN", "lerinde le VERB NOUN", "lerindeki le VERB NOUN", "lerindekiler le VERB NOUN",
|
|
52
|
+
"lerindekilere le VERB NOUN",
|
|
53
|
+
"lerindekileri le VERB NOUN", "lerindekilerin le VERB NOUN", "lerinden le VERB NOUN",
|
|
54
|
+
"lerindendir le VERB NOUN", "lerindeyse le VERB NOUN",
|
|
55
|
+
"lerine le VERB NOUN", "lerini le VERB NOUN", "lerinin le VERB NOUN", "leriniz le VERB NOUN",
|
|
56
|
+
"lerinizde le VERB NOUN",
|
|
57
|
+
"lerinizdeki le VERB NOUN", "lerinizden le VERB NOUN", "lerinize le VERB NOUN", "lerinizi le VERB NOUN",
|
|
58
|
+
"lerinizin le VERB NOUN",
|
|
59
|
+
"lerinizle le VERB NOUN", "leriyle le VERB NOUN", "madan ma NOUN VERB", "malı ma NOUN VERB",
|
|
60
|
+
"malıdır ma NOUN VERB", "malıdırlar ma NOUN VERB", "malılar ma NOUN VERB", "malısınız ma NOUN VERB",
|
|
61
|
+
"malıyım ma NOUN VERB",
|
|
62
|
+
"malıyız ma NOUN VERB", "mam ma NOUN VERB", "mama ma NOUN VERB", "mamız ma NOUN VERB", "mamıza ma NOUN VERB",
|
|
63
|
+
"mamızı ma NOUN VERB", "manız ma NOUN VERB", "manızda ma NOUN VERB", "manızdır ma NOUN VERB",
|
|
64
|
+
"manızı ma NOUN VERB",
|
|
65
|
+
"manızla ma NOUN VERB", "ması ma NOUN VERB", "masıdır ma NOUN VERB", "masın ma NOUN VERB",
|
|
66
|
+
"masına ma NOUN VERB",
|
|
67
|
+
"masında ma NOUN VERB", "masındaki ma NOUN VERB", "masını ma NOUN VERB", "masıyla ma NOUN VERB",
|
|
68
|
+
"mdan m NOUN NOUN",
|
|
69
|
+
"meden me NOUN VERB", "meli me NOUN VERB", "melidir me NOUN VERB", "melidirler me NOUN VERB",
|
|
70
|
+
"meliler me NOUN VERB",
|
|
71
|
+
"melisiniz me NOUN VERB", "meliyim me NOUN VERB", "meliyiz me NOUN VERB", "mem me NOUN VERB",
|
|
72
|
+
"meme me NOUN VERB",
|
|
73
|
+
"memiz me NOUN VERB", "memize me NOUN VERB", "memizi me NOUN VERB", "meniz me NOUN VERB",
|
|
74
|
+
"menizde me NOUN VERB",
|
|
75
|
+
"menizdir me NOUN VERB", "menizi me NOUN VERB", "menizle me NOUN VERB", "mesi me NOUN VERB",
|
|
76
|
+
"mesidir me NOUN VERB",
|
|
77
|
+
"mesin me NOUN VERB", "mesinde me NOUN VERB", "mesindeki me NOUN VERB", "mesine me NOUN VERB",
|
|
78
|
+
"mesini me NOUN VERB",
|
|
79
|
+
"mesiyle me NOUN VERB", "mişse miş NOUN VERB", "mını m NOUN NOUN", "mışsa mış NOUN VERB", "mız m NOUN NOUN",
|
|
80
|
+
"na n NOUN NOUN", "ne n NOUN NOUN", "nin n NOUN NOUN", "niz n NOUN NOUN",
|
|
81
|
+
"nın n NOUN NOUN", "nız n NOUN NOUN", "rdim r NOUN VERB", "rdım r NOUN VERB", "riz r NOUN VERB",
|
|
82
|
+
"rız r NOUN VERB", "rken r NOUN VERB", "rken r NOUN VERB", "rsa r NOUN VERB", "rsak r NOUN VERB",
|
|
83
|
+
"rsanız r NOUN VERB", "rse r NOUN VERB", "rsek r NOUN VERB", "rseniz r NOUN VERB", "rsiniz r NOUN VERB",
|
|
84
|
+
"rsınız r NOUN VERB", "sa sa VERB ADJ", "se se VERB ADJ", "ulan u NOUN VERB", "un un VERB NOUN",
|
|
85
|
+
"üne ün VERB NOUN", "unun un VERB NOUN", "ince i NOUN VERB", "unca u NOUN VERB", "ınca ı NOUN VERB",
|
|
86
|
+
"unca un NOUN VERB", "ilen ile VERB VERB"]
|
|
87
|
+
|
|
8
88
|
/**
|
|
9
89
|
* A constructor of {@link FsmParseList} class which takes an {@link Array} fsmParses as an input. First it sorts
|
|
10
90
|
* the items of the {@link Array} then loops through it, if the current item's transitions equal to the next item's
|
|
@@ -82,7 +162,8 @@ export class FsmParseList {
|
|
|
82
162
|
|
|
83
163
|
/**
|
|
84
164
|
* The getParseWithLongestRootWord method returns the parse with the longest root word. If more than one parse has the
|
|
85
|
-
* longest root word, the first parse with that root is returned.
|
|
165
|
+
* longest root word, the first parse with that root is returned. If the longest root word belongs to an
|
|
166
|
+
* exceptional case, the parse with the next longest root word that does not, is returned.
|
|
86
167
|
*
|
|
87
168
|
* @return FsmParse Parse with the longest root word.
|
|
88
169
|
*/
|
|
@@ -90,7 +171,7 @@ export class FsmParseList {
|
|
|
90
171
|
let maxLength = -1;
|
|
91
172
|
let bestParse = undefined;
|
|
92
173
|
for (let currentParse of this.fsmParses) {
|
|
93
|
-
if (currentParse.getWord().getName().length > maxLength) {
|
|
174
|
+
if (currentParse.getWord().getName().length > maxLength && !this.isLongestRootException(currentParse)) {
|
|
94
175
|
maxLength = currentParse.getWord().getName().length;
|
|
95
176
|
bestParse = currentParse;
|
|
96
177
|
}
|
|
@@ -98,6 +179,34 @@ export class FsmParseList {
|
|
|
98
179
|
return bestParse;
|
|
99
180
|
}
|
|
100
181
|
|
|
182
|
+
/**
|
|
183
|
+
* The isLongestRootException method returns true if the longest root word belongs to an exceptional case, false otherwise.
|
|
184
|
+
*
|
|
185
|
+
* @param fsmParse {@link FsmParse} input.
|
|
186
|
+
* @return true if the longest root belongs to an exceptional case, false otherwise.
|
|
187
|
+
*/
|
|
188
|
+
isLongestRootException(fsmParse: FsmParse): boolean{
|
|
189
|
+
let surfaceForm = fsmParse.getSurfaceForm()
|
|
190
|
+
let root = fsmParse.getWord().getName()
|
|
191
|
+
for (let longestRootException of FsmParseList.longestRootExceptions){
|
|
192
|
+
let exceptionItems = longestRootException.split(" ")
|
|
193
|
+
let surfaceFormEnding = exceptionItems[0]
|
|
194
|
+
let longestRootEnding = exceptionItems[1]
|
|
195
|
+
let longestRootPos = exceptionItems[2]
|
|
196
|
+
let possibleRootPos = exceptionItems[3]
|
|
197
|
+
let possibleRoot = surfaceForm.replace(surfaceFormEnding, "")
|
|
198
|
+
if (surfaceForm.endsWith(surfaceFormEnding) && root.endsWith(longestRootEnding) &&
|
|
199
|
+
fsmParse.getRootPos() == longestRootPos){
|
|
200
|
+
for (let currentParse of this.fsmParses){
|
|
201
|
+
if (currentParse.getWord().getName() == possibleRoot && currentParse.getRootPos() == possibleRootPos){
|
|
202
|
+
return true
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
return false
|
|
208
|
+
}
|
|
209
|
+
|
|
101
210
|
/**
|
|
102
211
|
* The reduceToParsesWithSameRoot method takes a {@link String} currentWithPos as an input and loops i times till
|
|
103
212
|
* i equals to the size of the fsmParses {@link Array}. If the given currentRoot does not equal to the root of ith
|
|
@@ -28,7 +28,7 @@ export class InflectionalGroup {
|
|
|
28
28
|
"INF2", "INF3", "BSTAG", "ESTAG", "BTTAG",
|
|
29
29
|
"ETTAG", "BDTAG", "EDTAG", "INF1", "ASLONGAS",
|
|
30
30
|
"DIST", "ADAMANTLY", "PERCENT", "WITHOUTBEINGABLETOHAVEDONESO", "DIM",
|
|
31
|
-
"PERS", "FRACTION", "HASHTAG", "EMAIL", "DATE"];
|
|
31
|
+
"PERS", "FRACTION", "HASHTAG", "EMAIL", "DATE", "CODE", "METRIC"];
|
|
32
32
|
static morphoTags = [MorphologicalTag.NOUN, MorphologicalTag.ADVERB, MorphologicalTag.ADJECTIVE,
|
|
33
33
|
MorphologicalTag.VERB, MorphologicalTag.A1SG, MorphologicalTag.A2SG, MorphologicalTag.A3SG, MorphologicalTag.A1PL,
|
|
34
34
|
MorphologicalTag.A2PL, MorphologicalTag.A3PL, MorphologicalTag.P1SG, MorphologicalTag.P2SG, MorphologicalTag.P3SG, MorphologicalTag.P1PL,
|
|
@@ -54,7 +54,8 @@ export class InflectionalGroup {
|
|
|
54
54
|
MorphologicalTag.INFINITIVE2, MorphologicalTag.INFINITIVE3, MorphologicalTag.BEGINNINGOFSENTENCE, MorphologicalTag.ENDOFSENTENCE, MorphologicalTag.BEGINNINGOFTITLE,
|
|
55
55
|
MorphologicalTag.ENDOFTITLE, MorphologicalTag.BEGINNINGOFDOCUMENT, MorphologicalTag.ENDOFDOCUMENT, MorphologicalTag.INFINITIVE, MorphologicalTag.ASLONGAS,
|
|
56
56
|
MorphologicalTag.DISTRIBUTIVE, MorphologicalTag.ADAMANTLY, MorphologicalTag.PERCENT, MorphologicalTag.WITHOUTBEINGABLETOHAVEDONESO, MorphologicalTag.DIMENSION,
|
|
57
|
-
MorphologicalTag.PERSONALPRONOUN, MorphologicalTag.FRACTION, MorphologicalTag.HASHTAG, MorphologicalTag.EMAIL, MorphologicalTag.DATE
|
|
57
|
+
MorphologicalTag.PERSONALPRONOUN, MorphologicalTag.FRACTION, MorphologicalTag.HASHTAG, MorphologicalTag.EMAIL, MorphologicalTag.DATE,
|
|
58
|
+
MorphologicalTag.CODE, MorphologicalTag.METRIC];
|
|
58
59
|
|
|
59
60
|
/**
|
|
60
61
|
* The getMorphologicalTag method takes a String tag as an input and if the input matches with one of the elements of
|
|
@@ -7,7 +7,7 @@ describe('FiniteStateMachineTest', function() {
|
|
|
7
7
|
let fsm = new FiniteStateMachine("turkish_finite_state_machine.xml");
|
|
8
8
|
let stateList = fsm.getStates();
|
|
9
9
|
it('testStateCount', function() {
|
|
10
|
-
assert.strictEqual(
|
|
10
|
+
assert.strictEqual(141, stateList.length);
|
|
11
11
|
});
|
|
12
12
|
it('testStartEndStates', function() {
|
|
13
13
|
let endStateCount = 0;
|
|
@@ -16,7 +16,7 @@ describe('FiniteStateMachineTest', function() {
|
|
|
16
16
|
endStateCount++;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
assert.strictEqual(
|
|
19
|
+
assert.strictEqual(37, endStateCount);
|
|
20
20
|
let posCounts = new CounterHashMap<string>();
|
|
21
21
|
for (let state of stateList){
|
|
22
22
|
posCounts.put(state.getPos());
|
|
@@ -4,10 +4,38 @@ import {TxtWord} from "nlptoolkit-dictionary/dist/Dictionary/TxtWord";
|
|
|
4
4
|
import {State} from "../dist/MorphologicalAnalysis/State";
|
|
5
5
|
import {Transition} from "../dist/MorphologicalAnalysis/Transition";
|
|
6
6
|
import {Sentence} from "nlptoolkit-corpus/dist/Sentence";
|
|
7
|
+
import * as fs from "fs";
|
|
7
8
|
|
|
8
9
|
describe('FsmMorphologicalAnalyzerTest', function() {
|
|
9
10
|
describe('FsmMorphologicalAnalyzerTest', function() {
|
|
10
11
|
let fsm = new FsmMorphologicalAnalyzer();
|
|
12
|
+
it('morphologicalAnalysisGenerateAllParses', function() {
|
|
13
|
+
let testWords = ["göç", "açıkla", "yıldönümü",
|
|
14
|
+
"resim", "hal", "emlak", "git",
|
|
15
|
+
"kavur", "ye", "yemek", "ak",
|
|
16
|
+
"sıska", "yıka", "bul", "cevapla",
|
|
17
|
+
"coş", "böl", "del", "giy",
|
|
18
|
+
"kaydol", "anla", "çök", "çık",
|
|
19
|
+
"doldur", "azal", "göster", "aksa", "cenk", "kalp"]
|
|
20
|
+
for (let testWord of testWords){
|
|
21
|
+
let word = <TxtWord> fsm.getDictionary().getWord(testWord)
|
|
22
|
+
let parsesExpected : Array<string> = []
|
|
23
|
+
let data = fs.readFileSync("parses/" + word.getName() + ".txt", 'utf8')
|
|
24
|
+
let lines = data.split("\n")
|
|
25
|
+
for (let line of lines) {
|
|
26
|
+
let items = line.split(" ")
|
|
27
|
+
if (items.length == 2){
|
|
28
|
+
parsesExpected.push(items[1].trim())
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
let parsesGenerated = fsm.generateAllParses(word, word.getName().length + 5)
|
|
32
|
+
assert.ok(parsesExpected.length == parsesGenerated.length)
|
|
33
|
+
for (let parseGenerated of parsesGenerated){
|
|
34
|
+
assert.ok(parsesExpected.includes(parseGenerated.toString()))
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
|
|
11
39
|
it('morphologicalAnalysisDataTimeNumber', function() {
|
|
12
40
|
assert.ok(fsm.morphologicalAnalysis("3/4").size() != 0);
|
|
13
41
|
assert.ok(fsm.morphologicalAnalysis("3\\/4").size() != 0);
|
|
@@ -19,6 +19,10 @@ describe('FsmParseTest', function() {
|
|
|
19
19
|
let parse12 = fsm.morphologicalAnalysis("o");
|
|
20
20
|
let parse13 = fsm.morphologicalAnalysis("arabası");
|
|
21
21
|
let parse14 = fsm.morphologicalAnalysis("sana");
|
|
22
|
+
let parse15 = fsm.morphologicalAnalysis("açacağını");
|
|
23
|
+
let parse16 = fsm.morphologicalAnalysis("kollarımız");
|
|
24
|
+
let parse17 = fsm.morphologicalAnalysis("yapmamızı");
|
|
25
|
+
let parse18 = fsm.morphologicalAnalysis("koşmalıyız");
|
|
22
26
|
it('testSize', function() {
|
|
23
27
|
assert.strictEqual(2, parse1.size());
|
|
24
28
|
assert.strictEqual(2, parse2.size());
|
|
@@ -48,6 +52,10 @@ describe('FsmParseTest', function() {
|
|
|
48
52
|
assert.strictEqual("değerlendirme", parse4.getParseWithLongestRootWord().getWord().getName());
|
|
49
53
|
assert.strictEqual("soruşturma", parse5.getParseWithLongestRootWord().getWord().getName());
|
|
50
54
|
assert.strictEqual("karşılaştırmalı", parse6.getParseWithLongestRootWord().getWord().getName());
|
|
55
|
+
assert.strictEqual("aç", parse15.getParseWithLongestRootWord().getWord().getName());
|
|
56
|
+
assert.strictEqual("kol", parse16.getParseWithLongestRootWord().getWord().getName());
|
|
57
|
+
assert.strictEqual("yap", parse17.getParseWithLongestRootWord().getWord().getName());
|
|
58
|
+
assert.strictEqual("koş", parse18.getParseWithLongestRootWord().getWord().getName());
|
|
51
59
|
});
|
|
52
60
|
it('testReduceToParsesWithSameRootAndPos', function() {
|
|
53
61
|
parse2.reduceToParsesWithSameRootAndPos(new Word("kop+VERB"));
|
|
@@ -20,6 +20,10 @@
|
|
|
20
20
|
</state>
|
|
21
21
|
<state name="DuplicateRoot" start="yes" end="yes" originalpos="DUP">
|
|
22
22
|
</state>
|
|
23
|
+
<state name="CodeRoot" start="yes" end="yes" originalpos="CODE">
|
|
24
|
+
</state>
|
|
25
|
+
<state name="MetricRoot" start="yes" end="yes" originalpos="METRIC">
|
|
26
|
+
</state>
|
|
23
27
|
<state name="DeterminerRoot" start="yes" end="yes" originalpos="DET">
|
|
24
28
|
</state>
|
|
25
29
|
<state name="ConjunctionRoot" start="yes" end="yes" originalpos="CONJ">
|