| Constructor and Description |
|---|
SimpleItem() |
| Modifier and Type | Method and Description |
|---|---|
void |
addLabel(String label) |
void |
addLabel(String label,
Integer frequency)
添加一个标签和频次
|
void |
combine(SimpleItem other)
合并两个条目,两者的标签map会合并
|
boolean |
containsLabel(String label) |
static SimpleItem |
create(String param) |
static SimpleItem |
create(String[] param) |
int |
getFrequency(String label) |
String |
getMostLikelyLabel() |
int |
getTotalFrequency()
获取全部频次
|
void |
removeLabel(String label)
删除一个标签
|
String |
toString() |
public void addLabel(String label)
public void addLabel(String label, Integer frequency)
label - frequency - public void removeLabel(String label)
label - 标签public boolean containsLabel(String label)
public int getFrequency(String label)
public static SimpleItem create(String param)
public static SimpleItem create(String[] param)
public void combine(SimpleItem other)
other - public int getTotalFrequency()
public String getMostLikelyLabel()
Copyright © 2014–2021 码农场. All rights reserved.