Browse files

Improve variable part -> surface

  • Loading branch information...
1 parent 4d87f3a commit cb330e5550402e95211c81937a1b00c17e69b393 @myokoym committed Oct 7, 2012
Showing with 3 additions and 7 deletions.
  1. +3 −7 lib/mecab-syllable/syllable.rb
View
10 lib/mecab-syllable/syllable.rb
@@ -5,10 +5,6 @@
module MeCab
class Node
- def part
- surface
- end
-
def kana
feature.split(/,/)[8]
end
@@ -28,13 +24,13 @@ def split(text)
nodes = MeCab::Tagger.new.parseToNode(text)
syllables = []
nodes.each do |node|
- part = node.part
- next if part.empty?
+ surface = node.surface
+ next if surface.empty?
kana = node.kana
if kana
syllables << select_syllable(kana)
else
- syllables << select_syllable(part)
+ syllables << select_syllable(surface)
end
end
syllables

0 comments on commit cb330e5

Please sign in to comment.