(linenum→info "unix/slp.c:2238")

NOKUBI Takatsugu

Bio:Debian developer
URL:http://www.daionet.gr.jp/~knok/trac
Location:日本、東京

2008-02-28

anthy/9100e/src-splitter/splitter.c:276-323

  276: int
  277: anthy_init_splitter(void)
  278: {
  279:   /* デバッグプリントの設定 */
  280:   char *en = getenv("ANTHY_ENABLE_DEBUG_PRINT");
  281:   char *dis = getenv("ANTHY_DISABLE_DEBUG_PRINT");
  282:   splitter_debug_flags = SPLITTER_DEBUG_NONE;
  283:   if (!dis && en && strlen(en)) {
  284:     char *fs = getenv("ANTHY_SPLITTER_PRINT");
  285:     if (fs) {
  286:       if (strchr(fs, 'w')) {
  287:         splitter_debug_flags |= SPLITTER_DEBUG_WL;
  288:       }
  289:       if (strchr(fs, 'm')) {
  290:         splitter_debug_flags |= SPLITTER_DEBUG_MW;
  291:       }
  292:       if (strchr(fs, 'l')) {
  293:         splitter_debug_flags |= SPLITTER_DEBUG_LN;
  294:       }
  295:       if (strchr(fs, 'i')) {
  296:         splitter_debug_flags |= SPLITTER_DEBUG_ID;
  297:       }
  298:       if (strchr(fs, 'c')) {
  299:         splitter_debug_flags |= SPLITTER_DEBUG_CAND;
  300:       }
  301:     }
  302:   }
  303:   /* 付属語グラフの初期化 */
  304:   if (anthy_init_depword_tab()) {
  305:     anthy_log(0, "Failed to init dependent word table.\n");
  306:     return -1;
  307:   }
  308:   /**/
  309:   anthy_wtype_noun = anthy_init_wtype_by_name("名詞35");
  310:   anthy_wtype_name_noun = anthy_init_wtype_by_name("人名");
  311:   anthy_wtype_num_noun = anthy_init_wtype_by_name("数詞");
  312:   anthy_wtype_a_tail_of_v_renyou = anthy_init_wtype_by_name("形容詞化接尾語");
  313:   anthy_wtype_v_renyou = anthy_init_wtype_by_name("動詞連用形");
  314:   anthy_wtype_noun_tail = anthy_init_wtype_by_name("名詞化接尾語");
  315:   anthy_wtype_prefix = anthy_init_wtype_by_name("名詞接頭辞");
  316:   anthy_wtype_num_prefix = anthy_init_wtype_by_name("数接頭辞");
  317:   anthy_wtype_num_postfix = anthy_init_wtype_by_name("数接尾辞");
  318:   anthy_wtype_name_postfix = anthy_init_wtype_by_name("人名接尾辞");
  319:   anthy_wtype_sv_postfix = anthy_init_wtype_by_name("サ変接尾辞");
  320:   anthy_wtype_n1 = anthy_init_wtype_by_name("数詞1");
  321:   anthy_wtype_n10 = anthy_init_wtype_by_name("数詞10");
  322:   return 0;
  323: }

splitterサブシステムの初期化