移除词典词条 - RemoveDictWord
函数简介
从OLA数据库中移除指定字库名称和词条名的图像数据。
接口名称
RemoveDictWord
DLL调用
int RemoveDictWord(long ola, long db, string dict_name, string word);
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| ola | 长整数型 | OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
| db | 长整数型 | 数据库连接句柄,由 OpenDatabase 接口生成。 |
| dict_name | 字符串 | 字库名称 |
| word | 字符串 | 要移除的文字 |
示例
C++
long instance = CreateCOLAPlugInterFace();
long db = OpenDatabase(instance, "dict.db");
// 从字库"mydict"中移除词条"A"
int ret = RemoveDictWord(instance, db, "mydict", "A");
Python
# 待补充
返回值
1 成功,0 失败。
注意事项
- 适用于删除单个词条数据的场景
- 如果移除失败,可以通过 GetDatabaseError 函数获取详细的错误信息
- 确保字库名称和词条名正确,且数据存在于数据库中
