example_lattice.cpp translated into perl. It's meant to be used with ipadic:
new MeCab::Model() may throw exceptions:
new MeCab::Model() -> MeCabc::new_Model()
MeCabc::new_Model() -> _wrap_new_Model()
_wrap_new_Model() -> _wrap_new_Model__SWIG_1()
_wrap_new_Model__SWIG_1() -> MeCab::ModelImpl::new_MeCab_Model()
MeCab::ModelImpl::new_MeCab_Model() -> MeCab::createModel()
MeCab::createModel() -> MeCab::ModelImpl::open()
MeCab::ModelImpl::open() -> setGlobalError(...)
MeCab::ModelImpl::new_MeCab_Model() -> throw MeCab::getLastError()
MeCab::Model::createTagger() may return 0:
MeCab::Model::createTagger() -> MeCabc::Model_createTagger()
MeCabc::Model_createTagger() -> _wrap_Model_createTagger()
_wrap_Model_createTagger() -> MeCab::ModelImpl::createTagger()
MeCab::ModelImpl::createTagger() -> return 0
MeCab::Model::createLattice() may return 0:
MeCab::Model::createLattice() -> MeCabc::Model_createLattice()
MeCabc::Model_createLattice() -> _wrap_Model_createLattice()
_wrap_Model_createLattice() -> MeCab::ModelImpl::createLattice()
MeCab::ModelImpl::createLattice() -> return 0
MeCab::Tagger::parse() may return 0, use MeCab::Tagger::what():
MeCab::Tagger::parse() -> MeCabc::Tagger_parse()
MeCabc::Tagger_parse() -> _wrap_Tagger_parse()
_wrap_Tagger_parse() -> _wrap_Tagger_parse__SWIG_2()
_wrap_Tagger_parse__SWIG_2() -> MeCab::TaggerImpl::parse()
MeCab::TaggerImpl::parse() -> MeCab::TaggerImpl::parse()
MeCab::TaggerImpl::parse() -> return 0
MeCab::Lattice::set_request_type():
MeCab::Lattice::set_request_type() -> MeCabc::Lattice_set_request_type()
MeCabc::Lattice_set_request_type() -> _wrap_Lattice_set_request_type()
_wrap_Lattice_set_request_type() -> MeCab::LatticeImpl::set_request_type()
MeCab::LatticeImpl::set_request_type() -> request_type_ = request_type
MeCab::Lattice::remove_request_type():
MeCab::Lattice::remove_request_type() -> MeCabc::Lattice_remove_request_type()
MeCabc::Lattice_remove_request_type() -> _wrap_Lattice_remove_request_type()
_wrap_Lattice_remove_request_type() -> MeCab::LatticeImpl::remove_request_type()
MeCab::LatticeImpl::remove_request_type() -> request_type_ &= ~request_type
MeCab::Lattice::set_sentence():
MeCab::Lattice::set_sentence() -> MeCabc::Lattice_set_sentence()
MeCabc::Lattice_set_sentence() -> _wrap_Lattice_set_sentence()
_wrap_Lattice_set_sentence() -> MeCab::LatticeImpl::set_sentence()
MeCab::LatticeImpl::set_sentence() -> MeCab::LatticeImpl::set_sentence()
MeCab::LatticeImpl::set_sentence() -> ...
MeCab::Lattice::bos_node():
MeCab::Lattice::bos_node() -> MeCabc::Lattice_bos_node()
MeCabc::Lattice_bos_node() -> _wrap_Lattice_bos_node()
_wrap_Lattice_bos_node() -> MeCab::LatticeImpl::bos_node()
MeCab::LatticeImpl::bos_node() -> return end_nodes_[0]
use strict;
use warnings;
use MeCab;
use Text::CSV;
use utf8;
use Encode;
binmode(STDOUT, 'encoding(UTF-8)');
my $csv = new Text::CSV({auto_diag => 1});
use subs ('describe_feature');
sub describe_lines {
my $lines = shift;
foreach my $line (split /\n/, $lines) {
my ($surface, $feature) = split /\t/, $line, 2;
print "($surface)\n";
next unless length $feature;
describe_feature $feature;
}
}
sub describe_feature {
my $feature = shift;
$csv->parse($feature) or die "failed to parse a feature\n";
my @features = $csv->fields;
printf " part of speech: (%s)\n", join ', ', @features[0..3];
printf " conjugation type: (%s)\n", $features[4];
printf " conjugated form: (%s)\n", $features[5];
printf " base form: (%s)\n", $features[6];
printf " reading: (%s)\n", $features[7];
printf " pronunciation: (%s)\n", $features[8];
}
my $m = new MeCab::Model();
# my $m = new MeCab::Model('-d /usr/local/lib/mecab/dic/jumandic');
# my $m = new MeCab::Model('-d ../unidic-cwj-202302');
# my $m = new MeCab::Model('-d ../unidic-csj-202302');
my $t = $m->createTagger or die "failed to create a tagger\n";
my $l = $m->createLattice or die "failed to create a lattice\n";
$l->set_sentence($ARGV[0]);
$t->parse($l) or die 'failed to parse a lattice: ' . $t->what() . "\n";
print '$l->toString: (', decode('UTF-8', $l->toString), ")\n";
describe_lines decode 'UTF-8', $l->toString;
for (my $n = $l->bos_node; $n; $n = $n->{next}) {
print '- iteration', "\n";
print '$n->{id}: ', $n->{id}, "\n";
if ($n->{stat} == $MeCab::MECAB_BOS_NODE) {
print "BOS\n";
} elsif ($n->{stat} == $MeCab::MECAB_EOS_NODE) {
print "EOS\n";
} else {
print '$n->{surface}: (', decode('UTF-8', $n->{surface}), ")\n";
print '$n->{length}: ', $n->{length}, "\n";
print '$n->{feature}: (', decode('UTF-8', $n->{feature}), ")\n";
describe_feature decode 'UTF-8', $n->{feature};
print '$n->{rcAttr}: ', $n->{rcAttr}, "\n";
print '$n->{lcAttr}: ', $n->{lcAttr}, "\n";
print '$n->{posid}: ', $n->{posid}, "\n";
print '$n->{char_type}: ', $n->{char_type}, "\n";
print '$n->{stat}: ', $n->{stat}, "\n";
print '$n->{isbest}: ', $n->{isbest}, "\n";
print '$n->{alpha}: ', $n->{alpha}, "\n";
print '$n->{beta}: ', $n->{beta}, "\n";
print '$n->{prob}: ', $n->{prob}, "\n";
print '$n->{cost}: ', $n->{cost}, "\n";
}
}
print "\n";
print "-- begin_nodes/end_nodes\n";
my $size = $l->size;
for (my $i = 0; $i <= $size; $i++) {
print "- i: $i\n";
for (my $b = $l->begin_nodes($i); $b; $b = $b->{bnext}) {
printf "B[%d]: (%s\t%s)\n", $i, decode('UTF-8', $b->{surface}), decode('UTF-8', $b->{feature});
describe_feature decode 'UTF-8', $b->{feature};
}
for (my $e = $l->end_nodes($i); $e; $e = $e->{enext}) {
printf "E[%d]: (%s\t%s)\n", $i, decode('UTF-8', $e->{surface}), decode('UTF-8', $e->{feature});
describe_feature decode 'UTF-8', $e->{feature};
}
}
print "\n";
print "-- best results\n";
$l->set_request_type($MeCab::MECAB_NBEST);
$l->set_sentence($ARGV[0]);
$t->parse($l) or die 'failed to parse a lattice: ' . $t->what(). "\n";
for (my $i = 0; $i < 10; $i++) {
print "- i: $i\n";
print '$l->toString: (', decode('UTF-8', $l->toString), ")\n";
describe_lines decode 'UTF-8', $l->toString;
last unless $l->next;
}
print "\n";
print "-- marginal probabilities\n";
$l->remove_request_type($MeCab::MECAB_NBEST);
$l->set_request_type($MeCab::MECAB_MARGINAL_PROB);
$l->set_sentence($ARGV[0]);
$t->parse($l) or die 'failed to parse a lattice: ' . $t->what() . "\n";
print '$l->theta: ', $l->theta, "\n";
for (my $n = $l->bos_node; $n; $n = $n->{next}) {
print "- iteration\n";
print '$n->{surface}: (', decode('UTF-8', $n->{surface}), ")\n";
print '$n->{length}: ', $n->{length}, "\n";
print '$n->{feature}: (', decode('UTF-8', $n->{feature}), ")\n";
describe_feature decode 'UTF-8', $n->{feature};
print '$n->{prob}: ', $n->{prob}, "\n";
}
print "\n";
print "-- dictionary info\n";
for (my $d = $m->dictionary_info; $d; $d = $d->{next}) {
print "- iteration\n";
print '$d->{filename}: (', $d->{filename}, ")\n";
print '$d->{charset}: (', $d->{charset}, ")\n";
print '$d->{size}: ', $d->{size}, "\n";
print '$d->{type}: ', $d->{type}, "\n";
print '$d->{lsize}: ', $d->{lsize}, "\n";
print '$d->{rsize}: ', $d->{rsize}, "\n";
print '$d->{version}: ', $d->{version}, "\n";
}
# print "\n";
# print "-- swap a model atomically\n";
# my $m2 = new MeCab::Model;
# $m->swap($m2); # causes SIGSEGV
$ perl c.pl 未然形
$l->toString: (未然 名詞,一般,*,*,*,*,未然,ミゼン,ミゼン
形 名詞,接尾,一般,*,*,*,形,ガタ,ガタ
EOS
)
(未然)
part of speech: (名詞, 一般, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (未然)
reading: (ミゼン)
pronunciation: (ミゼン)
(形)
part of speech: (名詞, 接尾, 一般, *)
conjugation type: (*)
conjugated form: (*)
base form: (形)
reading: (ガタ)
pronunciation: (ガタ)
(EOS)
- iteration
$n->{id}: 0
BOS
- iteration
$n->{id}: 4
$n->{surface}: (未然)
$n->{length}: 6
$n->{feature}: (名詞,一般,*,*,*,*,未然,ミゼン,ミゼン)
part of speech: (名詞, 一般, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (未然)
reading: (ミゼン)
pronunciation: (ミゼン)
$n->{rcAttr}: 1285
$n->{lcAttr}: 1285
$n->{posid}: 38
$n->{char_type}: 2
$n->{stat}: 0
$n->{isbest}: 1
$n->{alpha}: 0
$n->{beta}: 0
$n->{prob}: 0
$n->{cost}: 5336
- iteration
$n->{id}: 6
$n->{surface}: (形)
$n->{length}: 3
$n->{feature}: (名詞,接尾,一般,*,*,*,形,ガタ,ガタ)
part of speech: (名詞, 接尾, 一般, *)
conjugation type: (*)
conjugated form: (*)
base form: (形)
reading: (ガタ)
pronunciation: (ガタ)
$n->{rcAttr}: 1298
$n->{lcAttr}: 1298
$n->{posid}: 51
$n->{char_type}: 2
$n->{stat}: 0
$n->{isbest}: 1
$n->{alpha}: 0
$n->{beta}: 0
$n->{prob}: 0
$n->{cost}: 9495
- iteration
$n->{id}: 11
EOS
-- begin_nodes/end_nodes
- i: 0
B[0]: (未然 名詞,一般,*,*,*,*,未然,ミゼン,ミゼン)
part of speech: (名詞, 一般, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (未然)
reading: (ミゼン)
pronunciation: (ミゼン)
B[0]: (未 接頭詞,名詞接続,*,*,*,*,未,ミ,ミ)
part of speech: (接頭詞, 名詞接続, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (未)
reading: (ミ)
pronunciation: (ミ)
B[0]: (未 名詞,一般,*,*,*,*,未,ヒツジ,ヒツジ)
part of speech: (名詞, 一般, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (未)
reading: (ヒツジ)
pronunciation: (ヒツジ)
B[0]: (未 名詞,固有名詞,地域,一般,*,*,未,ヒツジ,ヒツジ)
part of speech: (名詞, 固有名詞, 地域, 一般)
conjugation type: (*)
conjugated form: (*)
base form: (未)
reading: (ヒツジ)
pronunciation: (ヒツジ)
E[0]: ( BOS/EOS,*,*,*,*,*,*,*,*)
part of speech: (BOS/EOS, *, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (*)
reading: (*)
pronunciation: (*)
- i: 1
- i: 2
- i: 3
B[3]: (然 副詞,一般,*,*,*,*,然,シカ,シカ)
part of speech: (副詞, 一般, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (然)
reading: (シカ)
pronunciation: (シカ)
E[3]: (未 名詞,固有名詞,地域,一般,*,*,未,ヒツジ,ヒツジ)
part of speech: (名詞, 固有名詞, 地域, 一般)
conjugation type: (*)
conjugated form: (*)
base form: (未)
reading: (ヒツジ)
pronunciation: (ヒツジ)
E[3]: (未 名詞,一般,*,*,*,*,未,ヒツジ,ヒツジ)
part of speech: (名詞, 一般, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (未)
reading: (ヒツジ)
pronunciation: (ヒツジ)
E[3]: (未 接頭詞,名詞接続,*,*,*,*,未,ミ,ミ)
part of speech: (接頭詞, 名詞接続, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (未)
reading: (ミ)
pronunciation: (ミ)
- i: 4
- i: 5
- i: 6
B[6]: (形 名詞,一般,*,*,*,*,形,ナリ,ナリ)
part of speech: (名詞, 一般, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (形)
reading: (ナリ)
pronunciation: (ナリ)
B[6]: (形 名詞,一般,*,*,*,*,形,カタ,カタ)
part of speech: (名詞, 一般, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (形)
reading: (カタ)
pronunciation: (カタ)
B[6]: (形 名詞,一般,*,*,*,*,形,カタチ,カタチ)
part of speech: (名詞, 一般, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (形)
reading: (カタチ)
pronunciation: (カタチ)
B[6]: (形 名詞,接尾,一般,*,*,*,形,ケイ,ケイ)
part of speech: (名詞, 接尾, 一般, *)
conjugation type: (*)
conjugated form: (*)
base form: (形)
reading: (ケイ)
pronunciation: (ケイ)
B[6]: (形 名詞,接尾,一般,*,*,*,形,ガタ,ガタ)
part of speech: (名詞, 接尾, 一般, *)
conjugation type: (*)
conjugated form: (*)
base form: (形)
reading: (ガタ)
pronunciation: (ガタ)
E[6]: (然 副詞,一般,*,*,*,*,然,シカ,シカ)
part of speech: (副詞, 一般, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (然)
reading: (シカ)
pronunciation: (シカ)
E[6]: (未然 名詞,一般,*,*,*,*,未然,ミゼン,ミゼン)
part of speech: (名詞, 一般, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (未然)
reading: (ミゼン)
pronunciation: (ミゼン)
- i: 7
- i: 8
- i: 9
B[9]: ( BOS/EOS,*,*,*,*,*,*,*,*)
part of speech: (BOS/EOS, *, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (*)
reading: (*)
pronunciation: (*)
E[9]: ( BOS/EOS,*,*,*,*,*,*,*,*)
part of speech: (BOS/EOS, *, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (*)
reading: (*)
pronunciation: (*)
E[9]: (形 名詞,接尾,一般,*,*,*,形,ガタ,ガタ)
part of speech: (名詞, 接尾, 一般, *)
conjugation type: (*)
conjugated form: (*)
base form: (形)
reading: (ガタ)
pronunciation: (ガタ)
E[9]: (形 名詞,接尾,一般,*,*,*,形,ケイ,ケイ)
part of speech: (名詞, 接尾, 一般, *)
conjugation type: (*)
conjugated form: (*)
base form: (形)
reading: (ケイ)
pronunciation: (ケイ)
E[9]: (形 名詞,一般,*,*,*,*,形,カタチ,カタチ)
part of speech: (名詞, 一般, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (形)
reading: (カタチ)
pronunciation: (カタチ)
E[9]: (形 名詞,一般,*,*,*,*,形,カタ,カタ)
part of speech: (名詞, 一般, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (形)
reading: (カタ)
pronunciation: (カタ)
E[9]: (形 名詞,一般,*,*,*,*,形,ナリ,ナリ)
part of speech: (名詞, 一般, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (形)
reading: (ナリ)
pronunciation: (ナリ)
-- best results
- i: 0
$l->toString: (未然 名詞,一般,*,*,*,*,未然,ミゼン,ミゼン
形 名詞,接尾,一般,*,*,*,形,ガタ,ガタ
EOS
)
(未然)
part of speech: (名詞, 一般, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (未然)
reading: (ミゼン)
pronunciation: (ミゼン)
(形)
part of speech: (名詞, 接尾, 一般, *)
conjugation type: (*)
conjugated form: (*)
base form: (形)
reading: (ガタ)
pronunciation: (ガタ)
(EOS)
- i: 1
$l->toString: (未然 名詞,一般,*,*,*,*,未然,ミゼン,ミゼン
形 名詞,接尾,一般,*,*,*,形,ガタ,ガタ
EOS
)
(未然)
part of speech: (名詞, 一般, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (未然)
reading: (ミゼン)
pronunciation: (ミゼン)
(形)
part of speech: (名詞, 接尾, 一般, *)
conjugation type: (*)
conjugated form: (*)
base form: (形)
reading: (ガタ)
pronunciation: (ガタ)
(EOS)
- i: 2
$l->toString: (未然 名詞,一般,*,*,*,*,未然,ミゼン,ミゼン
形 名詞,一般,*,*,*,*,形,カタチ,カタチ
EOS
)
(未然)
part of speech: (名詞, 一般, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (未然)
reading: (ミゼン)
pronunciation: (ミゼン)
(形)
part of speech: (名詞, 一般, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (形)
reading: (カタチ)
pronunciation: (カタチ)
(EOS)
- i: 3
$l->toString: (未然 名詞,一般,*,*,*,*,未然,ミゼン,ミゼン
形 名詞,接尾,一般,*,*,*,形,ケイ,ケイ
EOS
)
(未然)
part of speech: (名詞, 一般, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (未然)
reading: (ミゼン)
pronunciation: (ミゼン)
(形)
part of speech: (名詞, 接尾, 一般, *)
conjugation type: (*)
conjugated form: (*)
base form: (形)
reading: (ケイ)
pronunciation: (ケイ)
(EOS)
- i: 4
$l->toString: (未然 名詞,一般,*,*,*,*,未然,ミゼン,ミゼン
形 名詞,一般,*,*,*,*,形,ナリ,ナリ
EOS
)
(未然)
part of speech: (名詞, 一般, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (未然)
reading: (ミゼン)
pronunciation: (ミゼン)
(形)
part of speech: (名詞, 一般, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (形)
reading: (ナリ)
pronunciation: (ナリ)
(EOS)
- i: 5
$l->toString: (未然 名詞,一般,*,*,*,*,未然,ミゼン,ミゼン
形 名詞,一般,*,*,*,*,形,カタ,カタ
EOS
)
(未然)
part of speech: (名詞, 一般, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (未然)
reading: (ミゼン)
pronunciation: (ミゼン)
(形)
part of speech: (名詞, 一般, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (形)
reading: (カタ)
pronunciation: (カタ)
(EOS)
- i: 6
$l->toString: (未 接頭詞,名詞接続,*,*,*,*,未,ミ,ミ
然 副詞,一般,*,*,*,*,然,シカ,シカ
形 名詞,一般,*,*,*,*,形,カタチ,カタチ
EOS
)
(未)
part of speech: (接頭詞, 名詞接続, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (未)
reading: (ミ)
pronunciation: (ミ)
(然)
part of speech: (副詞, 一般, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (然)
reading: (シカ)
pronunciation: (シカ)
(形)
part of speech: (名詞, 一般, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (形)
reading: (カタチ)
pronunciation: (カタチ)
(EOS)
- i: 7
$l->toString: (未 名詞,一般,*,*,*,*,未,ヒツジ,ヒツジ
然 副詞,一般,*,*,*,*,然,シカ,シカ
形 名詞,一般,*,*,*,*,形,カタチ,カタチ
EOS
)
(未)
part of speech: (名詞, 一般, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (未)
reading: (ヒツジ)
pronunciation: (ヒツジ)
(然)
part of speech: (副詞, 一般, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (然)
reading: (シカ)
pronunciation: (シカ)
(形)
part of speech: (名詞, 一般, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (形)
reading: (カタチ)
pronunciation: (カタチ)
(EOS)
- i: 8
$l->toString: (未 接頭詞,名詞接続,*,*,*,*,未,ミ,ミ
然 副詞,一般,*,*,*,*,然,シカ,シカ
形 名詞,接尾,一般,*,*,*,形,ガタ,ガタ
EOS
)
(未)
part of speech: (接頭詞, 名詞接続, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (未)
reading: (ミ)
pronunciation: (ミ)
(然)
part of speech: (副詞, 一般, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (然)
reading: (シカ)
pronunciation: (シカ)
(形)
part of speech: (名詞, 接尾, 一般, *)
conjugation type: (*)
conjugated form: (*)
base form: (形)
reading: (ガタ)
pronunciation: (ガタ)
(EOS)
- i: 9
$l->toString: (未 接頭詞,名詞接続,*,*,*,*,未,ミ,ミ
然 副詞,一般,*,*,*,*,然,シカ,シカ
形 名詞,一般,*,*,*,*,形,ナリ,ナリ
EOS
)
(未)
part of speech: (接頭詞, 名詞接続, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (未)
reading: (ミ)
pronunciation: (ミ)
(然)
part of speech: (副詞, 一般, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (然)
reading: (シカ)
pronunciation: (シカ)
(形)
part of speech: (名詞, 一般, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (形)
reading: (ナリ)
pronunciation: (ナリ)
(EOS)
-- marginal probabilities
$l->theta: 0.75
- iteration
$n->{surface}: ()
$n->{length}: 0
$n->{feature}: (BOS/EOS,*,*,*,*,*,*,*,*)
part of speech: (BOS/EOS, *, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (*)
reading: (*)
pronunciation: (*)
$n->{prob}: 0
- iteration
$n->{surface}: (未然)
$n->{length}: 6
$n->{feature}: (名詞,一般,*,*,*,*,未然,ミゼン,ミゼン)
part of speech: (名詞, 一般, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (未然)
reading: (ミゼン)
pronunciation: (ミゼン)
$n->{prob}: 1
- iteration
$n->{surface}: (形)
$n->{length}: 3
$n->{feature}: (名詞,接尾,一般,*,*,*,形,ガタ,ガタ)
part of speech: (名詞, 接尾, 一般, *)
conjugation type: (*)
conjugated form: (*)
base form: (形)
reading: (ガタ)
pronunciation: (ガタ)
$n->{prob}: 1
- iteration
$n->{surface}: ()
$n->{length}: 0
$n->{feature}: (BOS/EOS,*,*,*,*,*,*,*,*)
part of speech: (BOS/EOS, *, *, *)
conjugation type: (*)
conjugated form: (*)
base form: (*)
reading: (*)
pronunciation: (*)
$n->{prob}: 1
-- dictionary info
- iteration
$d->{filename}: (/usr/local/lib/mecab/dic/ipadic/sys.dic)
$d->{charset}: (utf8)
$d->{size}: 392126
$d->{type}: 0
$d->{lsize}: 1316
$d->{rsize}: 1316
$d->{version}: 102