ユーザ用ツール

サイト用ツール


korean:mecab:python

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン
前のリビジョン
korean:mecab:python [2021/11/14 22:48] – [準備] yoshikorean:mecab:python [2021/11/14 22:49] (現在) – [形態素解析の実行] yoshi
行 60: 行 60:
 <code python> <code python>
 import MeCab import MeCab
-from k2jamo import substitute_main+import k2jamo
 tokenizer = MeCab.Tagger('-d handic') tokenizer = MeCab.Tagger('-d handic')
 tokenizer.parse('') tokenizer.parse('')
行 67: 行 67:
 ===== 形態素解析の実行 ===== ===== 形態素解析の実行 =====
  
-''k2jamo.py''にある関数''substitute_main()''を使って字母に分解し,MeCabで解析します.+''k2jamo.py''にある関数''substitute()''を使って字母に分解し,MeCabで解析します.
  
 <code python> <code python>
 input = u'한상혁 방송통신위원장이 코로나19 확진 판정을 받으면서 김부겸 국무총리를 비롯한 국무위원들이 코로나 검사 대상이 됐다.' input = u'한상혁 방송통신위원장이 코로나19 확진 판정을 받으면서 김부겸 국무총리를 비롯한 국무위원들이 코로나 검사 대상이 됐다.'
 # 한겨레 2021年11月5日付け記事(https://www.khan.co.kr/politics/politics-general/article/202111050751001/)より # 한겨레 2021年11月5日付け記事(https://www.khan.co.kr/politics/politics-general/article/202111050751001/)より
-input = substitute_main(input)+input = k2jamo.substitute(input)
 print(tokenizer.parse(input)) print(tokenizer.parse(input))
 </code> </code>
korean/mecab/python.1636897714.txt.gz · 最終更新: 2021/11/14 22:48 by yoshi