use of com.hankcs.hanlp.corpus.dictionary.NTDictionaryMaker 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