struct Wakame::Lib::MeCabNodeT

Overview

Underlying structure for Wakame::MeCabNode. Represents struct mecab_node_t in C.

All of these attributes can be accessed directly from Wakame::MeCabNode without retrieving this struct from its pointer. DO NOT use this struct in your actual code!

Defined in:

wakame/lib/struct.cr

Instance Method Summary

Instance Method Detail

def alpha : Float32 #

Forward accumulative log summation.

This value is only available when MECAB_MARGINAL_PROB is passed.


[View source]
def beta : Float32 #

Backward accumulative log summation.

This value is only available when MECAB_MARGINAL_PROB is passed.


[View source]
def bnext : Pointer(Wakame::Lib::MeCabNodeT) #

Pointer to the node which starts at the same position.


[View source]
def char_type : UInt8 #

Character type


[View source]
def cost : LibC::Long #

Best accumulative cost from bos node to this node.


[View source]
def enext : Pointer(Wakame::Lib::MeCabNodeT) #

Pointer to the node which ends at the same position.


[View source]
def feature : Pointer(LibC::Char) #

Feature string


[View source]
def id : UInt32 #

Unique node id


[View source]
def isbest : UInt8 #

Set 1 if this node is the best node.


[View source]
def lc_attr : UInt16 #

Left attribute id


[View source]
def length : UInt16 #

Length of the surface form.


[View source]
def lpath : Pointer(Wakame::Lib::MeCabPathT) #

Pointer to the right path.

This value is NULL in MECAB_ONE_BEST mode.


[View source]
def next : Pointer(Wakame::Lib::MeCabNodeT) #

Pointer to the next node.


[View source]
def posid : UInt16 #

Unique part of speech id.

This value is defined in "pos.def" file.


[View source]
def prev : Pointer(Wakame::Lib::MeCabNodeT) #

Pointer to the previous node.


[View source]
def prob : Float32 #

Marginal probability

This value is only available when MECAB_MARGINAL_PROB is passed.


[View source]
def rc_attr : UInt16 #

Right attribute id


[View source]
def rlength : UInt16 #

Length of the surface form including the white space before the morph.


[View source]
def rpath : Pointer(Wakame::Lib::MeCabPathT) #

Pointer to the right path.

This value is NULL in MECAB_ONE_BEST mode.


[View source]
def stat : UInt8 #

Status of this model.

This can be either MECAB_NOR_NODE, MECAB_UNK_NODE, MECAB_BOS_NODE, MECAB_EOS_NODE, or MECAB_EON_NODE.


[View source]
def surface : Pointer(LibC::Char) #

Surface string

This value is not 0 terminated. You can get the length from the length/rlength members.


[View source]
def wcost : Int16 #

Word cost


[View source]