"...resources/git@developer.sourcefind.cn:wangsen/mineru.git" did not exist on "4f340c442985c391fa0f59e2f8345b11e9ccae20"
Unverified Commit e29c3f1b authored by Paul O'Leary McCann's avatar Paul O'Leary McCann Committed by GitHub
Browse files

Add quotes to paths in MeCab arguments (#7142)

Without quotes directories with spaces in them will fail to be processed
correctly.
parent cb061e78
...@@ -249,7 +249,7 @@ class MecabTokenizer: ...@@ -249,7 +249,7 @@ class MecabTokenizer:
raise ValueError("Invalid mecab_dic is specified.") raise ValueError("Invalid mecab_dic is specified.")
mecabrc = os.path.join(dic_dir, "mecabrc") mecabrc = os.path.join(dic_dir, "mecabrc")
mecab_option = "-d {} -r {} ".format(dic_dir, mecabrc) + mecab_option mecab_option = '-d "{}" -r "{}" '.format(dic_dir, mecabrc) + mecab_option
self.mecab = fugashi.GenericTagger(mecab_option) self.mecab = fugashi.GenericTagger(mecab_option)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment