Juman::Sexp(3pm) | User Contributed Perl Documentation | Juman::Sexp(3pm) |
Juman::Sexp - S式を読み込むモジュール
use Data::Dumper; use Juman::Sexp qw/ parse /; print &Dumper( &parse( file => "Noun.dic" ) );
"Juman::Sexp" は,Juman 辞書や設定ファイルに用いられているS式を読み込 むための関数 "parse" を定義している.
Example: &parse( file => "example.dat", comment => undef );
例えば,文字列を対象として解析する場合は,以下のように指定する.
Example: &parse( string => "(名詞 (普通名詞 ((読み かめ)(見出し語 亀 かめ カメ))))" );
この場合,次のような解析結果が返される.
( [ '名詞', [ '普通名詞', [ [ '読み', 'かめ' ], [ '見出し語', '亀', 'かめ', 'カメ' ] ] ] ] )
利用及び再配布については GPL2 または Artistic License に従ってください。
Hey! The above document had some coding errors, which are explained below:
2022-09-03 | perl v5.34.0 |