Module: MitoNatto
- Defined in:
- lib/mito_natto.rb,
lib/mito_natto/version.rb
Constant Summary collapse
- VERSION =
"0.0.1"
Class Method Summary collapse
Class Method Details
.parse(text) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/mito_natto.rb', line 9 def self.parse(text) node_list = [] if text == nil || text == '' return node_list end natto_mecab.parse(text) do |node| next if node.surface == nil mito_natto_node = MitoNattoNode.new mito_natto_node.mecab_node = node node_list.push(mito_natto_node) end node_list end |