-
Notifications
You must be signed in to change notification settings - Fork 0
API 文档 文本库
xerysherry edited this page Nov 7, 2019
·
1 revision
- function SetTextWeightList(name, table)
- function SetTextList(name, table)
- function GetTextListCount(name)
- function GetTextListWeight(name)
- function GetTextByIndex(name)
- function GetTextByWeight(name)
name: 字符串, 文本表名 table: 表, 权重文本表
设置权重文本表
SetTextWeightList("family_name",
{
{"李", 2000},
{"王", 2000},
{"张", 2000},
{"刘", 2000},
{"陈", 1500},
{"杨", 1500},
{"赵", 1500},
{"黄", 1500},
})name: 字符串, 文本表名 table: 表, 文本表
设置文本表
SetTextWeightList("family_name",
{
"李",
"王",
"张",
"刘",
"陈",
"杨",
"赵",
"黄",
})name: 字符串, 文本表名
获取文本表中文本条目数
name: 字符串, 文本表名
获取文本表的总权重值, 如果非权重表, 权重值等于条目数
name: 字符串, 文本表名 index: 数值, 索引值
获取文本表中某一条文本
name: 字符串, 文本表名 weight: 数值, 权重值
获取文本表中某一条文本, 并返回该文本索引