NAME

Text::CaboCha::Token - CaboCha Token Object

SYNOPSIS

use utf8;
use Encode;
use Text::CaboCha;
my $cabocha = Text::CaboCha->new();
my $text = encode(Text::CaboCha::ENCODING, "太郎は次郎が持っている本を花子に渡した。");
my $tree = $cabocha->parse($text);

my $token_size = $tree->token_size;
for (my $i = 0; $i < $token_size; $i++) {
    my $token = $tree->token($i);
    # do something
}

# You can get the chunk value from chunk object using below methods
$token->surface;
$token->normalized_surface;
$token->feature;
$token->feature_list; # array reference
$token->feature_list_size;
$token->ne;
$token->additional_info;
$token->chunk; # It will return Text::CaboCha::Chunk object

DESCRIPTION

Text::CaboCha::Token encapsulates the cabocha token object.

SEE ALSO

Text::CaboCha Text::CaboCha::Chunk

LICENSE

Copyright (C) Kei Kamikawa.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html

AUTHOR

Kei Kamikawa <x00.x7f@gmail.com> @codehex