public class UserDefineLibrary
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static love.cq.domain.Forest |
ambiguityForest |
static java.lang.Integer |
DEFAULT_FREQ |
static java.lang.String |
DEFAULT_FREQ_STR |
static java.lang.String |
DEFAULT_NATURE |
static love.cq.domain.Forest |
FOREST |
| Constructor and Description |
|---|
UserDefineLibrary() |
| Modifier and Type | Method and Description |
|---|---|
static void |
clear()
将用户自定义词典清空
|
static java.util.HashMap<java.lang.String,love.cq.domain.Forest> |
getUserForestMap() |
static void |
insertWord(java.lang.String keyword,
java.lang.String nature,
int freq)
关键词增加
|
static void |
loadFile(love.cq.domain.Forest forest,
java.io.File file) |
static void |
loadLibrary(love.cq.domain.Forest forest,
java.lang.String path)
加载词典,传入一本词典的路径.或者目录.词典后缀必须为.dic
|
static void |
removeWord(java.lang.String word)
删除关键词
|
public static final java.lang.String DEFAULT_NATURE
public static final java.lang.Integer DEFAULT_FREQ
public static final java.lang.String DEFAULT_FREQ_STR
public static love.cq.domain.Forest FOREST
public static love.cq.domain.Forest ambiguityForest
public static void insertWord(java.lang.String keyword,
java.lang.String nature,
int freq)
keyWord - 所要增加的关键词nature - 关键词的词性freq - 关键词的词频public static void loadFile(love.cq.domain.Forest forest,
java.io.File file)
public static void loadLibrary(love.cq.domain.Forest forest,
java.lang.String path)
public static void removeWord(java.lang.String word)
public static void clear()
public static java.util.HashMap<java.lang.String,love.cq.domain.Forest> getUserForestMap()
Copyright © 2013. All Rights Reserved.