All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apdplat.word.dictionary.Dictionary Maven / Gradle / Ivy

Go to download

word分词是一个Java实现的中文分词组件,提供了多种基于词典的分词算法,并利用ngram模型来消除歧义。 能准确识别英文、数字,以及日期、时间等数量词,能识别人名、地名、组织机构名等未登录词。 同时提供了Lucene、Solr、ElasticSearch插件。

There is a newer version: 1.3.1
Show newest version
/**
 * 
 * APDPlat - Application Product Development Platform
 * Copyright (c) 2013, 杨尚川, [email protected]
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 * 
 */

package org.apdplat.word.dictionary;

import java.util.List;

/**
 * 词典
 * @author 杨尚川
 */
public interface Dictionary {
    public int getMaxLength();
    public boolean contains(String item, int start, int length);
    public boolean contains(String item);
    public void addAll(List items);
    public void add(String item);
    public void clear();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy