TermExtract::ICTCLAS(3)

NAME
    TermExtract::ICTCLAS
                -- ŒŸéTÓÃÕZ³é³ö¥â¥¸¥å©`¥ë£¨"ICTCLAS"°æ)

SYNOPSIS
    use TermExtract::ICTCLAS;

DESCRIPTION
    ÈëÁ¦¥Æ¥­¥¹¥È¤ò¡¢"ICTCLAS"£¨ÖÐÎÄ¤ÎÆ·Ô~¥¿¥°¸¶Óë¥×¥í¥°¥é¥à£©¤Ë¤«
  ¤±¡¢¤½¤Î½Y¹û¤ò¤â¤È¤ËÈëÁ¦¥Æ¥­¥¹¥È¤«¤éŒŸéTÓÃÕZ¤ò³é³ö¤¹¤ë¥×¥í¥°¥é¥à¡£

    µ±¥â¥¸¥å©`¥ë¤ÎÊ¹ÓÃ·¨¤Ë¤Ä¤¤¤Æ¤Ï¡¢ÓH¥¯¥é¥¹£¨TermExtract::Calc_Imp)¤«¡¢
  ÒÔÏÂ¤Î¥µ¥ó¥×¥ë¥¹¥¯¥ê¥×¥È¤ò²ÎÕÕ¤Î¤³¤È¡£

  Sample Script
 #!/opt/local/bin/perl5.34 -w

 #
 #  ex_ICT.pl
 #
 #¡¡¥Õ¥¡¥¤¥ë¤«¤é ICTCLAS ¤Î„IÀí½Y¹û¤òÕi¤ßÈ¡¤ê
 #  ˜ËœÊ³öÁ¦¤ËŒŸéTÓÃÕZ¤È¤½¤ÎÖØÒª¶È¤ò·µ¤¹¥×¥í¥°¥é¥à
 #
 #   version 0.07
 #
 #

 use TermExtract::ICTCLAS;
 #use strict;
 my $data = new TermExtract::ICTCLAS;
 my $InputFile = "ICT_out.txt";    # ÈëÁ¦¥Õ¥¡¥¤¥ëÖ¸¶¨

 # ¥×¥í¥»¥¹¤Î®�³£½KÁË•r„IÀí
 # (¥í¥Ã¥¯¥Ç¥£¥ì¥¯¥È¥ê¤òÊ¹ÓÃ¤·¤¿ˆöºÏ¤Î¤ß£©
 $SIG{INT} = $SIG{QUIT} = $SIG{TERM} = 'sigexit';

 # ³öÁ¦¥â©`¥É¤òÖ¸¶¨
 # 1 ¡ú ŒŸéTÓÃÕZ£«ÖØÒª¶È¡¢2 ¡ú ŒŸéTÓÃÕZ¤Î¤ß
 # 3 ¡ú ¥«¥ó¥ÞÇøÇÐ¤ê
 my $output_mode = 1;

 #
 # ÖØÒª¶ÈÓ‹Ëã¤Ç¡¢ßB½ÓÕZ¤Î"ÑÓ¤ÙÊý"¡¢"®�¤Ê¤êÊý"¡¢"¥Ñ©`¥×¥ì¥­¥·¥Æ¥£"¤Î¤¤
 # ¤º¤ì¤ò¤È¤ë¤«ßx’k¡£¥Ñ©`¥×¥ì¥­¥·¥Æ¥£¤Ï¡¸Ñ§Á•™CÄÜ¡¹¤òÊ¹¤¨¤Ê¤¤
 # ¤Þ¤¿¡¢"ßB½ÓÕZ¤ÎÇéˆó¤òÊ¹¤ï¤Ê¤¤"ßx’k¤â¤¢¤ê¡¢¤³¤ÎˆöºÏ¤ÏÓÃÕZ³ö¬F»ØÊý
 # (¤ÈÔO¶¨¤µ¤ì¤Æ¤¤¤ì¤ÐIDF¤Î½M¤ßºÏ¤ï¤»£©¤ÇÖØÒª¶ÈÓ‹Ëã¤òÐÐ¤¦
 # £¨¥Ç¥Õ¥©¥ë¥È¤Ï"ÑÓ¤ÙÊý"¤ò¤È¤ë $obj->use_total)
 #
 #$data->use_total;      # ÑÓ¤ÙÊý¤ò¤È¤ë
 #$data->use_uniq;       # ®�¤Ê¤êÊý¤ò¤È¤ë
 #$data->use_Perplexity; # ¥Ñ©`¥×¥ì¥­¥·¥Æ¥£¤ò¤È¤ë(TermExtract 3.04 ÒÔÉÏ)
 #$data->no_LR;          # ëO½ÓÇéˆó¤òÊ¹¤ï¤Ê¤¤ (TermExtract 4.02 ÒÔÉÏ)

 #
 # ÖØÒª¶ÈÓ‹Ëã¤Ç¡¢ßB½ÓÇéˆó¤Ë’ì¤±ºÏ¤ï¤»¤ëÓÃÕZ³ö¬Fîl¶ÈÇéˆó¤òßx’k¤¹¤ë
 # $data->no_LR; ¤È¤Î½M¤ßºÏ¤ï¤»¤ÇÓÃÕZ³ö¬Fîl¶È¤Î¤ß¤ÎÖØÒª¶È¤âËã³ö¿ÉÄÜ
 # £¨¥Ç¥Õ¥©¥ë¥È¤Ï "Frequency" $data->use_frq)
 # TF¤Ï¤¢¤ëÓÃÕZ¤¬Ëû¤ÎÓÃÕZ¤ÎÒ»²¿¤ËÊ¹¤ï¤ì¤Æ¤¤¤¿ˆöºÏ¤Ë¤â¥«¥¦¥ó¥È
 # Frequency ¤ÏÓÃÕZ¤¬Ëû¤ÎÓÃÕZ¤ÎÒ»²¿¤ËÊ¹¤ï¤ì¤Æ¤¤¤¿ˆöºÏ¤Ë¥«¥¦¥ó¥È¤·¤Ê¤¤
 #
 #$data->use_TF;   # TF (Term Frequency) (TermExtract 4.02 ÒÔÉÏ)
 #$data->use_frq;  # Frequency¤Ë¤è¤ëÓÃÕZîl¶È
 #$data->no_frq;   # îl¶ÈÇéˆó¤òÊ¹¤ï¤Ê¤¤

 #
 # ÖØÒª¶ÈÓ‹Ëã¤Ç¡¢Ñ§Á•™CÄÜ¤òÊ¹¤¦¤«¤É¤¦¤«ßx’k
 # £¨¥Ç¥Õ¥©¥ë¥È¤Ï¡¢Ê¹ÓÃ¤·¤Ê¤¤ $obj->no_stat)
 #
 #$data->use_stat; # Ñ§Á•™CÄÜ¤òÊ¹¤¦
 #$data->no_stat;  # Ñ§Á•™CÄÜ¤òÊ¹¤ï¤Ê¤¤

 #
 # ÖØÒª¶ÈÓ‹Ëã¤Ç¡¢¡¸¥É¥­¥å¥á¥ó¥ÈÖÐ¤ÎÓÃÕZ¤Îîl¶È¡¹¤È¡¸ßB½ÓÕZ¤ÎÖØÒª¶È¡¹
 # ¤Î¤É¤Á¤é¤Ë±ÈÖØ¤ò¤ª¤¯¤«¤òÔO¶¨¤¹¤ë¡£
 # ¥Ç¥Õ¥©¥ë¥È‚Ž¤Ï£±
 # ‚Ž¤¬´ó¤­¤¤¤Û¤É¡¸¥É¥­¥å¥á¥ó¥ÈÖÐ¤ÎÓÃÕZ¤Îîl¶È¡¹¤Î±ÈÖØ¤¬¸ß¤Þ¤ë
 #
 #$data->average_rate(0.5);

 #
 # Ñ§Á•™CÄÜÓÃDB¤Ë¥Ç©`¥¿¤òÐî·e¤¹¤ë¤«¤É¤¦¤«ßx’k
 # ÖØÒª¶ÈÓ‹Ëã¤Ç¡¢Ñ§Á•™CÄÜ¤òÊ¹¤¦¤È¤­¤Ï¡¢¥»¥Ã¥È¤·¤Æ¤ª¤¤¤¿¤Û¤¦¤¬
 # Ÿoëy¡£„IÀíŒ�Ïó¤ËÑ§Á•™CÄÜÓÃDB¤ËµÇåh¤µ¤ì¤Æ¤¤¤Ê¤¤ÕZ¤¬º¬¤Þ¤ì¤ë
 # ¤ÈÕý¤·¤¯„Ó×÷¤·¤Ê¤¤¡£
 # £¨¥Ç¥Õ¥©¥ë¥È¤Ï¡¢Ðî·e¤·¤Ê¤¤ $obj->no_storage£©
 #
 #$data->use_storage; # Ðî·e¤¹¤ë
 #$data->no_storage;  # Ðî·e¤·¤Ê¤¤

 #
 # Ñ§Á•™CÄÜÓÃDB¤ËÊ¹ÓÃ¤¹¤ëDBM¤òSDBM_File¤ËÖ¸¶¨
 # £¨¥Ç¥Õ¥©¥ë¥È¤Ï¡¢DB_File¤ÎBTREE¥â©`¥É£©
 #
 #$data->use_SDBM;

 #
 # ß^È¥¤Î¥É¥­¥å¥á¥ó¥È¤ÎÀÛ·e½yÓ‹¤òÊ¹¤¦ˆöºÏ¤Î¥Ç©`¥¿¥Ù©`¥¹¤Î
 # ¥Õ¥¡¥¤¥ëÃû¤ò¥»¥Ã¥È
 # £¨¥Ç¥Õ¥©¥ë¥È¤Ï "stat.db"¤È"comb.db"£©
 #
 $data->stat_db("statICT.db");
 $data->comb_db("combICT.db");

 #
 # ¥Ç©`¥¿¥Ù©`¥¹¤ÎÅÅËû¥í¥Ã¥¯¤Î¤¿¤á¤ÎÒ»•r¥Ç¥£¥ì¥¯¥È¥ê¤òÖ¸¶¨
 # ¥Ç¥£¥ì¥¯¥È¥êÃû¤¬¿ÕÎÄ×ÖÁÐ£¨¥Ç¥Õ¥©¥ë¥È£©¤ÎˆöºÏ¤Ï¥í¥Ã¥¯¤·¤Ê¤¤
 #
 #$data->lock_dir("lock_dir");

 #
 # Æ·Ô~¥¿¥°¸¶¤±œg¤ß¤Î¥Æ¥­¥¹¥È¤«¤é¡¢¥Ç©`¥¿¤òÕi¤ßÞz¤ß
 # ŒŸéTÓÃÕZ¥ê¥¹¥È¤òÅäÁÐ¤Ë·µ¤¹
 # £¨ÀÛ·e½yÓ‹DBÊ¹ÓÃ¡¢¥É¥­¥å¥á¥ó¥ÈÖÐ¤Îîl¶ÈÊ¹ÓÃ¤Ë¥»¥Ã¥È£©
 #
 #my @noun_list = $data->get_imp_word($str, 'var');     # ÈëÁ¦¤¬‰äÊý
 my @noun_list = $data->get_imp_word($InputFile); # ÈëÁ¦¤¬¥Õ¥¡¥¤¥ë

 #
 # Ç°»ØÕi¤ßÞz¤ó¤ÀÆ·Ô~¥¿¥°¸¶¤±œg¤ß¥Æ¥­¥¹¥È¥Õ¥¡¥¤¥ë¤òÔª¤Ë
 # ¥â©`¥É¤ò‰ä¤¨¤Æ¡¢ŒŸéTÓÃÕZ¥ê¥¹¥È¤òÅäÁÐ¤Ë·µ¤¹
 #$data->use_stat->no_frq;
 #my @noun_list2 = $data->get_imp_word();
 # ¤Þ¤¿¡¢¤½¤Î½Y¹û¤ò„e¤Î¥â©`¥É¤Ë¤è¤ë½Y¹û¤È’ì¤±ºÏ¤ï¤»¤ë
 #@noun_list = $data->result_filter (\@noun_list, \@noun_list2, 30, 1000);

 #
 #  ŒŸéTÓÃÕZ¥ê¥¹¥È¤ÈÓ‹Ëã¤·¤¿ÖØÒª¶È¤ò˜ËœÊ³öÁ¦¤Ë³ö¤¹
 #
 foreach (@noun_list) {
    # Êý‚Ž¤Î¤ß¤Ï±íÊ¾¤·¤Ê¤¤
    next if $_->[0] =~ /^\d+$/;
    # 1ÎÄ×Ö(GB)¤Î¤ß¤Ï±íÊ¾¤·¤Ê¤¤
    next if $_->[0] =~ /^[\x00-\x7F]$/;
    next if $_->[0] =~ /^[\x81-\xFE][\x40-\xFE]$/;
    next if $_->[0] =~ /^[\x81-\xEF][\x30-\x39][\x81-\xEF][\x30-\x39]$/;

    # ½Y¹û±íÊ¾
    printf "%-60s %16.2f\n", $_->[0], $_->[1] if $output_mode == 1;
    printf "%s\n",           $_->[0]          if $output_mode == 2;
    printf "%s,",            $_->[0]          if $output_mode == 3;
 }

Methods
    ¤³¤Î¥â¥¸¥å©`¥ë¤Ç¤Ï¡¢get_imp_word ¤Î¤ßŒg×°¤·¡¢¤½¤ìÒÔÍâ¤Î¥á¥½¥Ã¥É¤ÏÓH
  ¥â¥¸¥å©`¥ë TermExtract::Calc_Imp ¤ÇŒg×°¤µ¤ì¤Æ¤¤¤ë¡£
    get_imp_word ¤ÏÆ·Ô~¥¿¥°¸¶Óë¤òÐÐ¤¤³é³ö¤µ¤ì¤¿…gÕZ¤ò¡¢‚€¡©¤Î…gÕZ¤ÎÕZí˜
  ¤ÈÆ·Ô~Çéˆó¤òÔª¤ËÑ}ºÏÕZ¤ËÉú³É¤·¤Æ¤¤¤ë¡£¤½¤ìÒÔÍâ¤Î¥á¥½¥Ã¥É¤Ë¤Ä¤¤¤Æ¤Ï¡¢
  TermExtract::Calc_Imp ¤ÎPOD¥É¥­¥å¥á¥ó¥È¤ò²ÎÕÕ¤¹¤ë¤³¤È¡£

  get_imp_word
    ÖÐÎÄ¤ÎÆ·Ô~¥¿¥°¸¶Óë½Y¹û¤ò´Î¤Î¥ë©`¥ë¤Ë¤è¤êÑ}ºÏÕZ¤ËÉú³É¤¹¤ë¡£µÚ£±ÒýÊý¤Ï¡¢
  „IÀíŒ�Ïó¤Î¥Ç©`¥¿¡¢µÚ£²ÒýÊý¤ÏµÚ£±ÒýÊý¤Î·N„e¤Ç¤¢¤ë¡£¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢µÚ£±
  ÒýÊý¤Ï¡¢Æ·Ô~¥¿¥°¸¶¤±œg¤ß¤Î¥Æ¥­¥¹¥È¥Õ¥¡¥¤¥ë¤È¤Ê¤ë¡£µÚ£²ÒýÊý¤ËÎÄ×ÖÁÐ
  'var'¤¬¥»¥Ã¥È¤µ¤ì¤¿¤È¤­¤Ë¤Ï¡¢µÚÒ»ÒýÊý¤òÆ·Ô~¥¿¥°¸¶¤±œg¤Î¥Æ¥­¥¹¥È¥Ç©`¥¿
  ¤¬Èë¤Ã¤¿¥¹¥«¥é©`‰äÊý¤È½âá‹¤¹¤ë¡£

    £±£®¸÷Æ·Ô~¤Ï´Î¤Î¤È¤ª¤ê½YºÏ¤¹¤ë
       £¨£±£©ÃûÔ~¤Ëî�¤¹¤ëÕZ(ng n nr ns nt nz nx vn an i j) *ÒÔáá¡¸ÃûÔ~¡¹
           ¡ú¡¡ÃûÔ~¡¢ÐÎÈÝÔ~¡¢ÖúÔ~¡¢ºó½Ó³É·Ö¡¢ßBÔ~£¨ºÍ¡¢Óë£©¤Ë½YºÏ¤¹¤ë¡£
             Ñ}ºÏÕZ¤ÎÏÈî^¤Ë¤Ê¤ë¡£
       £¨£²£©ÐÎÈÝÔ~(ag, a)
           ¡ú¡¡ÐÎÈÝÔ~¡¢ÖúÔ~¡¢ºó½Ó³É·Ö¡¢ßBÔ~£¨ºÍ¡¢Óë£©¤Ë½YºÏ¤¹¤ë¡£Ñ}ºÏÕZ¤Î
             ÏÈî^¤Ë¤Ê¤ë
       £¨£³£©ÖúÔ~(u), ºó½Ó³É·Ö(k)
          ¡ú¡¡ÃûÔ~¡¢ÐÎÈÝÔ~¤Ë½YºÏ¤¹¤ë
       £¨£´£©ßBÔ~(c)
          ¡ú¡¡ºÍ,Óë¤ÎˆöºÏ¤Î¤ß¡£ÃûÔ~¤Ë½YºÏ¤¹¤ë¡£
       £¨£µ£©Çø„eÔ~(b)
           ¡ú¡¡ÃûÔ~, ÖúÔ~¡¢ßBÔ~£¨ºÍ¡¢Óë£©¤Ë½YºÏ¤¹¤ë¡£Ñ}ºÏÕZ¤ÎÏÈî^¤Ë¤Ê¤ë

    £²£®¸ÄÐÐ¤¬¤¢¤Ã¤¿ˆöºÏ¤Ï¡¢¤½¤³¤ÇÑ}ºÏÕZ¤ÎÇøÇÐ¤ê¤È¤¹¤ë

    £³£®ÕZî^¤ÎÈ«½Ç¥¹¥Ú©`¥¹¤ÏÈ¡¤ê³ý¤¯

  ¡¡£´£®´Î¤ÎÓ›ºÅ¤äÊý‚Ž¤ÇÊ¼¤Þ¤ëÕZ¤ÎˆöºÏ¤Ï¡¢¤½¤³¤ÇÑ}ºÏÕZ¤ÎÇøÇÐ¤ê¤È¤¹¤ë
        +-%\&\$*#^|<>;:

    £µ£®Ñ}ºÏÕZ¤ÏÃûÔ~¤Ç½K¤ï¤ë¤â¤Î¤È¤·¡¢ÒÔáá¤ÏÇÐ¤ê’Î¤Æ¤ë

    £¶£®ÖØÒª¶ÈÓ‹Ëã¤Ë¤ª¤¤¤Æ´Î¤ÎÕZ£¨ÖúÔ~£«áá½ÓÔ~£«ßBÔ~£©¤ÏŸoÒ•¤¹¤ë
      ºÍ Óë µÄ Ö® µÈ ÐÍ Ê½ ÐÔ

SEE ALSO
    TermExtract::Calc_Imp
    TermExtract::Chasen
    TermExtract::MeCab
    TermExtract::BrillsTagger
    TermExtract::EnglishPlainText
    TermExtract::ChainesPlainTextUC
    TermExtract::ChainesPlainTextGB
    TermExtract::JapanesePlainTextEUC
    TermExtract::JapanesePlainTextSJIS

COPYRIGHT
    ¤³¤Î¥×¥í¥°¥é¥à¤Ï¡¢–|¾©´óÑ§ ÖÐ´¨Ô£Ö¾½ÌÊÚ¤ÎÖÐÎÄŒŸéTÓÃÕZ³é³ö¤Î¥¢¥¤¥Ç¥¢
¡¡¤òÔª¤Ë¡¢–|¾©´óÑ§ Ç°ÌïÀÊ (maeda@lib.u-tokyo.ac.jp)¤¬×÷³É¤·¤¿¤â¤Î¤Ç¤¢¤ë¡£
¡¡¡¡ÊË˜”¤Î¥Á¥§¥Ã¥¯¤Ï¡¢–|¾©´óÑ§ Ð¡�uºÆÖ®(kojime@e.u-tokyo.ac.jp)¤¬ÐÐ¤Ã¤¿¡£

    ¤Ê¤ª¡¢±¾¥×¥í¥°¥é¥à¤ÎÊ¹ÓÃ¤Ë¤ª¤¤¤ÆÉú¤¸¤¿¤¤¤«¤Ê¤ë½Y¹û¤Ëév¤·¤Æ¤âµ±·½¤Ç¤Ï
  Ò»ÇÐØŸÈÎ¤òØ“¤ï¤Ê¤¤¡£

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

Around line 168:
    Non-ASCII character seen before =encoding in 'ŒŸéTÓÃÕZ³é³ö¥â¥¸¥å©`¥ë£¨"ICTCLAS"°æ)'. Assuming CP1252