mdxbuilder打包mdx时的常见错误

首先确保

data.txt的换行字符(Newline Character)是CR+TF(Windows)

Encoding是UTF-8 without Signature

如果不按这个标准来,很容易出现词条数目对不上。

 

 

下面正式进行troubleshooting:

 1.Invalid keyword at position

这是最常见的问题之一,可以使用谷歌搜索:

site:pdawiki.com Invalid keyword at position:

 

Begining loading source file...
Content is longer then 8388608 at position: 0 of the source file
Failed to load source file, process cancelled
Begining loading source file...
Invalid keyword at position: 155387606 of the source file
Failed to load source file, process cancelled
Begining loading source file...
Invalid keyword at position: 155387606 of the source file
Failed to load source file, process cancelled

 

可能是某个词头缺失,导致</>的上一行,是空行。

可以在sublime text中打开文件,使用正则搜索搜索:

^\s\n

把词头添加上去即可。

 

如果想要精确定位到position: 155387606 

可以在notepad++中打开文件,然后在Search > Go To(或者直接快捷方式:Ctrl + G),在弹出的面板中,选择Offset,把155387606输入,按OK,即可定位。

参照:https://www.pdawiki.com/forum/forum.php?mod=redirect&goto=findpost&ptid=29944&pid=829673

 

Begining loading source file...

Done
Time used for this section: 2 seconds
Sorting dictionary...
Done!
Begin processing index...
Done!
Original index size = 1607KB, compressed size = 630KB, compression ratio = 39%
Time used for this section: 0 seconds
Begin processing data contents...
Done!
Original text size = 385953KB, compressed size = 46816KB, compression ratio = 12%
Time used for this section: 10 seconds
Number of entries: 91531
Conversion succeed!

 

posted @ 2024-07-07 17:51  profesor  阅读(1)  评论(0编辑  收藏  举报