-
Notifications
You must be signed in to change notification settings - Fork 16
Node Parsing stat
Brooke M. Fujita edited this page Feb 9, 2015
·
1 revision
When parsing nodes, Natto::MeCabNode
will have a stat
(status) value per the following:
-
0
- normal node defined in the dictionary -
1
- unknown node not defined in the dictionary -
3
- virtual node representing the end of a sentence
An example:
nm = Natto::MeCab.new
nm.parse('ブルザエモンはいったい何者だ?') {|p|puts "#{p.surface}, #{p.stat}"}
ブルザエモン, 1 # this noun is made-up, you won't find this in any dictionary!
は, 0
いったい, 0
何者, 0
だ, 0
?, 0
, 3 # end of sentence