Package com.chatopera.bot.sdk.models
Class DictWord
java.lang.Object
com.chatopera.bot.sdk.models.DictWord
词汇表词典词条
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addSynonym
(String synonym) void
fromJson
(org.json.JSONObject jsonObject) getWord()
void
setSynonyms
(HashSet<String> synonyms) void
将近义词转化为字符串org.json.JSONObject
toJson()
-
Constructor Details
-
DictWord
public DictWord() -
DictWord
- Parameters:
word
- 标准词- Throws:
ResourceInvalidException
-
DictWord
- Parameters:
word
- 标准词synonyms
- 近义词- Throws:
ResourceInvalidException
-
DictWord
- Parameters:
word
- 标准词synonyms
- 近义词- Throws:
ResourceInvalidException
-
-
Method Details
-
getWord
-
setWord
- Throws:
ResourceInvalidException
-
getSynonyms
-
setSynonyms
-
addSynonym
-
toJson
public org.json.JSONObject toJson() -
fromJson
- Throws:
ResourceInvalidException
-
stringifySynonyms
将近义词转化为字符串- Returns:
-