org.ansj.splitWord.Analysis Java Examples

The following examples show how to use org.ansj.splitWord.Analysis. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AnsjSegmentFactory.java    From jstarcraft-nlp with Apache License 2.0 5 votes vote down vote up
@Override
protected NlpTokenizer<? extends NlpToken> getNlpTokenizer(Map<String, String> configurations) {
    KeyValue<Analysis, List<Recognition>> keyValue = build(configurations);
    Analysis analysis = keyValue.getKey();
    List<Recognition> recognitions = keyValue.getValue();

    AnsjTokenizer tokenizer = new AnsjTokenizer(analysis, recognitions);
    return tokenizer;
}
 
Example #2
Source File: AnsjTokenizer.java    From jstarcraft-nlp with Apache License 2.0 4 votes vote down vote up
public AnsjTokenizer(Analysis analysis, List<StopRecognition> stops, List<SynonymsRecgnition> synonyms) {
    this.analysis = analysis;
    this.stops = stops;
    this.synonyms = synonyms;
}
 
Example #3
Source File: AnsjTokenizer.java    From jstarcraft-nlp with Apache License 2.0 4 votes vote down vote up
public AnsjTokenizer(Analysis analysis, Collection<Recognition> recognitions) {
    this(analysis, recognitions.toArray(new Recognition[recognitions.size()]));
}
 
Example #4
Source File: AnsjTokenizer.java    From jstarcraft-nlp with Apache License 2.0 4 votes vote down vote up
public AnsjTokenizer(Analysis analysis, Recognition... recognitions) {
    this.analysis = analysis;
    this.recognitions = recognitions;
}