org.apdplat.word.util.ResourceLoader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of word Show documentation
Show all versions of word Show documentation
word分词是一个Java实现的中文分词组件,提供了多种基于词典的分词算法,并利用ngram模型来消除歧义。
能准确识别英文、数字,以及日期、时间等数量词,能识别人名、地名、组织机构名等未登录词。
同时提供了Lucene、Solr、ElasticSearch插件。
/**
*
* 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.util;
import java.util.List;
/**
* 资源加载接口
* @author 杨尚川
*/
public interface ResourceLoader {
/**
* 清空数据
*/
public void clear();
/**
* 初始加载全部数据
* @param lines 初始全部数据
*/
public void load(List lines);
/**
* 动态增加一行数据
* @param line 动态新增数据(一行)
*/
public void add(String line);
/**
* 动态移除一行数据
* @param line 动态移除数据(一行)
*/
public void remove(String line);
}