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.


def beta : Float32 #

Backward accumulative log summation.

This value is only available when MECAB_MARGINAL_PROB is passed.


def bnext : Pointer(Wakame::Lib::MeCabNodeT) #

Pointer to the node which starts at the same position.


def char_type : UInt8 #

Character type


def cost : LibC::Long #

Best accumulative cost from bos node to this node.


def enext : Pointer(Wakame::Lib::MeCabNodeT) #

Pointer to the node which ends at the same position.


def feature : Pointer(LibC::Char) #

Feature string


def id : UInt32 #

Unique node id


def isbest : UInt8 #

Set 1 if this node is the best node.


def lc_attr : UInt16 #

Left attribute id


def length : UInt16 #

Length of the surface form.


def lpath : Pointer(Wakame::Lib::MeCabPathT) #

Pointer to the right path.

This value is NULL in MECAB_ONE_BEST mode.


def next : Pointer(Wakame::Lib::MeCabNodeT) #

Pointer to the next node.


def posid : UInt16 #

Unique part of speech id.

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


def prev : Pointer(Wakame::Lib::MeCabNodeT) #

Pointer to the previous node.


def prob : Float32 #

Marginal probability

This value is only available when MECAB_MARGINAL_PROB is passed.


def rc_attr : UInt16 #

Right attribute id


def rlength : UInt16 #

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


def rpath : Pointer(Wakame::Lib::MeCabPathT) #

Pointer to the right path.

This value is NULL in MECAB_ONE_BEST mode.


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.


def surface : Pointer(LibC::Char) #

Surface string

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


def wcost : Int16 #

Word cost