在使用paoding分词的时候。出现了错误,please set a system env PAODING_DIC_HOME or Config paoding.dic.home in paoding-dic-home.properties point to the
dictionaries!
这是由于在老版本号的PaodingMaker.getFile()方法中採用的是老版本号的java.net.URL.getFile(),不可以识别中文或者空格。须要改动源码又一次打包。仅仅有採用URL.toRUL().getPath()才干识别汉字与空格。
这部分是自己加的代码
//这部分代码是自己加入的,主要是解决路径中不能有空格的问题
File dicHomeFile2 = getFile(dicHome);
String path = "";
try{
path = URLDecoder.decode(dicHomeFile2.getPath(),"UTF-8");
}catch(UnsupportedEncodingException e){
e.printStackTrace();
}
File dicHomeFile = new File(path);