indofix 0.2.0 → 0.3.0
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.
- checksums.yaml +4 -4
- data/lib/indofix/indofix_kpst_helper.rb +14 -13
- data/lib/indofix/indofix_nomina_helper.rb +27 -27
- data/lib/indofix/indofix_other_helper.rb +24 -70
- data/lib/indofix/indofix_verba_helper.rb +38 -38
- data/lib/indofix/version.rb +1 -1
- data/lib/indofix.rb +63 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f22f9dfc320c9aa36388a2a10a7f203387782c5
|
4
|
+
data.tar.gz: 48b1d484a4d859d622af51dfc1c7d66f38bb1ccb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a314a9d6661b62853d952181597e18549a91583d27fd9e4cadbc7b41691dd690266940e0f9532ff85ff3678ebf78a2e1527fd51a3bfaf8221f27a6e995284f04
|
7
|
+
data.tar.gz: f7f4665c7b8a91ca816c6878326f75db009561faa8a2b774453190bf489bfca17de88b0d8f91959e5ff64f1b9e1ca8006f793ecde3dd34028cdf74d086ee7c15
|
@@ -13,7 +13,7 @@ module Indofix
|
|
13
13
|
end_capture
|
14
14
|
end_of_line
|
15
15
|
end
|
16
|
-
|
16
|
+
@verex.match(string)
|
17
17
|
end
|
18
18
|
|
19
19
|
# pelepasan imbuhan 'me' dengan 'ng'
|
@@ -26,7 +26,7 @@ module Indofix
|
|
26
26
|
end_capture
|
27
27
|
end_of_line
|
28
28
|
end
|
29
|
-
|
29
|
+
@verex.match(string)
|
30
30
|
end
|
31
31
|
|
32
32
|
# pelepasan imbuhan 'me' dengan 'nge'
|
@@ -39,7 +39,7 @@ module Indofix
|
|
39
39
|
end_capture
|
40
40
|
end_of_line
|
41
41
|
end
|
42
|
-
|
42
|
+
@verex.match(string)
|
43
43
|
end
|
44
44
|
|
45
45
|
# pelepasan imbuhan 'me' dengan 'ny'
|
@@ -52,7 +52,7 @@ module Indofix
|
|
52
52
|
end_capture
|
53
53
|
end_of_line
|
54
54
|
end
|
55
|
-
|
55
|
+
@verex.match(string)
|
56
56
|
end
|
57
57
|
|
58
58
|
# pelepasan imbuhan 'me' dengan 'm'
|
@@ -65,9 +65,10 @@ module Indofix
|
|
65
65
|
end_capture
|
66
66
|
end_of_line
|
67
67
|
end
|
68
|
-
|
68
|
+
@verex.match(string)
|
69
69
|
end
|
70
70
|
|
71
|
+
private
|
71
72
|
# auto processing
|
72
73
|
# pemroresan pelepasan n -> ng(nge)/ny, m
|
73
74
|
def process_imbuhan_n_ng(match)
|
@@ -77,22 +78,22 @@ module Indofix
|
|
77
78
|
if !imbuhan_n_x(@string).nil?
|
78
79
|
if !imbuhan_ng_x(@string).nil?
|
79
80
|
if !imbuhan_nge_x(@string).nil?
|
80
|
-
|
81
|
+
imbuhan_nge_x(@string)
|
81
82
|
else
|
82
|
-
|
83
|
+
imbuhan_ng_x(@string)
|
83
84
|
end
|
84
85
|
elsif !imbuhan_ny_x(@string).nil?
|
85
|
-
|
86
|
+
imbuhan_ny_x(@string)
|
86
87
|
else
|
87
|
-
|
88
|
+
imbuhan_n_x(@string)
|
88
89
|
end
|
89
90
|
elsif !imbuhan_m_x(@string).nil?
|
90
|
-
|
91
|
+
imbuhan_m_x(@string)
|
91
92
|
else
|
92
|
-
|
93
|
+
@match
|
93
94
|
end
|
94
95
|
else
|
95
|
-
|
96
|
+
@match
|
96
97
|
end
|
97
98
|
end
|
98
99
|
|
@@ -102,7 +103,7 @@ module Indofix
|
|
102
103
|
if !@match.nil?
|
103
104
|
@string = @match[1]
|
104
105
|
else
|
105
|
-
|
106
|
+
@match
|
106
107
|
end
|
107
108
|
end
|
108
109
|
|
@@ -13,7 +13,7 @@ module Indofix
|
|
13
13
|
find 'an'
|
14
14
|
end_of_line
|
15
15
|
end
|
16
|
-
|
16
|
+
@verex.match(string)
|
17
17
|
end
|
18
18
|
|
19
19
|
# id:Nomina (-ku)
|
@@ -26,7 +26,7 @@ module Indofix
|
|
26
26
|
find 'ku'
|
27
27
|
end_of_line
|
28
28
|
end
|
29
|
-
|
29
|
+
@verex.match(string)
|
30
30
|
end
|
31
31
|
|
32
32
|
# id:Nomina (-mu)
|
@@ -39,7 +39,7 @@ module Indofix
|
|
39
39
|
find 'mu'
|
40
40
|
end_of_line
|
41
41
|
end
|
42
|
-
|
42
|
+
@verex.match(string)
|
43
43
|
end
|
44
44
|
|
45
45
|
# id:Nomina (-nya)
|
@@ -52,7 +52,7 @@ module Indofix
|
|
52
52
|
find 'nya'
|
53
53
|
end_of_line
|
54
54
|
end
|
55
|
-
|
55
|
+
@verex.match(string)
|
56
56
|
end
|
57
57
|
|
58
58
|
# id:Nomina (ke-)
|
@@ -65,7 +65,7 @@ module Indofix
|
|
65
65
|
end_capture
|
66
66
|
end_of_line
|
67
67
|
end
|
68
|
-
|
68
|
+
@verex.match(string)
|
69
69
|
end
|
70
70
|
|
71
71
|
# id:Nomina (ke-an)
|
@@ -79,7 +79,7 @@ module Indofix
|
|
79
79
|
find 'an'
|
80
80
|
end_of_line
|
81
81
|
end
|
82
|
-
|
82
|
+
@verex.match(string)
|
83
83
|
end
|
84
84
|
|
85
85
|
# id:Nomina (ke-anku)
|
@@ -93,7 +93,7 @@ module Indofix
|
|
93
93
|
find 'anku'
|
94
94
|
end_of_line
|
95
95
|
end
|
96
|
-
|
96
|
+
@verex.match(string)
|
97
97
|
end
|
98
98
|
|
99
99
|
# id:Nomina (ke-anlah)
|
@@ -107,7 +107,7 @@ module Indofix
|
|
107
107
|
find 'anlah'
|
108
108
|
end_of_line
|
109
109
|
end
|
110
|
-
|
110
|
+
@verex.match(string)
|
111
111
|
end
|
112
112
|
|
113
113
|
# id:Nomina (ke-anmu)
|
@@ -121,7 +121,7 @@ module Indofix
|
|
121
121
|
find 'anmu'
|
122
122
|
end_of_line
|
123
123
|
end
|
124
|
-
|
124
|
+
@verex.match(string)
|
125
125
|
end
|
126
126
|
|
127
127
|
# id:Nomina (ke-annya)
|
@@ -135,7 +135,7 @@ module Indofix
|
|
135
135
|
find 'annya'
|
136
136
|
end_of_line
|
137
137
|
end
|
138
|
-
|
138
|
+
@verex.match(string)
|
139
139
|
end
|
140
140
|
|
141
141
|
# id:Nomina (ke-ku)
|
@@ -149,7 +149,7 @@ module Indofix
|
|
149
149
|
find 'ku'
|
150
150
|
end_of_line
|
151
151
|
end
|
152
|
-
|
152
|
+
@verex.match(string)
|
153
153
|
end
|
154
154
|
|
155
155
|
# id:Nomina (ke-mu)
|
@@ -163,7 +163,7 @@ module Indofix
|
|
163
163
|
find 'mu'
|
164
164
|
end_of_line
|
165
165
|
end
|
166
|
-
|
166
|
+
@verex.match(string)
|
167
167
|
end
|
168
168
|
|
169
169
|
# id:Nomina (ke-nya)
|
@@ -177,7 +177,7 @@ module Indofix
|
|
177
177
|
find 'nya'
|
178
178
|
end_of_line
|
179
179
|
end
|
180
|
-
|
180
|
+
@verex.match(string)
|
181
181
|
end
|
182
182
|
|
183
183
|
# id:Nomina (keber-an)
|
@@ -191,7 +191,7 @@ module Indofix
|
|
191
191
|
find 'an'
|
192
192
|
end_of_line
|
193
193
|
end
|
194
|
-
|
194
|
+
@verex.match(string)
|
195
195
|
end
|
196
196
|
|
197
197
|
# id:Nomina (kepeng-an)
|
@@ -205,7 +205,7 @@ module Indofix
|
|
205
205
|
find 'an'
|
206
206
|
end_of_line
|
207
207
|
end
|
208
|
-
|
208
|
+
@verex.match(string)
|
209
209
|
end
|
210
210
|
|
211
211
|
# id:Nomina (kese-an)
|
@@ -219,7 +219,7 @@ module Indofix
|
|
219
219
|
find 'an'
|
220
220
|
end_of_line
|
221
221
|
end
|
222
|
-
|
222
|
+
@verex.match(string)
|
223
223
|
end
|
224
224
|
|
225
225
|
# id:Nomina (keter-an)
|
@@ -233,7 +233,7 @@ module Indofix
|
|
233
233
|
find 'an'
|
234
234
|
end_of_line
|
235
235
|
end
|
236
|
-
|
236
|
+
@verex.match(string)
|
237
237
|
end
|
238
238
|
|
239
239
|
# id:Nomina (ketidak-an)
|
@@ -247,7 +247,7 @@ module Indofix
|
|
247
247
|
find 'an'
|
248
248
|
end_of_line
|
249
249
|
end
|
250
|
-
|
250
|
+
@verex.match(string)
|
251
251
|
end
|
252
252
|
|
253
253
|
# id:Nomina (pe-)
|
@@ -260,7 +260,7 @@ module Indofix
|
|
260
260
|
end_capture
|
261
261
|
end_of_line
|
262
262
|
end
|
263
|
-
|
263
|
+
@verex.match(string)
|
264
264
|
end
|
265
265
|
|
266
266
|
# id:Nomina (pe-an)
|
@@ -274,7 +274,7 @@ module Indofix
|
|
274
274
|
find 'an'
|
275
275
|
end_of_line
|
276
276
|
end
|
277
|
-
|
277
|
+
@verex.match(string)
|
278
278
|
end
|
279
279
|
|
280
280
|
# id:Nomina (peng-)
|
@@ -287,7 +287,7 @@ module Indofix
|
|
287
287
|
end_capture
|
288
288
|
end_of_line
|
289
289
|
end
|
290
|
-
|
290
|
+
@verex.match(string)
|
291
291
|
end
|
292
292
|
|
293
293
|
# id:Nomina (peng-an)
|
@@ -301,7 +301,7 @@ module Indofix
|
|
301
301
|
find 'an'
|
302
302
|
end_of_line
|
303
303
|
end
|
304
|
-
|
304
|
+
@verex.match(string)
|
305
305
|
end
|
306
306
|
|
307
307
|
# id:Nomina (per-)
|
@@ -314,7 +314,7 @@ module Indofix
|
|
314
314
|
end_capture
|
315
315
|
end_of_line
|
316
316
|
end
|
317
|
-
|
317
|
+
@verex.match(string)
|
318
318
|
end
|
319
319
|
|
320
320
|
# id:Nomina (per-an)
|
@@ -328,7 +328,7 @@ module Indofix
|
|
328
328
|
find 'an'
|
329
329
|
end_of_line
|
330
330
|
end
|
331
|
-
|
331
|
+
@verex.match(string)
|
332
332
|
end
|
333
333
|
|
334
334
|
# id:Nomina (se-)
|
@@ -341,7 +341,7 @@ module Indofix
|
|
341
341
|
end_capture
|
342
342
|
end_of_line
|
343
343
|
end
|
344
|
-
|
344
|
+
@verex.match(string)
|
345
345
|
end
|
346
346
|
|
347
347
|
# id:Nomina (se-an)
|
@@ -355,7 +355,7 @@ module Indofix
|
|
355
355
|
find 'an'
|
356
356
|
end_of_line
|
357
357
|
end
|
358
|
-
|
358
|
+
@verex.match(string)
|
359
359
|
end
|
360
360
|
|
361
361
|
# id:Nomina (se-nya)
|
@@ -369,7 +369,7 @@ module Indofix
|
|
369
369
|
find 'nya'
|
370
370
|
end_of_line
|
371
371
|
end
|
372
|
-
|
372
|
+
@verex.match(string)
|
373
373
|
end
|
374
374
|
|
375
375
|
end
|
@@ -4,7 +4,7 @@ module Indofix
|
|
4
4
|
class IndofixOtherHelper
|
5
5
|
|
6
6
|
# id:Adjektiva (-an)
|
7
|
-
def
|
7
|
+
def other_adjektiva_x_an (string)
|
8
8
|
@verex = VerEx.new do
|
9
9
|
start_of_line
|
10
10
|
begin_capture
|
@@ -13,11 +13,11 @@ module Indofix
|
|
13
13
|
find 'an'
|
14
14
|
end_of_line
|
15
15
|
end
|
16
|
-
|
16
|
+
@verex.match(string)
|
17
17
|
end
|
18
18
|
|
19
19
|
# id:Adjektiva (ber-)
|
20
|
-
def
|
20
|
+
def other_adjektiva_ber_x (string)
|
21
21
|
@verex = VerEx.new do
|
22
22
|
start_of_line
|
23
23
|
find 'ber'
|
@@ -26,11 +26,11 @@ module Indofix
|
|
26
26
|
end_capture
|
27
27
|
end_of_line
|
28
28
|
end
|
29
|
-
|
29
|
+
@verex.match(string)
|
30
30
|
end
|
31
31
|
|
32
32
|
# id:Adjektiva (ke-an)
|
33
|
-
def
|
33
|
+
def other_adjektiva_ke_x_an (string)
|
34
34
|
@verex = VerEx.new do
|
35
35
|
start_of_line
|
36
36
|
find 'ke'
|
@@ -40,11 +40,11 @@ module Indofix
|
|
40
40
|
find 'an'
|
41
41
|
end_of_line
|
42
42
|
end
|
43
|
-
|
43
|
+
@verex.match(string)
|
44
44
|
end
|
45
45
|
|
46
46
|
# id:Adjektiva (keter-an)
|
47
|
-
def
|
47
|
+
def other_adjektiva_keter_x_an (string)
|
48
48
|
@verex = VerEx.new do
|
49
49
|
start_of_line
|
50
50
|
find 'keter'
|
@@ -54,11 +54,11 @@ module Indofix
|
|
54
54
|
find 'an'
|
55
55
|
end_of_line
|
56
56
|
end
|
57
|
-
|
57
|
+
@verex.match(string)
|
58
58
|
end
|
59
59
|
|
60
60
|
# id:Adjektiva (me-)
|
61
|
-
def
|
61
|
+
def other_adjektiva_me_x (string)
|
62
62
|
@verex = VerEx.new do
|
63
63
|
start_of_line
|
64
64
|
find 'me'
|
@@ -67,11 +67,11 @@ module Indofix
|
|
67
67
|
end_capture
|
68
68
|
end_of_line
|
69
69
|
end
|
70
|
-
|
70
|
+
@verex.match(string)
|
71
71
|
end
|
72
72
|
|
73
73
|
# id:Adjektiva (me-kan)
|
74
|
-
def
|
74
|
+
def other_adjektiva_me_x_an (string)
|
75
75
|
@verex = VerEx.new do
|
76
76
|
start_of_line
|
77
77
|
find 'me'
|
@@ -81,11 +81,11 @@ module Indofix
|
|
81
81
|
find 'an'
|
82
82
|
end_of_line
|
83
83
|
end
|
84
|
-
|
84
|
+
@verex.match(string)
|
85
85
|
end
|
86
86
|
|
87
87
|
# id:Adjektiva (se-)
|
88
|
-
def
|
88
|
+
def other_adjektiva_se_x (string)
|
89
89
|
@verex = VerEx.new do
|
90
90
|
start_of_line
|
91
91
|
find 'se'
|
@@ -94,10 +94,10 @@ module Indofix
|
|
94
94
|
end_capture
|
95
95
|
end_of_line
|
96
96
|
end
|
97
|
-
|
97
|
+
@verex.match(string)
|
98
98
|
end
|
99
99
|
# id:Adjektiva (ter-)
|
100
|
-
def
|
100
|
+
def other_adjektiva_ter_x (string)
|
101
101
|
@verex = VerEx.new do
|
102
102
|
start_of_line
|
103
103
|
find 'ter'
|
@@ -106,11 +106,11 @@ module Indofix
|
|
106
106
|
end_capture
|
107
107
|
end_of_line
|
108
108
|
end
|
109
|
-
|
109
|
+
@verex.match(string)
|
110
110
|
end
|
111
111
|
|
112
112
|
# id:Adverbia (-an)
|
113
|
-
def
|
113
|
+
def other_adverbia_x_an (string)
|
114
114
|
@verex = VerEx.new do
|
115
115
|
start_of_line
|
116
116
|
begin_capture
|
@@ -119,11 +119,11 @@ module Indofix
|
|
119
119
|
find 'an'
|
120
120
|
end_of_line
|
121
121
|
end
|
122
|
-
|
122
|
+
@verex.match(string)
|
123
123
|
end
|
124
124
|
|
125
125
|
# id:Adverbia (se-)
|
126
|
-
def
|
126
|
+
def other_adverbia_se_x (string)
|
127
127
|
@verex = VerEx.new do
|
128
128
|
start_of_line
|
129
129
|
find 'se'
|
@@ -132,11 +132,11 @@ module Indofix
|
|
132
132
|
end_capture
|
133
133
|
end_of_line
|
134
134
|
end
|
135
|
-
|
135
|
+
@verex.match(string)
|
136
136
|
end
|
137
137
|
|
138
138
|
# id:Adverbia (se-nya)
|
139
|
-
def
|
139
|
+
def other_adverbia_ke_x_an (string)
|
140
140
|
@verex = VerEx.new do
|
141
141
|
start_of_line
|
142
142
|
find 'ke'
|
@@ -146,11 +146,11 @@ module Indofix
|
|
146
146
|
find 'an'
|
147
147
|
end_of_line
|
148
148
|
end
|
149
|
-
|
149
|
+
@verex.match(string)
|
150
150
|
end
|
151
151
|
|
152
152
|
# id:Bilangan (se-)
|
153
|
-
def
|
153
|
+
def other_bilangan_se_x (string)
|
154
154
|
@verex = VerEx.new do
|
155
155
|
start_of_line
|
156
156
|
find 'se'
|
@@ -159,53 +159,7 @@ module Indofix
|
|
159
159
|
end_capture
|
160
160
|
end_of_line
|
161
161
|
end
|
162
|
-
|
163
|
-
end
|
164
|
-
|
165
|
-
private
|
166
|
-
# pelepasan imbuhan 'me' dengan 'n'
|
167
|
-
def imbuhan_n_x(string)
|
168
|
-
@verex = VerEx.new do
|
169
|
-
start_of_line
|
170
|
-
find 'n'
|
171
|
-
begin_capture
|
172
|
-
anything
|
173
|
-
end_capture
|
174
|
-
end_of_line
|
175
|
-
end
|
176
|
-
return @verex.match(string)
|
177
|
-
end
|
178
|
-
|
179
|
-
# pelepasan imbuhan 'me' dengan 'ng'
|
180
|
-
def imbuhan_ng_x(string)
|
181
|
-
@verex = VerEx.new do
|
182
|
-
start_of_line
|
183
|
-
find 'ng'
|
184
|
-
begin_capture
|
185
|
-
anything
|
186
|
-
end_capture
|
187
|
-
end_of_line
|
188
|
-
end
|
189
|
-
return @verex.match(string)
|
190
|
-
end
|
191
|
-
|
192
|
-
# pemroresan pelepasan n dan ng
|
193
|
-
def process_imbuhan_n_ng(match)
|
194
|
-
@match = match
|
195
|
-
if !@match.nil?
|
196
|
-
@string = @match[1]
|
197
|
-
if !imbuhan_n_x(@string).nil?
|
198
|
-
if !imbuhan_ng_x(@string).nil?
|
199
|
-
return imbuhan_ng_x(@string)
|
200
|
-
else
|
201
|
-
return imbuhan_n_x(@string)
|
202
|
-
end
|
203
|
-
else
|
204
|
-
return @match
|
205
|
-
end
|
206
|
-
else
|
207
|
-
return @match
|
208
|
-
end
|
162
|
+
@verex.match(string)
|
209
163
|
end
|
210
164
|
|
211
165
|
end
|
@@ -13,7 +13,7 @@ module Indofix
|
|
13
13
|
find 'an'
|
14
14
|
end_of_line
|
15
15
|
end
|
16
|
-
|
16
|
+
@verex.match(string)
|
17
17
|
end
|
18
18
|
|
19
19
|
# id:Verba (-i)
|
@@ -26,7 +26,7 @@ module Indofix
|
|
26
26
|
find 'i'
|
27
27
|
end_of_line
|
28
28
|
end
|
29
|
-
|
29
|
+
@verex.match(string)
|
30
30
|
end
|
31
31
|
|
32
32
|
# id:Verba (-kan)
|
@@ -39,7 +39,7 @@ module Indofix
|
|
39
39
|
find 'kan'
|
40
40
|
end_of_line
|
41
41
|
end
|
42
|
-
|
42
|
+
@verex.match(string)
|
43
43
|
end
|
44
44
|
|
45
45
|
# id:Verba (-kanlah)
|
@@ -52,7 +52,7 @@ module Indofix
|
|
52
52
|
find 'kanlah'
|
53
53
|
end_of_line
|
54
54
|
end
|
55
|
-
|
55
|
+
@verex.match(string)
|
56
56
|
end
|
57
57
|
|
58
58
|
# id:Verba (-lah)
|
@@ -65,7 +65,7 @@ module Indofix
|
|
65
65
|
find 'lah'
|
66
66
|
end_of_line
|
67
67
|
end
|
68
|
-
|
68
|
+
@verex.match(string)
|
69
69
|
end
|
70
70
|
|
71
71
|
# id:Verba (ber-)
|
@@ -78,7 +78,7 @@ module Indofix
|
|
78
78
|
end_capture
|
79
79
|
end_of_line
|
80
80
|
end
|
81
|
-
|
81
|
+
@verex.match(string)
|
82
82
|
end
|
83
83
|
|
84
84
|
# id:Verba (ber-an)
|
@@ -92,7 +92,7 @@ module Indofix
|
|
92
92
|
find 'an'
|
93
93
|
end_of_line
|
94
94
|
end
|
95
|
-
|
95
|
+
@verex.match(string)
|
96
96
|
end
|
97
97
|
|
98
98
|
# id:Verba (ber-kan)
|
@@ -106,7 +106,7 @@ module Indofix
|
|
106
106
|
find 'kan'
|
107
107
|
end_of_line
|
108
108
|
end
|
109
|
-
|
109
|
+
@verex.match(string)
|
110
110
|
end
|
111
111
|
|
112
112
|
# id:Verba (di-)
|
@@ -119,7 +119,7 @@ module Indofix
|
|
119
119
|
end_capture
|
120
120
|
end_of_line
|
121
121
|
end
|
122
|
-
|
122
|
+
@verex.match(string)
|
123
123
|
end
|
124
124
|
|
125
125
|
# id:Verba (di-i)
|
@@ -133,7 +133,7 @@ module Indofix
|
|
133
133
|
find 'i'
|
134
134
|
end_of_line
|
135
135
|
end
|
136
|
-
|
136
|
+
@verex.match(string)
|
137
137
|
end
|
138
138
|
|
139
139
|
# id:Verba (di-kan)
|
@@ -147,7 +147,7 @@ module Indofix
|
|
147
147
|
find 'kan'
|
148
148
|
end_of_line
|
149
149
|
end
|
150
|
-
|
150
|
+
@verex.match(string)
|
151
151
|
end
|
152
152
|
|
153
153
|
# id:Verba (diper-)
|
@@ -160,7 +160,7 @@ module Indofix
|
|
160
160
|
end_capture
|
161
161
|
end_of_line
|
162
162
|
end
|
163
|
-
|
163
|
+
@verex.match(string)
|
164
164
|
end
|
165
165
|
|
166
166
|
# id:Verba (diper-i)
|
@@ -174,7 +174,7 @@ module Indofix
|
|
174
174
|
find 'i'
|
175
175
|
end_of_line
|
176
176
|
end
|
177
|
-
|
177
|
+
@verex.match(string)
|
178
178
|
end
|
179
179
|
|
180
180
|
# id:Verba (diper-kan)
|
@@ -188,7 +188,7 @@ module Indofix
|
|
188
188
|
find 'kan'
|
189
189
|
end_of_line
|
190
190
|
end
|
191
|
-
|
191
|
+
@verex.match(string)
|
192
192
|
end
|
193
193
|
|
194
194
|
# id:Verba (kau-)
|
@@ -201,7 +201,7 @@ module Indofix
|
|
201
201
|
end_capture
|
202
202
|
end_of_line
|
203
203
|
end
|
204
|
-
|
204
|
+
@verex.match(string)
|
205
205
|
end
|
206
206
|
|
207
207
|
# id:Verba (kau-i)
|
@@ -215,7 +215,7 @@ module Indofix
|
|
215
215
|
find 'i'
|
216
216
|
end_of_line
|
217
217
|
end
|
218
|
-
|
218
|
+
@verex.match(string)
|
219
219
|
end
|
220
220
|
|
221
221
|
# id:Verba (kau-kan)
|
@@ -229,7 +229,7 @@ module Indofix
|
|
229
229
|
find 'kan'
|
230
230
|
end_of_line
|
231
231
|
end
|
232
|
-
|
232
|
+
@verex.match(string)
|
233
233
|
end
|
234
234
|
|
235
235
|
# id:Verba (ke-an)
|
@@ -243,7 +243,7 @@ module Indofix
|
|
243
243
|
find 'an'
|
244
244
|
end_of_line
|
245
245
|
end
|
246
|
-
|
246
|
+
@verex.match(string)
|
247
247
|
end
|
248
248
|
|
249
249
|
# id:Verba (ku-)
|
@@ -256,7 +256,7 @@ module Indofix
|
|
256
256
|
end_capture
|
257
257
|
end_of_line
|
258
258
|
end
|
259
|
-
|
259
|
+
@verex.match(string)
|
260
260
|
end
|
261
261
|
|
262
262
|
# id:Verba (ku-i)
|
@@ -270,7 +270,7 @@ module Indofix
|
|
270
270
|
find 'i'
|
271
271
|
end_of_line
|
272
272
|
end
|
273
|
-
|
273
|
+
@verex.match(string)
|
274
274
|
end
|
275
275
|
|
276
276
|
# id:Verba (ku-kan)
|
@@ -284,7 +284,7 @@ module Indofix
|
|
284
284
|
find 'kan'
|
285
285
|
end_of_line
|
286
286
|
end
|
287
|
-
|
287
|
+
@verex.match(string)
|
288
288
|
end
|
289
289
|
|
290
290
|
# id:Verba (me-)
|
@@ -297,7 +297,7 @@ module Indofix
|
|
297
297
|
end_capture
|
298
298
|
end_of_line
|
299
299
|
end
|
300
|
-
|
300
|
+
@verex.match(string)
|
301
301
|
end
|
302
302
|
|
303
303
|
# id:Verba (me-i)
|
@@ -311,7 +311,7 @@ module Indofix
|
|
311
311
|
find 'i'
|
312
312
|
end_of_line
|
313
313
|
end
|
314
|
-
|
314
|
+
@verex.match(string)
|
315
315
|
end
|
316
316
|
|
317
317
|
# id:Verba (me-kan)
|
@@ -325,7 +325,7 @@ module Indofix
|
|
325
325
|
find 'kan'
|
326
326
|
end_of_line
|
327
327
|
end
|
328
|
-
|
328
|
+
@verex.match(string)
|
329
329
|
end
|
330
330
|
|
331
331
|
# id:Verba (memper-)
|
@@ -338,7 +338,7 @@ module Indofix
|
|
338
338
|
end_capture
|
339
339
|
end_of_line
|
340
340
|
end
|
341
|
-
|
341
|
+
@verex.match(string)
|
342
342
|
end
|
343
343
|
|
344
344
|
# id:Verba (memper-i)
|
@@ -352,7 +352,7 @@ module Indofix
|
|
352
352
|
find 'i'
|
353
353
|
end_of_line
|
354
354
|
end
|
355
|
-
|
355
|
+
@verex.match(string)
|
356
356
|
end
|
357
357
|
|
358
358
|
# id:Verba (memper-kan)
|
@@ -366,7 +366,7 @@ module Indofix
|
|
366
366
|
find 'kan'
|
367
367
|
end_of_line
|
368
368
|
end
|
369
|
-
|
369
|
+
@verex.match(string)
|
370
370
|
end
|
371
371
|
|
372
372
|
# id:Verba (per-kan)
|
@@ -380,7 +380,7 @@ module Indofix
|
|
380
380
|
find 'kan'
|
381
381
|
end_of_line
|
382
382
|
end
|
383
|
-
|
383
|
+
@verex.match(string)
|
384
384
|
end
|
385
385
|
|
386
386
|
# id:Verba (plural -an)
|
@@ -393,7 +393,7 @@ module Indofix
|
|
393
393
|
find 'an'
|
394
394
|
end_of_line
|
395
395
|
end
|
396
|
-
|
396
|
+
@verex.match(string)
|
397
397
|
end
|
398
398
|
|
399
399
|
# id:Verba (plural ber-)
|
@@ -406,7 +406,7 @@ module Indofix
|
|
406
406
|
end_capture
|
407
407
|
end_of_line
|
408
408
|
end
|
409
|
-
|
409
|
+
@verex.match(string)
|
410
410
|
end
|
411
411
|
|
412
412
|
# id:Verba (plural ber-an)
|
@@ -420,7 +420,7 @@ module Indofix
|
|
420
420
|
find 'an'
|
421
421
|
end_of_line
|
422
422
|
end
|
423
|
-
|
423
|
+
@verex.match(string)
|
424
424
|
end
|
425
425
|
|
426
426
|
# id:Verba (plural me-)
|
@@ -433,7 +433,7 @@ module Indofix
|
|
433
433
|
end_capture
|
434
434
|
end_of_line
|
435
435
|
end
|
436
|
-
|
436
|
+
@verex.match(string)
|
437
437
|
end
|
438
438
|
|
439
439
|
# id:Verba (plural me-i)
|
@@ -447,7 +447,7 @@ module Indofix
|
|
447
447
|
find 'i'
|
448
448
|
end_of_line
|
449
449
|
end
|
450
|
-
|
450
|
+
@verex.match(string)
|
451
451
|
end
|
452
452
|
|
453
453
|
# id:Verba (plural me-kan)
|
@@ -461,7 +461,7 @@ module Indofix
|
|
461
461
|
find 'kan'
|
462
462
|
end_of_line
|
463
463
|
end
|
464
|
-
|
464
|
+
@verex.match(string)
|
465
465
|
end
|
466
466
|
|
467
467
|
# id:Verba (plural ter-)
|
@@ -474,7 +474,7 @@ module Indofix
|
|
474
474
|
end_capture
|
475
475
|
end_of_line
|
476
476
|
end
|
477
|
-
|
477
|
+
@verex.match(string)
|
478
478
|
end
|
479
479
|
|
480
480
|
# id:Verba (ter-)
|
@@ -485,7 +485,7 @@ module Indofix
|
|
485
485
|
anything
|
486
486
|
end_capture
|
487
487
|
end
|
488
|
-
|
488
|
+
@verex.match(string)
|
489
489
|
end
|
490
490
|
|
491
491
|
# id:Verba (ter-i)
|
@@ -499,7 +499,7 @@ module Indofix
|
|
499
499
|
find 'i'
|
500
500
|
end_of_line
|
501
501
|
end
|
502
|
-
|
502
|
+
@verex.match(string)
|
503
503
|
end
|
504
504
|
|
505
505
|
# id:Verba (ter-kan)
|
@@ -513,7 +513,7 @@ module Indofix
|
|
513
513
|
find 'kan'
|
514
514
|
end_of_line
|
515
515
|
end
|
516
|
-
|
516
|
+
@verex.match(string)
|
517
517
|
end
|
518
518
|
|
519
519
|
end
|
data/lib/indofix/version.rb
CHANGED
data/lib/indofix.rb
CHANGED
@@ -26,21 +26,79 @@ module Indofix
|
|
26
26
|
def check_other
|
27
27
|
@check_other ||= IndofixOtherHelper.new
|
28
28
|
end
|
29
|
-
|
29
|
+
|
30
|
+
# Let's start check
|
31
|
+
# options:
|
32
|
+
# * nomina
|
33
|
+
# * verba
|
34
|
+
# * other
|
35
|
+
# * kpst
|
30
36
|
def check(params, string)
|
31
|
-
result =
|
37
|
+
@result = {}
|
32
38
|
if (!params.nil? || !string.nil?)
|
33
39
|
case params
|
34
40
|
when 'nomina'
|
35
|
-
result =
|
41
|
+
@result = nomina_probe(string)
|
36
42
|
when 'verba'
|
37
|
-
result =
|
43
|
+
@result = verba_probe(string)
|
44
|
+
when 'other'
|
45
|
+
@result = other_probe(string)
|
46
|
+
when 'kpst'
|
47
|
+
@result = kpst_probe(string)
|
38
48
|
end
|
39
|
-
result
|
49
|
+
@result.keys
|
40
50
|
else
|
41
51
|
raise(Error, "Indofix Error")
|
42
52
|
end
|
43
53
|
end
|
44
54
|
|
55
|
+
# Check probability for Nomina
|
56
|
+
# Return Hash
|
57
|
+
def nomina_probe(string)
|
58
|
+
nomina = check_nomina.methods.grep(/nomina/)
|
59
|
+
@detected = Hash.new
|
60
|
+
nomina.each do |method|
|
61
|
+
transform = check_nomina.send(method, string)
|
62
|
+
@detected[transform[1]] = method.to_s unless transform.nil?
|
63
|
+
end
|
64
|
+
return @detected
|
65
|
+
end
|
66
|
+
|
67
|
+
# Check probability for KPST
|
68
|
+
# Return Hash
|
69
|
+
def kpst_probe(string)
|
70
|
+
kpst = check_kpst.methods.grep(/imbuhan/)
|
71
|
+
@detected = Hash.new
|
72
|
+
kpst.each do |method|
|
73
|
+
transform = check_kpst.send(method, string)
|
74
|
+
@detected[transform] = method.to_s unless transform.nil?
|
75
|
+
end
|
76
|
+
return @detected
|
77
|
+
end
|
78
|
+
|
79
|
+
# Check probability for Verba
|
80
|
+
# Return Hash
|
81
|
+
def verba_probe(string)
|
82
|
+
verba = check_verba.methods.grep(/verba/)
|
83
|
+
@detected = Hash.new
|
84
|
+
verba.each do |method|
|
85
|
+
transform = check_verba.send(method, string)
|
86
|
+
@detected[transform] = method.to_s unless transform.nil?
|
87
|
+
end
|
88
|
+
return @detected
|
89
|
+
end
|
90
|
+
|
91
|
+
# Check probability for Others
|
92
|
+
# Return Hash
|
93
|
+
def other_probe(string)
|
94
|
+
other = check_other.methods.grep(/other/)
|
95
|
+
@detected = Hash.new
|
96
|
+
other.each do |method|
|
97
|
+
transform = check_other.send(method, string)
|
98
|
+
@detected[transform[1]] = method.to_s unless transform.nil?
|
99
|
+
end
|
100
|
+
return @detected
|
101
|
+
end
|
102
|
+
|
45
103
|
end
|
46
104
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: indofix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Muhammad K. Huda
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: verbal_expressions
|