text analytics toolbox and MeCab

2 ビュー (過去 30 日間)
Shuichi Obuchi
Shuichi Obuchi 2019 年 12 月 25 日
コメント済み: Shuichi Obuchi 2020 年 3 月 10 日
I would like to add some words into MeCab dictionary that I suppose it is used behind Matlab textanalytics toolbox.
The tokenized procedure makes some words too short.
If you have any idea to solve my problem, it will be appricated.

回答 (1 件)

Christopher Creutzig
Christopher Creutzig 2020 年 3 月 9 日
Text Analytics Toolbox does not ship the tooling to compile an extended MeCab dictionary. But if you have one for your field (I know there are such compiled dictionaries for medical purposes, for example), you can use mecabOptions to have tokenizedDocument use it.
Alternatively, if you only have a handful of words you want to preserve, and are not worried about inflections, you can use "CustomTokens" to pass them to the tokenizer:
tokenizedDocument("日本睡眠学会のガイドライン")
ans =
tokenizedDocument:
5 tokens: 日本 睡眠 学会 の ガイドライン
tokenizedDocument("日本睡眠学会のガイドライン","CustomTokens","日本睡眠学会")
ans =
tokenizedDocument:
3 tokens: 日本睡眠学会 の ガイドライン
  1 件のコメント
Shuichi Obuchi
Shuichi Obuchi 2020 年 3 月 10 日
Thank you for your reply. I already solved the problem by using UserModel option. Anyway I am very happy to have your information.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeText Data Preparation についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by