Juman::Sexp(3pm)

Juman::Sexp3pm

S式を読み込むモジュール

Usage

 use Data::Dumper;
 use Juman::Sexp qw/ parse /;
 print &Dumper( &parse( file => "Noun.dic" ) );

Overview

"Juman::Sexp" は,Juman 辞書や設定ファイルに用いられているS式を読み込 むための関数 "parse" を定義している.

Functions

parse

指定された対象を,S式として解析する関数.以下のオプションを受け付ける.

file => FILE

解析するファイルを指定する.

string => STRING

解析する文字列を指定する.

comment => STRING

コメント開始文字列を指定する.コメントをまったく含まない対象を解析する 場合は,以下のように未定義値を指定する.

  Example:
    &parse( file => "example.dat", comment => undef );
debug => BOOLEAN

デバッグ用の情報を出力するように指示する.

例えば,文字列を対象として解析する場合は,以下のように指定する.

  Example:
    &parse( string =>
            "(名詞 (普通名詞 ((読み かめ)(見出し語 亀 かめ カメ))))" );

この場合,次のような解析結果が返される.

    ( [ '名詞',
         [ '普通名詞',
           [ [ '読み', 'かめ' ],
             [ '見出し語', '亀', 'かめ', 'カメ' ]
           ]
         ]
       ] )

Pod errors

Hey! The above document had some coding errors, which are explained below:

Around line 12:

Non-ASCII character seen before =encoding in 'S式を読み込むモジュール'. Assuming UTF-8

Releases

5 releases since Debian 8 (Jessie); the text changed 3 times.

  1. 8
  2. 9–10
  3. 12
  4. 13

Author

TSUCHIYA Masatoshi <[email protected]>

From libjuman-perl 7.0-3.9 in Debian 13 (Trixie). Parsed by carta from the page's man source.