GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Text::MeCab::Dict(3) User Contributed Perl Documentation Text::MeCab::Dict(3)

Text::MeCab::Dict - Utility To Work With MeCab Dictionary

  use Text::MeCab::Dict;

  my $dict = Text::MeCab::Dict->new(
    dict_source => "/path/to/mecab-ipadic-source"
  );
  $dict->add(
    surface      => $surface,        # 表層形
    left_id      => $left_id,        # 左文脈ID
    right_id     => $right_id,       # 右文脈ID
    cost         => $cost,           # コスト
    pos          => $part_of_speech, # 品詞
    category1    => $category1,      # 品詞細分類1
    category2    => $category2,      # 品詞細分類2
    category3    => $category3,      # 品詞細分類3

    # XXX this below two parameter names need blessing from a knowing
    # expert, and is subject to change
    inflect      => $inflect,        # 活用形
    inflect_type => $inflect_type,   # 活用型

    original     => $original,       # 原形
    yomi         => $yomi,           # 読み
    pronounce    => $pronounce,      # 発音
    extra        => \@extras,        # ユーザー設定
  );
  $dict->write('foo.csv');
  $dict->build();

Creates a new instance of Text::MeCab::Dict.

The path to the source of mecab-ipadic is required:

  my $dict = Text::MeCab::Dict->new(
    dict_source => "/path/to/mecab-ipadic-source"
  );

If you are in an environment where mecab-config is NOT available, you must also specify libexecdir, which is where mecab-dict-index is installed:

  my $dict = Text::MeCab::Dict->new(
    dict_source => "/path/to/mecab-ipadic-source",
    libexecdir  => "/path/to/mecab/libexec/",
  );

Adds a new entry to be appended to the dictionary. Please see SYNOPSIS for arguments.

Writes out the entries that were added via add() to the specified file location. If the file name does not look like an absolute path, the name will be treated relatively from dict_source

Rebuilds the index. This usually requires that you are have root privileges

http://mecab.sourceforge.net/dic.html
2010-05-10 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.