跳转到主要内容
此对象是字典描述 (DictionaryDescription 对象) 的集合,提供标准集合功能。有关详细信息,请参阅使用集合 DictionaryDescription 对象可转换为 StandardDictionaryDescriptionUserDictionaryDescriptionRegExpDictionaryDescriptionExternalDictionaryDescription 对象中的任意一种,它们分别描述不同的字典类型 可通过 IBaseLanguage::DictionaryDescriptions 属性访问字典描述集合。禁止字典的集合可通过 TextLanguage 对象访问。
  • ABBYY FineReader Engine 集合的索引从 0 开始。
  • 可以使用 C# 中的 foreach 语句 (在 Visual Basic .NET 中为 for each) 操作该集合。

属性

名称类型说明
ApplicationEngine, 只读返回 Engine 对象。
Countint, 只读表示集合中的元素数。
ElementDictionaryDescription, 只读用于访问集合中的单个元素。

方法

NameDescription
AddNew创建指定 type 的新字典描述,并将其添加到 集合 中。
DeleteAll从 集合 中删除所有 元素。
DeleteAt从 集合 中删除一个 元素。
Item提供对 集合 中 single element 的访问。
DictionaryDescriptions 对象关系图

示例

// 此示例代码为基本语言指定用户字典
FREngine.IEngine engine;
string dictionaryFileName = "D:\\Sample.amd";
FREngine.IBaseLanguage baseLanguage;
// 获取基本语言的字典描述集合并删除所有项
IDictionaryDescriptions dictionaryDescriptions = baseLanguage.DictionaryDescriptions;
dictionaryDescriptions.DeleteAll();
// 创建用户字典描述并将其添加到集合中
IDictionaryDescription dictionaryDescription = dictionaryDescriptions.AddNew( DictionaryTypeEnum.DT_UserDictionary );
IUserDictionaryDescription userDictionaryDescription = dictionaryDescription.GetAsUserDictionaryDescription();
userDictionaryDescription.FileName = dictionaryFileName;
此对象已在以下适用于 Linux 和 Windows 的代码示例中使用:CustomLanguage

另请参见

使用词典 DictionaryDescription StandardDictionaryDescription UserDictionaryDescription RegExpDictionaryDescription ExternalDictionaryDescription 使用集合 使用属性