nlptoolkit-morphologicalanalysis 1.0.2 → 1.0.3

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 CHANGED
@@ -1,4 +1,4 @@
1
- Morphological Analysis
1
+ Morphological Analysis [<img src="https://github.com/StarlangSoftware/TurkishMorphologicalAnalysis/blob/master/video1.jpg" width="5%">](https://youtu.be/KxguxpbgDQc)[<img src="https://github.com/StarlangSoftware/TurkishMorphologicalAnalysis/blob/master/video2.jpg" width="5%">](https://youtu.be/UMmA2LMkAkw)[<img src="https://github.com/StarlangSoftware/TurkishMorphologicalAnalysis/blob/master/video3.jpg" width="5%">](https://youtu.be/dP97ovMSSfE)
2
2
  ============
3
3
 
4
4
  ## Morphology
@@ -0,0 +1,31 @@
1
+ import { TxtWord } from "nlptoolkit-dictionary/dist/Dictionary/TxtWord";
2
+ export declare class MorphotacticEngine {
3
+ static resolveD(root: TxtWord, formation: string, formationToCheck: string): string;
4
+ static resolveA(root: TxtWord, formation: string, rootWord: boolean, formationToCheck: string): string;
5
+ static resolveH(root: TxtWord, formation: string, beginningOfSuffix: boolean, specialCaseTenseSuffix: boolean, rootWord: boolean, formationToCheck: string): string;
6
+ /**
7
+ * The resolveC method takes a {@link String} formation as an input. If the last phoneme is on of the "çfhkpsşt", it
8
+ * concatenates given formation with 'ç', if not it concatenates given formation with 'c'.
9
+ *
10
+ * @param formation {@link String} input.
11
+ * @param formationToCheck {@link String} input.
12
+ * @return resolved String.
13
+ */
14
+ static resolveC(formation: string, formationToCheck: string): string;
15
+ /**
16
+ * The resolveS method takes a {@link String} formation as an input. It then concatenates given formation with 's'.
17
+ *
18
+ * @param formation {@link String} input.
19
+ * @return resolved String.
20
+ */
21
+ static resolveS(formation: string): string;
22
+ /**
23
+ * The resolveSh method takes a {@link String} formation as an input. If the last character is a vowel, it concatenates
24
+ * given formation with ş, if the last character is not a vowel, and not 't' it directly returns given formation, but if it
25
+ * is equal to 't', it transforms it to 'd'.
26
+ *
27
+ * @param formation {@link String} input.
28
+ * @return resolved String.
29
+ */
30
+ static resolveSh(formation: string): string;
31
+ }
@@ -0,0 +1,234 @@
1
+ (function (factory) {
2
+ if (typeof module === "object" && typeof module.exports === "object") {
3
+ var v = factory(require, exports);
4
+ if (v !== undefined) module.exports = v;
5
+ }
6
+ else if (typeof define === "function" && define.amd) {
7
+ define(["require", "exports", "nlptoolkit-dictionary/dist/Dictionary/Word", "nlptoolkit-dictionary/dist/Language/TurkishLanguage"], factory);
8
+ }
9
+ })(function (require, exports) {
10
+ "use strict";
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.MorphotacticEngine = void 0;
13
+ const Word_1 = require("nlptoolkit-dictionary/dist/Dictionary/Word");
14
+ const TurkishLanguage_1 = require("nlptoolkit-dictionary/dist/Language/TurkishLanguage");
15
+ class MorphotacticEngine {
16
+ static resolveD(root, formation, formationToCheck) {
17
+ if (root.isAbbreviation()) {
18
+ return formation + 'd';
19
+ }
20
+ if (Word_1.Word.lastPhoneme(formationToCheck) >= '0' && Word_1.Word.lastPhoneme(formationToCheck) <= '9') {
21
+ switch (Word_1.Word.lastPhoneme(formationToCheck)) {
22
+ case '3':
23
+ case '4':
24
+ case '5':
25
+ //3->3'tü, 5->5'ti, 4->4'tü
26
+ return formation + 't';
27
+ case '0':
28
+ if (root.getName().endsWith("40") || root.getName().endsWith("60") || root.getName().endsWith("70"))
29
+ //40->40'tı, 60->60'tı, 70->70'ti
30
+ return formation + 't';
31
+ else
32
+ //30->30'du, 50->50'ydi, 80->80'di
33
+ return formation + 'd';
34
+ default:
35
+ return formation + 'd';
36
+ }
37
+ }
38
+ else {
39
+ if (TurkishLanguage_1.TurkishLanguage.isSertSessiz(Word_1.Word.lastPhoneme(formationToCheck))) {
40
+ //yap+DH->yaptı
41
+ return formation + 't';
42
+ }
43
+ else {
44
+ //sar+DH->sardı
45
+ return formation + 'd';
46
+ }
47
+ }
48
+ }
49
+ static resolveA(root, formation, rootWord, formationToCheck) {
50
+ if (root.isAbbreviation()) {
51
+ return formation + 'e';
52
+ }
53
+ if (Word_1.Word.lastVowel(formationToCheck) >= '0' && Word_1.Word.lastVowel(formationToCheck) <= '9') {
54
+ switch (Word_1.Word.lastVowel(formationToCheck)) {
55
+ case '6':
56
+ case '9':
57
+ //6'ya, 9'a
58
+ return formation + 'a';
59
+ case '0':
60
+ if (root.getName().endsWith("10") || root.getName().endsWith("30") || root.getName().endsWith("40") ||
61
+ root.getName().endsWith("60") || root.getName().endsWith("90"))
62
+ //10'a, 30'a, 40'a, 60'a, 90'a
63
+ return formation + 'a';
64
+ else
65
+ //20'ye, 50'ye, 80'e, 70'e
66
+ return formation + 'e';
67
+ default:
68
+ //3'e, 8'e, 4'e, 2'ye
69
+ return formation + 'e';
70
+ }
71
+ }
72
+ if (TurkishLanguage_1.TurkishLanguage.isBackVowel(Word_1.Word.lastVowel(formationToCheck))) {
73
+ if (root.notObeysVowelHarmonyDuringAgglutination() && rootWord) {
74
+ //alkole, anormale
75
+ return formation + 'e';
76
+ }
77
+ else {
78
+ //sakala, kabala
79
+ return formation + 'a';
80
+ }
81
+ }
82
+ if (TurkishLanguage_1.TurkishLanguage.isFrontVowel(Word_1.Word.lastVowel(formationToCheck))) {
83
+ if (root.notObeysVowelHarmonyDuringAgglutination() && rootWord) {
84
+ //faika, halika
85
+ return formation + 'a';
86
+ }
87
+ else {
88
+ //kediye, eve
89
+ return formation + 'e';
90
+ }
91
+ }
92
+ if (root.isNumeral() || root.isFraction() || root.isReal()) {
93
+ if (root.getName().endsWith("6") || root.getName().endsWith("9") || root.getName().endsWith("10") ||
94
+ root.getName().endsWith("30") || root.getName().endsWith("40") || root.getName().endsWith("60") ||
95
+ root.getName().endsWith("90")) {
96
+ return formation + 'a';
97
+ }
98
+ else {
99
+ return formation + 'e';
100
+ }
101
+ }
102
+ return formation;
103
+ }
104
+ static resolveH(root, formation, beginningOfSuffix, specialCaseTenseSuffix, rootWord, formationToCheck) {
105
+ if (root.isAbbreviation())
106
+ return formation + 'i';
107
+ if (beginningOfSuffix && TurkishLanguage_1.TurkishLanguage.isVowel(Word_1.Word.lastPhoneme(formationToCheck)) &&
108
+ !specialCaseTenseSuffix) {
109
+ return formation;
110
+ }
111
+ if (specialCaseTenseSuffix) {
112
+ //eğer ek Hyor eki ise,
113
+ if (rootWord) {
114
+ if (root.vowelAChangesToIDuringYSuffixation()) {
115
+ if (TurkishLanguage_1.TurkishLanguage.isFrontRoundedVowel(Word_1.Word.beforeLastVowel(formationToCheck))) {
116
+ //büyülüyor, bölümlüyor, çözümlüyor, döşüyor
117
+ return formation.substring(0, formation.length - 1) + 'ü';
118
+ }
119
+ if (TurkishLanguage_1.TurkishLanguage.isFrontUnroundedVowel(Word_1.Word.beforeLastVowel(formationToCheck))) {
120
+ //adresliyor, alevliyor, ateşliyor, bekliyor
121
+ return formation.substring(0, formation.length - 1) + 'i';
122
+ }
123
+ if (TurkishLanguage_1.TurkishLanguage.isBackRoundedVowel(Word_1.Word.beforeLastVowel(formationToCheck))) {
124
+ //buğuluyor, bulguluyor, çamurluyor, aforozluyor
125
+ return formation.substring(0, formation.length - 1) + 'u';
126
+ }
127
+ if (TurkishLanguage_1.TurkishLanguage.isBackUnroundedVowel(Word_1.Word.beforeLastVowel(formationToCheck))) {
128
+ //açıklıyor, çalkalıyor, gazlıyor, gıcırdıyor
129
+ return formation.substring(0, formation.length - 1) + 'ı';
130
+ }
131
+ }
132
+ }
133
+ if (TurkishLanguage_1.TurkishLanguage.isVowel(Word_1.Word.lastPhoneme(formationToCheck))) {
134
+ if (TurkishLanguage_1.TurkishLanguage.isFrontRoundedVowel(Word_1.Word.beforeLastVowel(formationToCheck))) {
135
+ return formation.substring(0, formation.length - 1) + 'ü';
136
+ }
137
+ if (TurkishLanguage_1.TurkishLanguage.isFrontUnroundedVowel(Word_1.Word.beforeLastVowel(formationToCheck))) {
138
+ return formation.substring(0, formation.length - 1) + 'i';
139
+ }
140
+ if (TurkishLanguage_1.TurkishLanguage.isBackRoundedVowel(Word_1.Word.beforeLastVowel(formationToCheck))) {
141
+ return formation.substring(0, formation.length - 1) + 'u';
142
+ }
143
+ if (TurkishLanguage_1.TurkishLanguage.isBackUnroundedVowel(Word_1.Word.beforeLastVowel(formationToCheck))) {
144
+ return formation.substring(0, formation.length - 1) + 'ı';
145
+ }
146
+ }
147
+ }
148
+ if (TurkishLanguage_1.TurkishLanguage.isFrontRoundedVowel(Word_1.Word.lastVowel(formationToCheck)) ||
149
+ (TurkishLanguage_1.TurkishLanguage.isBackRoundedVowel(Word_1.Word.lastVowel(formationToCheck)) && root.notObeysVowelHarmonyDuringAgglutination())) {
150
+ return formation + 'ü';
151
+ }
152
+ if (TurkishLanguage_1.TurkishLanguage.isFrontUnroundedVowel(Word_1.Word.lastVowel(formationToCheck)) ||
153
+ (Word_1.Word.lastVowel(formationToCheck) == 'a' && root.notObeysVowelHarmonyDuringAgglutination())) {
154
+ return formation + 'i';
155
+ }
156
+ if (TurkishLanguage_1.TurkishLanguage.isBackRoundedVowel(Word_1.Word.lastVowel(formationToCheck))) {
157
+ return formation + 'u';
158
+ }
159
+ if (TurkishLanguage_1.TurkishLanguage.isBackUnroundedVowel(Word_1.Word.lastVowel(formationToCheck))) {
160
+ return formation + 'ı';
161
+ }
162
+ if (root.isNumeral() || root.isFraction() || root.isReal()) {
163
+ if (root.getName().endsWith("6") || root.getName().endsWith("40") || root.getName().endsWith("60") ||
164
+ root.getName().endsWith("90")) {
165
+ //6'yı, 40'ı, 60'ı
166
+ return formation + 'ı';
167
+ }
168
+ else {
169
+ if (root.getName().endsWith("3") || root.getName().endsWith("4") || root.getName().endsWith("00")) {
170
+ //3'ü, 4'ü, 100'ü
171
+ return formation + 'ü';
172
+ }
173
+ else {
174
+ if (root.getName().endsWith("9") || root.getName().endsWith("10") || root.getName().endsWith("30")) {
175
+ //9'u, 10'u, 30'u
176
+ return formation + 'u';
177
+ }
178
+ else {
179
+ //2'yi, 5'i, 8'i
180
+ return formation + 'i';
181
+ }
182
+ }
183
+ }
184
+ }
185
+ return formation;
186
+ }
187
+ /**
188
+ * The resolveC method takes a {@link String} formation as an input. If the last phoneme is on of the "çfhkpsşt", it
189
+ * concatenates given formation with 'ç', if not it concatenates given formation with 'c'.
190
+ *
191
+ * @param formation {@link String} input.
192
+ * @param formationToCheck {@link String} input.
193
+ * @return resolved String.
194
+ */
195
+ static resolveC(formation, formationToCheck) {
196
+ if (TurkishLanguage_1.TurkishLanguage.isSertSessiz(Word_1.Word.lastPhoneme(formationToCheck))) {
197
+ return formation + 'ç';
198
+ }
199
+ else {
200
+ return formation + 'c';
201
+ }
202
+ }
203
+ /**
204
+ * The resolveS method takes a {@link String} formation as an input. It then concatenates given formation with 's'.
205
+ *
206
+ * @param formation {@link String} input.
207
+ * @return resolved String.
208
+ */
209
+ static resolveS(formation) {
210
+ return formation + 's';
211
+ }
212
+ /**
213
+ * The resolveSh method takes a {@link String} formation as an input. If the last character is a vowel, it concatenates
214
+ * given formation with ş, if the last character is not a vowel, and not 't' it directly returns given formation, but if it
215
+ * is equal to 't', it transforms it to 'd'.
216
+ *
217
+ * @param formation {@link String} input.
218
+ * @return resolved String.
219
+ */
220
+ static resolveSh(formation) {
221
+ if (TurkishLanguage_1.TurkishLanguage.isVowel(formation.charAt(formation.length - 1))) {
222
+ return formation + 'ş';
223
+ }
224
+ else {
225
+ if (formation.charAt(formation.length - 1) != 't')
226
+ return formation;
227
+ else
228
+ return formation.substring(0, formation.length - 1) + 'd';
229
+ }
230
+ }
231
+ }
232
+ exports.MorphotacticEngine = MorphotacticEngine;
233
+ });
234
+ //# sourceMappingURL=MorphotacticEngine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MorphotacticEngine.js","sourceRoot":"","sources":["../../source/MorphologicalAnalysis/MorphotacticEngine.ts"],"names":[],"mappings":";;;;;;;;;;;;IACA,qEAAgE;IAChE,yFAAoF;IAEpF,MAAa,kBAAkB;QAE3B,MAAM,CAAC,QAAQ,CAAC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CAAC,SAAiB,EAAE,gBAAwB;YACvD,IAAI,iCAAe,CAAC,YAAY,CAAC,WAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,EAAE;gBAClE,OAAO,SAAS,GAAG,GAAG,CAAC;aAC1B;iBAAM;gBACH,OAAO,SAAS,GAAG,GAAG,CAAC;aAC1B;QACL,CAAC;QAED;;;;;WAKG;QACH,MAAM,CAAC,QAAQ,CAAC,SAAiB;YAC7B,OAAO,SAAS,GAAG,GAAG,CAAC;QAC3B,CAAC;QAED;;;;;;;WAOG;QACH,MAAM,CAAC,SAAS,CAAC,SAAiB;YAC9B,IAAI,iCAAe,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,EAAE;gBACjE,OAAO,SAAS,GAAG,GAAG,CAAC;aAC1B;iBAAM;gBACH,IAAI,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,GAAG;oBAC7C,OAAO,SAAS,CAAC;;oBAEjB,OAAO,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;aACjE;QACL,CAAC;KACJ;IArND,gDAqNC"}
@@ -55,29 +55,6 @@ export declare class Transition {
55
55
  */
56
56
  transitionPossibleFromParse(currentFsmParse: FsmParse): boolean;
57
57
  transitionPossibleFromRoot(root: TxtWord, fromState: State): boolean;
58
- /**
59
- * The beforeLastVowel method takes a {@link String} stem as an input. It loops through the given stem and returns
60
- * the second last vowel.
61
- *
62
- * @param stem String input.
63
- * @return Vowel before the last vowel.
64
- */
65
- private beforeLastVowel;
66
- /**
67
- * The lastVowel method takes a {@link String} stem as an input. It loops through the given stem and returns
68
- * the last vowel.
69
- *
70
- * @param stem String input.
71
- * @return the last vowel.
72
- */
73
- private lastVowel;
74
- /**
75
- * The lastPhoneme method takes a {@link String} stem as an input. It then returns the last phoneme of the given stem.
76
- *
77
- * @param stem String input.
78
- * @return the last phoneme.
79
- */
80
- private lastPhoneme;
81
58
  /**
82
59
  * The withFirstChar method returns the first character of the with variable.
83
60
  *
@@ -117,33 +94,6 @@ export declare class Transition {
117
94
  * @return String type output that has the transition.
118
95
  */
119
96
  makeTransition(root: TxtWord, stem: string, startState?: State): string;
120
- private resolveD;
121
- private resolveA;
122
- private resolveH;
123
- /**
124
- * The resolveC method takes a {@link String} formation as an input. If the last phoneme is on of the "çfhkpsşt", it
125
- * concatenates given formation with 'ç', if not it concatenates given formation with 'c'.
126
- *
127
- * @param formation {@link String} input.
128
- * @return resolved String.
129
- */
130
- private resolveC;
131
- /**
132
- * The resolveS method takes a {@link String} formation as an input. It then concatenates given formation with 's'.
133
- *
134
- * @param formation {@link String} input.
135
- * @return resolved String.
136
- */
137
- private resolveS;
138
- /**
139
- * The resolveSh method takes a {@link String} formation as an input. If the last character is a vowel, it concatenates
140
- * given formation with ş, if the last character is not a vowel, and not 't' it directly returns given formation, but if it
141
- * is equal to 't', it transforms it to 'd'.
142
- *
143
- * @param formation {@link String} input.
144
- * @return resolved String.
145
- */
146
- private resolveSh;
147
97
  /**
148
98
  * An overridden toString method which returns the with variable.
149
99
  *