Module: Jieba

Defined in:
lib/jieba.rb,
lib/jieba/version.rb

Constant Summary collapse

VERSION =
"0.0.1"

Instance Method Summary collapse

Instance Method Details

#to_tagsObject



7
8
9
10
# File 'lib/jieba.rb', line 7

def to_tags
  words = segmenter.sentenceProcess(self).to_s[1..-2].split(", ") rescue []
  words.map{ |word| word if word.size >=2 }.uniq.compact unless words.empty?
end