use of com.hankcs.hanlp.corpus.dictionary.EasyDictionary in project HanLP by hankcs.
the class TestDictionaryMaker method testLoadEasyDictionary.
public void testLoadEasyDictionary() throws Exception {
EasyDictionary dictionary = EasyDictionary.create("data/2014_dictionary.txt");
System.out.println(dictionary.GetWordInfo("高峰"));
}
use of com.hankcs.hanlp.corpus.dictionary.EasyDictionary in project HanLP by hankcs.
the class TestMakeCompanyCorpus method testParse.
public void testParse() throws Exception {
EasyDictionary dictionary = EasyDictionary.create("data/dictionary/2014_dictionary.txt");
final NTDictionaryMaker nsDictionaryMaker = new NTDictionaryMaker(dictionary);
// CorpusLoader.walk("D:\\JavaProjects\\CorpusToolBox\\data\\2014\\", new CorpusLoader.Handler()
CorpusLoader.walk("data/test/nt/part/", new CorpusLoader.Handler() {
@Override
public void handle(Document document) {
nsDictionaryMaker.compute(document.getComplexSentenceList());
}
});
nsDictionaryMaker.saveTxtTo("D:\\JavaProjects\\HanLP\\data\\dictionary\\organization\\outerNT");
}
Aggregations