tmstring.words
code:Lua
tbl = textmodule.tmstring.words(str)
モジュール
引数
table:_
変数 型 概要
1 str string 解析する文字列
返り値
table:_
変数 型 概要
1 tbl table 単語をそれぞれ格納したテーブル
概要
MeCabを利用した形態素解析の結果をもとに、strを単語ごとに分割し、それぞれをテーブルに格納して返す。 例
code:Lua
require("textmodule")
tbl = textmodule.tmstring.words("このステーキは非常に美味である。")
debug_print(tbl1) -- "この" debug_print(tbl2) -- "ステーキ" debug_print(tbl4) -- "非常" debug_print(tbl6) -- "美味" debug_print(tbl8) -- "ある"