Search in sources :

Example 16 with Result

use of org.ansj.domain.Result in project ansj_seg by NLPchina.

the class AnsjTokenizer method parse.

private void parse() throws IOException {
    Result parse = ta.parse();
    if (synonyms != null) {
        for (SynonymsRecgnition sr : synonyms) {
            parse.recognition(sr);
        }
    }
    result = new LinkedList<Object>(parse.getTerms());
}
Also used : SynonymsRecgnition(org.ansj.recognition.impl.SynonymsRecgnition) Result(org.ansj.domain.Result)

Aggregations

Result (org.ansj.domain.Result)16 Term (org.ansj.domain.Term)8 Test (org.junit.Test)5 ArrayList (java.util.ArrayList)4 LearnTool (org.ansj.dic.LearnTool)1 TermNatures (org.ansj.domain.TermNatures)1 NatureRecognition (org.ansj.recognition.impl.NatureRecognition)1 SynonymsRecgnition (org.ansj.recognition.impl.SynonymsRecgnition)1 NlpAnalysis (org.ansj.splitWord.analysis.NlpAnalysis)1 Forest (org.nlpcn.commons.lang.tire.domain.Forest)1 Value (org.nlpcn.commons.lang.tire.domain.Value)1