| dict_index | R Documentation |
dict_index compiles a user dictionary CSV file into a binary
dictionary that can be used with pos and posParallel.
dict_index(
dic_csv,
out_dic,
dic_dir,
dic_charset = "utf-8",
out_charset = "utf-8"
)
dic_csv |
Character scalar. Path to the user dictionary CSV file(s). Multiple CSV files can be provided as a character vector. |
out_dic |
Character scalar. Path for the output compiled dictionary file. |
dic_dir |
Character scalar. Path to the system dictionary directory. This is required so that MeCab can reference the system dictionary configuration during compilation. |
dic_charset |
Character scalar. Charset of the input CSV file.
Default is |
out_charset |
Character scalar. Charset of the output dictionary.
Default is |
This function wraps MeCab's mecab-dict-index internally, so you
do not need the command-line tool installed separately.
Invisible TRUE on success.
## Not run:
dict_index(
dic_csv = "user_words.csv",
out_dic = "user.dic",
dic_dir = "/usr/local/lib/mecab/dic/ipadic"
)
# Then use the compiled dictionary:
pos("some text", user_dic = "user.dic")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.