rusmorph 0.1.0-aarch64-linux-gnu
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 +7 -0
- data/LICENSES.txt +1058 -0
- data/lib/librusmorph_bindings.so +0 -0
- data/lib/rusmorph/native.rb +143 -0
- data/lib/rusmorph.rb +356 -0
- metadata +291 -0
|
Binary file
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
require "fiddle/import"
|
|
2
|
+
require "json"
|
|
3
|
+
require "rbconfig"
|
|
4
|
+
|
|
5
|
+
module Rusmorph
|
|
6
|
+
class Error < StandardError
|
|
7
|
+
attr_reader :kind, :reason
|
|
8
|
+
|
|
9
|
+
def initialize(message)
|
|
10
|
+
kind, separator, detail = message.partition("\n")
|
|
11
|
+
@kind, @reason = (separator.empty? ? "InvalidInput" : kind).split(".", 2)
|
|
12
|
+
super(separator.empty? ? message : detail)
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
class InitializationError < Error; end
|
|
17
|
+
|
|
18
|
+
module Native
|
|
19
|
+
extend Fiddle::Importer
|
|
20
|
+
|
|
21
|
+
NATIVE_UINT_FORMAT = "J".freeze
|
|
22
|
+
private_constant :NATIVE_UINT_FORMAT
|
|
23
|
+
|
|
24
|
+
host_os = RbConfig::CONFIG.fetch("host_os")
|
|
25
|
+
filename = case host_os
|
|
26
|
+
when /darwin/ then "librusmorph_bindings.dylib"
|
|
27
|
+
when /mingw/ then "rusmorph_bindings.dll"
|
|
28
|
+
when /linux/ then "librusmorph_bindings.so"
|
|
29
|
+
else raise LoadError, "rusmorph не поддерживает платформу #{host_os}"
|
|
30
|
+
end
|
|
31
|
+
library_dir = File.expand_path("..", __dir__)
|
|
32
|
+
|
|
33
|
+
begin
|
|
34
|
+
dlload(File.join(library_dir, filename))
|
|
35
|
+
rescue Fiddle::DLError => error
|
|
36
|
+
raise unless host_os.include?("linux")
|
|
37
|
+
raise LoadError, "не удалось загрузить #{filename}: #{error.message}"
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
extern "void* rm_analyzer_new(void*)"
|
|
41
|
+
extern "void rm_analyzer_free(void*)"
|
|
42
|
+
extern "void* rm_parse(void*, const char*, void*, void*)"
|
|
43
|
+
extern "void rm_readings_free(void*)"
|
|
44
|
+
extern "void* rm_reading(void*, size_t, const char*, void*)"
|
|
45
|
+
extern "void* rm_derive(void*, size_t, const char*, const char*, void*, void*)"
|
|
46
|
+
extern "char rm_word_is_known(void*, const char*, void*)"
|
|
47
|
+
extern "void* rm_words(void*, const char*, const char*, const char*, void*)"
|
|
48
|
+
extern "void* rm_parse_fio(void*, const char*, const char*, void*)"
|
|
49
|
+
extern "void* rm_inflect_fio(void*, const char*, const char*, void*)"
|
|
50
|
+
extern "void* rm_fio(void*, const char*, const char*, void*)"
|
|
51
|
+
extern "void rm_fio_free(void*)"
|
|
52
|
+
extern "void* rm_grammemes(void*)"
|
|
53
|
+
extern "void* rm_notice_kinds(void*)"
|
|
54
|
+
extern "void rm_string_free(void*)"
|
|
55
|
+
|
|
56
|
+
def self.utf8(text)
|
|
57
|
+
text = text.encode(Encoding::UTF_8)
|
|
58
|
+
raise Error, "строка содержит нулевой символ (NUL)" if text.include?("\0")
|
|
59
|
+
text
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def self.call(function, *args)
|
|
63
|
+
error_buffer = [0].pack(NATIVE_UINT_FORMAT)
|
|
64
|
+
result = public_send(function, *args, error_buffer)
|
|
65
|
+
address = error_buffer.unpack1(NATIVE_UINT_FORMAT)
|
|
66
|
+
return result if address.zero?
|
|
67
|
+
|
|
68
|
+
message = take_text(Fiddle::Pointer.new(address))
|
|
69
|
+
raise InitializationError, message if message.start_with?("Initialization\n")
|
|
70
|
+
raise Error, message
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
def self.take_text(pointer)
|
|
74
|
+
pointer.to_s.force_encoding(Encoding::UTF_8)
|
|
75
|
+
ensure
|
|
76
|
+
rm_string_free(pointer)
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
def self.call_json(function, *args)
|
|
80
|
+
JSON.parse(take_text(call(function, *args)))
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
def self.owned(pointer, destructor)
|
|
84
|
+
Fiddle::Pointer.new(pointer.to_i, 0, self[destructor].to_i)
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
def self.readings(function, *args)
|
|
88
|
+
count_buffer = [0].pack(NATIVE_UINT_FORMAT)
|
|
89
|
+
handle = owned(call(function, *args, count_buffer), "rm_readings_free")
|
|
90
|
+
[handle, count_buffer.unpack1(NATIVE_UINT_FORMAT)]
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
def self.analyzer
|
|
94
|
+
owned(call(:rm_analyzer_new), "rm_analyzer_free")
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
def self.parse(handle, word)
|
|
98
|
+
readings(:rm_parse, handle, utf8(word))
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
def self.reading(handle, index, attribute)
|
|
102
|
+
take_text(call(:rm_reading, handle, index, attribute))
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
def self.tag(handle, index)
|
|
106
|
+
call_json(:rm_reading, handle, index, "tag")
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
def self.derive(handle, index, operation, argument)
|
|
110
|
+
readings(:rm_derive, handle, index, operation, utf8(argument))
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
def self.word_is_known(handle, word)
|
|
114
|
+
call(:rm_word_is_known, handle, utf8(word)) != 0
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
def self.words(handle, operation, word, options = nil)
|
|
118
|
+
encoded_options = options.nil? ? "" : JSON.generate(options)
|
|
119
|
+
call_json(:rm_words, handle, operation, utf8(word), encoded_options)
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
def self.parse_fio(handle, source, gender)
|
|
123
|
+
owned(call(:rm_parse_fio, handle, JSON.generate(source), utf8(gender)), "rm_fio_free")
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
def self.inflect_fio(handle, source, gender)
|
|
127
|
+
call_json(:rm_inflect_fio, handle, JSON.generate(source), utf8(gender))
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
def self.fio(handle, operation, argument)
|
|
131
|
+
call_json(:rm_fio, handle, operation, utf8(argument))
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
def self.grammemes
|
|
135
|
+
call_json(:rm_grammemes)
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
def self.notice_kinds
|
|
139
|
+
call_json(:rm_notice_kinds)
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
private_constant :Native
|
|
143
|
+
end
|
data/lib/rusmorph.rb
ADDED
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
require "set"
|
|
2
|
+
require_relative "rusmorph/native"
|
|
3
|
+
|
|
4
|
+
module Rusmorph
|
|
5
|
+
class Case < String
|
|
6
|
+
alias as_str to_s
|
|
7
|
+
end
|
|
8
|
+
class Gender < String
|
|
9
|
+
alias as_str to_s
|
|
10
|
+
end
|
|
11
|
+
class PartKind < String; end
|
|
12
|
+
class Method < String; end
|
|
13
|
+
class Category < String; end
|
|
14
|
+
class LimitError < String; end
|
|
15
|
+
|
|
16
|
+
{
|
|
17
|
+
Case => %w[Nomn Gent Datv Accs Ablt Loct],
|
|
18
|
+
Gender => %w[Male Female Unknown],
|
|
19
|
+
PartKind => %w[FirstName Surname Patronymic],
|
|
20
|
+
LimitError => %w[WordTooLong WorkLimitExceeded ResultLimitExceeded],
|
|
21
|
+
Method => %w[
|
|
22
|
+
Dictionary KnownPrefix UnknownPrefix KnownSuffix Hyphenated HyphenParticle
|
|
23
|
+
HyphenAdverb Initials Number Punctuation Roman Latin Unknown
|
|
24
|
+
]
|
|
25
|
+
}.each do |type, variants|
|
|
26
|
+
lowercase = type == Case || type == Gender
|
|
27
|
+
variants.each do |name|
|
|
28
|
+
value = lowercase ? name.downcase : name
|
|
29
|
+
type.const_set(name, type.new(value).freeze)
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
Case::ALL = [Case::Nomn, Case::Gent, Case::Datv, Case::Accs, Case::Ablt, Case::Loct].freeze
|
|
33
|
+
|
|
34
|
+
class Grammeme < String
|
|
35
|
+
attr_reader :category
|
|
36
|
+
|
|
37
|
+
def initialize(code, category)
|
|
38
|
+
super(code)
|
|
39
|
+
@category = category&.freeze
|
|
40
|
+
freeze
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
alias name to_s
|
|
44
|
+
|
|
45
|
+
INDEX = Native.grammemes.each_with_object({}) do |(variant, code, category), result|
|
|
46
|
+
Category.const_set(category, category.freeze) if category && !Category.const_defined?(category, false)
|
|
47
|
+
result[code] = const_set(variant, new(code, category))
|
|
48
|
+
end.freeze
|
|
49
|
+
ALL = INDEX.values.freeze
|
|
50
|
+
|
|
51
|
+
def self.from_name(name)
|
|
52
|
+
INDEX[name]
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
class GrammemeSet
|
|
57
|
+
include Enumerable
|
|
58
|
+
|
|
59
|
+
def initialize(codes = [])
|
|
60
|
+
@values = codes.map { |code| Grammeme::INDEX.fetch(code) }.to_set.freeze
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def self.single(grammeme)
|
|
64
|
+
new([grammeme])
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def contains(grammeme)
|
|
68
|
+
@values.include?(grammeme)
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
def each(&block)
|
|
72
|
+
iter.each(&block)
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def iter
|
|
76
|
+
Grammeme::ALL.select { |grammeme| contains(grammeme) }
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
def of_category(category)
|
|
80
|
+
Grammeme::ALL.find { |grammeme| contains(grammeme) && grammeme.category == category }
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
def contains_all(other)
|
|
84
|
+
other.all? { |grammeme| contains(grammeme) }
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
def intersects(other)
|
|
88
|
+
other.any? { |grammeme| contains(grammeme) }
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
def with_grammeme(grammeme)
|
|
92
|
+
union([grammeme])
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
def without(grammeme)
|
|
96
|
+
difference([grammeme])
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
def union(other)
|
|
100
|
+
GrammemeSet.new(@values | other)
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
def intersection(other)
|
|
104
|
+
GrammemeSet.new(@values & other)
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
def difference(other)
|
|
108
|
+
GrammemeSet.new(@values - other)
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
def len
|
|
112
|
+
@values.size
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
def is_empty
|
|
116
|
+
@values.empty?
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
def ==(other)
|
|
120
|
+
other.is_a?(GrammemeSet) && len == other.len && contains_all(other)
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
EMPTY = new.freeze
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
class Tag
|
|
127
|
+
attr_reader :as_str, :grammemes, :pos, :gender, :grammatical_number, :case, :person, :tense
|
|
128
|
+
|
|
129
|
+
def initialize(text, codes, features)
|
|
130
|
+
@as_str = text
|
|
131
|
+
@grammemes = GrammemeSet.new(codes)
|
|
132
|
+
@pos, @gender, @grammatical_number, @case, @person, @tense = features.map { |code| Grammeme.from_name(code) }
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
def contains(grammeme)
|
|
136
|
+
grammemes.contains(grammeme)
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
def contains_all(other)
|
|
140
|
+
grammemes.contains_all(other)
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
Cases = Struct.new(:nominative, :genitive, :dative, :accusative, :instrumental, :prepositional) do
|
|
145
|
+
def get(code)
|
|
146
|
+
index = Case::ALL.index(code)
|
|
147
|
+
raise ArgumentError, "неизвестный падеж" unless index
|
|
148
|
+
self[index]
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
WordVariant = Struct.new(:normal_form, :forms, :is_known)
|
|
152
|
+
WordForms = Struct.new(:singular, :plural)
|
|
153
|
+
Part = Struct.new(:kind, :text)
|
|
154
|
+
NoticeKind = Struct.new(:code, :message)
|
|
155
|
+
Native.notice_kinds.each do |name, code, message|
|
|
156
|
+
NoticeKind.const_set(name, NoticeKind.new(code.freeze, message.freeze).freeze)
|
|
157
|
+
end
|
|
158
|
+
Notice = Struct.new(:kind, :fragment, :alternatives)
|
|
159
|
+
FioForm = Struct.new(:value, :notices)
|
|
160
|
+
FioForms = Struct.new(:forms, :gender, :parts)
|
|
161
|
+
SuggestOptions = Struct.new(:max_distance, :limit, keyword_init: true)
|
|
162
|
+
|
|
163
|
+
class FioInput
|
|
164
|
+
attr_reader :source, :gender
|
|
165
|
+
|
|
166
|
+
def initialize(source, gender = "unknown".freeze)
|
|
167
|
+
@source, @gender = source, gender
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
def self.parts(parts)
|
|
171
|
+
new(parts)
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
def with_gender(gender)
|
|
175
|
+
FioInput.new(source, gender)
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
module Convert
|
|
180
|
+
def self.readings(handle, count)
|
|
181
|
+
Array.new(count) { |index| Parse.send(:new, handle, index) }
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
def self.fio_source_and_gender(value)
|
|
185
|
+
return [value, Gender::Unknown] if value.is_a?(String)
|
|
186
|
+
source = value.source
|
|
187
|
+
source = source.map(&:to_a) unless source.is_a?(String)
|
|
188
|
+
[source, value.gender]
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
def self.notices(rows)
|
|
192
|
+
rows.map { |kind, fragment, alternatives| Notice.new(NoticeKind.new(*kind), fragment, alternatives) }
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
def self.fio_form(row)
|
|
196
|
+
value, notice_rows = row
|
|
197
|
+
FioForm.new(value, notices(notice_rows))
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
def self.fio_forms(row)
|
|
201
|
+
forms, gender, parts = row
|
|
202
|
+
cases = Cases.new(*forms.map { |case_form| fio_form(case_form) })
|
|
203
|
+
FioForms.new(cases, Gender.new(gender), parts.map { |part| Part.new(*part) })
|
|
204
|
+
end
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
private_constant :Convert
|
|
208
|
+
|
|
209
|
+
class FioParse
|
|
210
|
+
private_class_method :new, :allocate
|
|
211
|
+
|
|
212
|
+
def initialize(handle)
|
|
213
|
+
@handle = handle
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
def parts
|
|
217
|
+
get("parts").map { |part| Part.new(*part) }
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
def gender
|
|
221
|
+
Gender.new(get("gender"))
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
def notices
|
|
225
|
+
Convert.notices(get("notices"))
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
def inflect(code)
|
|
229
|
+
Convert.fio_form(get("inflect", code))
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
def all_cases
|
|
233
|
+
Convert.fio_forms(get("all_cases"))
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
private
|
|
237
|
+
def get(operation, argument = "")
|
|
238
|
+
Native.fio(@handle, operation, argument)
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
class Parse
|
|
243
|
+
UINT64_RANGE = (0...2**64).freeze
|
|
244
|
+
private_constant :UINT64_RANGE
|
|
245
|
+
private_class_method :new, :allocate
|
|
246
|
+
|
|
247
|
+
def initialize(handle, index)
|
|
248
|
+
@handle, @index = handle, index
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
def method(*args)
|
|
252
|
+
return super unless args.empty?
|
|
253
|
+
Method.new(get("method"))
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
def word
|
|
257
|
+
get("word")
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
def normal_form
|
|
261
|
+
get("normal_form")
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
def score
|
|
265
|
+
Float(get("score"))
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
def is_known
|
|
269
|
+
get("is_known") == "1"
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
def tag
|
|
273
|
+
Tag.new(*Native.tag(@handle, @index))
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
def normalized
|
|
277
|
+
forms("normalized").first
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
def lexeme
|
|
281
|
+
forms("lexeme")
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
def inflect(grammemes)
|
|
285
|
+
raise TypeError, "ожидается коллекция кодов граммем" unless grammemes.respond_to?(:each)
|
|
286
|
+
codes = grammemes.to_a
|
|
287
|
+
codes.each do |code|
|
|
288
|
+
next if Grammeme.from_name(code)
|
|
289
|
+
raise Error, "InvalidInput\nнеизвестный код граммемы: #{code.to_s.encode(Encoding::UTF_8)}"
|
|
290
|
+
end
|
|
291
|
+
forms("inflect", codes.join(" ")).first
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
def make_agree_with_number(number)
|
|
295
|
+
raise Error, "ожидается целое число от 0 до 18446744073709551615" unless number.is_a?(Integer) && UINT64_RANGE.cover?(number)
|
|
296
|
+
forms("make_agree_with_number", number.to_s).first
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
private
|
|
300
|
+
def get(attribute)
|
|
301
|
+
Native.reading(@handle, @index, attribute)
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
def forms(operation, argument = "")
|
|
305
|
+
Convert.readings(*Native.derive(@handle, @index, operation, argument))
|
|
306
|
+
end
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
class MorphAnalyzer
|
|
310
|
+
def initialize
|
|
311
|
+
@handle = Native.analyzer
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
def parse(word)
|
|
315
|
+
Convert.readings(*Native.parse(@handle, word))
|
|
316
|
+
end
|
|
317
|
+
|
|
318
|
+
def word_is_known(word)
|
|
319
|
+
Native.word_is_known(@handle, word)
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
def normal_forms(word)
|
|
323
|
+
Native.words(@handle, "normal_forms", word)
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
def suggest(word)
|
|
327
|
+
Native.words(@handle, "suggest", word)
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
def suggest_with_options(word, options)
|
|
331
|
+
Native.words(@handle, "suggest_with_options", word, options.to_a)
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
def inflect_word(word)
|
|
335
|
+
variants_by_number = Native.words(@handle, "inflect_word", word).map do |variants|
|
|
336
|
+
variants.map do |normal_form, case_forms, is_known|
|
|
337
|
+
WordVariant.new(normal_form, Cases.new(*case_forms), is_known)
|
|
338
|
+
end
|
|
339
|
+
end
|
|
340
|
+
WordForms.new(*variants_by_number)
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
def parse_fio(value)
|
|
344
|
+
FioParse.send(:new, Native.parse_fio(@handle, *Convert.fio_source_and_gender(value)))
|
|
345
|
+
end
|
|
346
|
+
|
|
347
|
+
def inflect_fio(value)
|
|
348
|
+
Convert.fio_forms(Native.inflect_fio(@handle, *Convert.fio_source_and_gender(value)))
|
|
349
|
+
end
|
|
350
|
+
end
|
|
351
|
+
Analyzer = MorphAnalyzer
|
|
352
|
+
|
|
353
|
+
def self.analyzer
|
|
354
|
+
MorphAnalyzer.new
|
|
355
|
+
end
|
|
356
|
+
end
|