struct Wakame::MeCabNode

Overview

Wrapper for the Wakame::Lib::MeCabNodeT structure holding attributes of the parsed node.

Included Modules

Defined in:

wakame/node.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pointer : Pointer(Lib::MeCabNodeT), tagger : Pointer(LibMeCab::T)? = nil) #

Instance Method Detail

def alpha : Float32 #

This method forwards the call to the underlying Wakame::Lib::MeCabNodeT structure.

See Wakame::Lib::MeCabNodeT#alpha for details.


def beta : Float32 #

This method forwards the call to the underlying Wakame::Lib::MeCabNodeT structure.

See Wakame::Lib::MeCabNodeT#beta for details.


def bnext : MeCabNode? #

This method forwards the call to the underlying Wakame::Lib::MeCabNodeT structure, resolves the pointer returned, and returns the wrapped variant of it.

See Wakame::Lib::MeCabNodeT#bnext for details on the underlying value.


def bos_node? : Bool #

Calls NodeStatus#bos_node? of the #stat.


def char_type : UInt8 #

This method forwards the call to the underlying Wakame::Lib::MeCabNodeT structure.

See Wakame::Lib::MeCabNodeT#char_type for details.


def cost : LibC::Long #

This method forwards the call to the underlying Wakame::Lib::MeCabNodeT structure.

See Wakame::Lib::MeCabNodeT#cost for details.


def enext : MeCabNode? #

This method forwards the call to the underlying Wakame::Lib::MeCabNodeT structure, resolves the pointer returned, and returns the wrapped variant of it.

See Wakame::Lib::MeCabNodeT#enext for details on the underlying value.


def eon_node? : Bool #

Calls NodeStatus#eon_node? of the #stat.


def eos_node? : Bool #

Calls NodeStatus#eos_node? of the #stat.


def feature : String #

Feature string


def formatted : String #

Formatted variant of this node. The format can be specified with the options output_format_type or node_format when instantiating the Wakame::MeCab class.


def id : UInt32 #

This method forwards the call to the underlying Wakame::Lib::MeCabNodeT structure.

See Wakame::Lib::MeCabNodeT#id for details.


def is_best? : Bool #

Returns true if this node is the best node.


def lc_attr : UInt16 #

This method forwards the call to the underlying Wakame::Lib::MeCabNodeT structure.

See Wakame::Lib::MeCabNodeT#lc_attr for details.


def length : UInt16 #

This method forwards the call to the underlying Wakame::Lib::MeCabNodeT structure.

See Wakame::Lib::MeCabNodeT#length for details.


def lpath : MeCabPath? #

This method forwards the call to the underlying Wakame::Lib::MeCabPathT structure, resolves the pointer returned, and returns the wrapped variant of it.

See Wakame::Lib::MeCabPathT#lpath for details on the underlying value.


def next : MeCabNode? #

This method forwards the call to the underlying Wakame::Lib::MeCabNodeT structure, resolves the pointer returned, and returns the wrapped variant of it.

See Wakame::Lib::MeCabNodeT#next for details on the underlying value.


def normal_node? : Bool #

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

Pointer to the underlying structure.


def posid : UInt16 #

This method forwards the call to the underlying Wakame::Lib::MeCabNodeT structure.

See Wakame::Lib::MeCabNodeT#posid for details.


def prev : MeCabNode? #

This method forwards the call to the underlying Wakame::Lib::MeCabNodeT structure, resolves the pointer returned, and returns the wrapped variant of it.

See Wakame::Lib::MeCabNodeT#prev for details on the underlying value.


def prob : Float32 #

This method forwards the call to the underlying Wakame::Lib::MeCabNodeT structure.

See Wakame::Lib::MeCabNodeT#prob for details.


def rc_attr : UInt16 #

This method forwards the call to the underlying Wakame::Lib::MeCabNodeT structure.

See Wakame::Lib::MeCabNodeT#rc_attr for details.


def rlength : UInt16 #

This method forwards the call to the underlying Wakame::Lib::MeCabNodeT structure.

See Wakame::Lib::MeCabNodeT#rlength for details.


def rpath : MeCabPath? #

This method forwards the call to the underlying Wakame::Lib::MeCabPathT structure, resolves the pointer returned, and returns the wrapped variant of it.

See Wakame::Lib::MeCabPathT#rpath for details on the underlying value.


Status of this model.


def surface : String #

Surface string


def unknown_node? : Bool #

def wcost : Int16 #

This method forwards the call to the underlying Wakame::Lib::MeCabNodeT structure.

See Wakame::Lib::MeCabNodeT#wcost for details.