When IKAnalyzer runs in the idea configuration, Main Dictionary not found !!!, Ideaclassnotfound
After the IKAnalyzer source code is downloaded, the Main Dictionary not found is displayed after the configuration is run !!! Exception
After I followed in, I found that org/wltea/analyzer/dic/main2012.dic was not found in the configuration file. I found that the main2012.dic file was not found in the build directory generated by idea.
After I manually put this file into the dic directory, it works. After a query, I found a solution.
Project Structure-> Modules point + on the right side, select 1, point to the resource Directory, select Classes, and click OK
After the above configuration, you only need to put the resource file required by IKAnalyzer into the resource root directory and modify the path configured in the source code as follows:
// Private static final String PATH_DIC_MAIN = "org/wltea/analyzer/dic/main2012.dic ";
Private static final String PATH_DIC_MAIN = "main2012.dic ";
// Private static final String PATH_DIC_QUANTIFIER = "org/wltea/analyzer/dic/quantifier. dic ";
Private static final String PATH_DIC_QUANTIFIER = "quantifier. dic ";
Then run the Demo normally.