在编制索引期间用于文本和图像处理的内置认知技能(Azure 认知搜索)Built-in cognitive skills for text and image processing during indexing (Azure Cognitive Search)

在本文中,你将了解随 Azure 认知搜索提供的认知技能,你可以将这些技能包括在技能组中来提取内容和结构。In this article, you learn about the cognitive skills provided with Azure Cognitive Search that you can include in a skillset to extract content and structure. “认知技能”是以某种方式转换内容的模块或操作。A cognitive skill is a module or operation that transforms content in some way. 该组件通常用于提取数据或推断结构,因此增强了我们对输入数据的理解。Often, it is a component that extracts data or infers structure, and therefore augments our understanding of the input data. 输出几乎总是基于文本。Almost always, the output is text-based. 技能组合是一组定义扩充管道的技能。A skillset is collection of skills that define the enrichment pipeline.

备注

通过增大处理频率、添加更多文档或添加更多 AI 算法来扩大范围时,需要附加可计费的认知服务资源As you expand scope by increasing the frequency of processing, adding more documents, or adding more AI algorithms, you will need to attach a billable Cognitive Services resource. 调用认知服务中的 API 以及在 Azure 认知搜索中的文档破解阶段提取图像时,会产生费用。Charges accrue when calling APIs in Cognitive Services, and for image extraction as part of the document-cracking stage in Azure Cognitive Search. 提取文档中的文本不会产生费用。There are no charges for text extraction from documents.

当你行使内置技能时,我们会按现有的认知服务预付费价格收费。Execution of built-in skills is charged at the existing Cognitive Services pay-in-advance price. 图像提取定价如 Azure 认知搜索定价页所述。Image extraction pricing is described on the Azure Cognitive Search pricing page.

可以利用增量扩充(预览版)功能来提供缓存,使得在未来修改技能组后只需运行必要的认知技能,从而使索引器更高效,为你节省时间和金钱。The incremental enrichment (preview) feature allows you to provide a cache that enables the indexer to be more efficient at running only the cognitive skills that are necessary if you modify your skillset in the future, saving you time and money.

内置技能Built-in skills

多种技能可在其使用或生成的对象中灵活应用。Several skills are flexible in what they consume or produce. 一般来说,大多数技能都基于预先定型的模型,这意味着你无法使用自己的定型数据来定型模型。In general, most skills are based on pre-trained models, which means you cannot train the model using your own training data. 下表枚举并介绍了 Microsoft 提供的技能。The following table enumerates and describes the skills provided by Microsoft.

技能Skill 说明Description
Microsoft.Skills.Text.CustomEntityLookupSkillMicrosoft.Skills.Text.CustomEntityLookupSkill 在用户自定义的单词和短语列表中查找文本。Looks for text from a custom, user-defined list of words and phrases.
Microsoft.Skills.Text.KeyPhraseSkillMicrosoft.Skills.Text.KeyPhraseSkill 此技能使用预定型模型来检测基于术语放置、语言规则、与其他术语的接近度以及该术语在源数据内的异常程度的重要短语。This skill uses a pretrained model to detect important phrases based on term placement, linguistic rules, proximity to other terms, and how unusual the term is within the source data.
Microsoft.Skills.Text.LanguageDetectionSkillMicrosoft.Skills.Text.LanguageDetectionSkill 该技能使用预定型模型来检测使用语言的语言类型(每个文档一个语言 ID)。This skill uses a pretrained model to detect which language is used (one language ID per document). 在同一文本段中使用多种语言时,输出是主要使用的语言的 LCID。When multiple languages are used within the same text segments, the output is the LCID of the predominantly used language.
Microsoft.Skills.Text.MergeSkillMicrosoft.Skills.Text.MergeSkill 将字段集合中的文本合并到单个字段中。Consolidates text from a collection of fields into a single field.
Microsoft.Skills.Text.EntityRecognitionSkillMicrosoft.Skills.Text.EntityRecognitionSkill 此技能使用预训练模型为固定的一组类别建立实体:人员、位置、组织、电子邮件、URL、日期时间字段。This skill uses a pretrained model to establish entities for a fixed set of categories: people, location, organization, emails, URLs, datetime fields.
Microsoft.Skills.Text.PIIDetectionSkillMicrosoft.Skills.Text.PIIDetectionSkill 此技能使用预先训练的模型从给定文本中提取个人身份信息。This skill uses a pretrained model to extract personally identifiable information from a given text. 此技能还提供了用于过滤文本中检测到的个人身份信息实体的各种选项。The skill also gives various options for masking the detected personally identifiable information entities in the text.
Microsoft.Skills.Text.SentimentSkillMicrosoft.Skills.Text.SentimentSkill 此技能使用预定型模型根据记录对记录中的正面或负面情绪进行评分。This skill uses a pretrained model to score positive or negative sentiment on a record by record basis. 得分介于 0 和 1 之间。The score is between 0 and 1. 当无法检测到情绪以及文本被认为是中性时,这两个 null 事例都会出现中性分数。Neutral scores occur for both the null case when sentiment cannot be detected, and for text that is considered neutral.
Microsoft.Skills.Text.SplitSkillMicrosoft.Skills.Text.SplitSkill 将文本拆分为多页,以便以增量方式扩充或增加内容。Splits text into pages so that you can enrich or augment content incrementally.
Microsoft.Skills.Text.TranslationSkillMicrosoft.Skills.Text.TranslationSkill 此技能使用预先训练的模型将输入文本转换为各种语言,以用于规范化或本地化用例。This skill uses a pretrained model to translate the input text into a variety of languages for normalization or localization use cases.
Microsoft.Skills.Vision.ImageAnalysisSkillMicrosoft.Skills.Vision.ImageAnalysisSkill 此技能使用图像检测算法来识别图像的内容并生成文本说明。This skill uses an image detection algorithm to identify the content of an image and generate a text description.
Microsoft.Skills.Vision.OcrSkillMicrosoft.Skills.Vision.OcrSkill 光学字符识别。Optical character recognition.
Microsoft.Skills.Util.ConditionalSkillMicrosoft.Skills.Util.ConditionalSkill 允许根据条件进行筛选、分配默认值和合并数据。Allows filtering, assigning a default value, and merging data based on a condition.
Microsoft.Skills.Util.DocumentExtractionSkillMicrosoft.Skills.Util.DocumentExtractionSkill 从扩充管道内的文件中提取内容。Extracts content from a file within the enrichment pipeline.
Microsoft.Skills.Util.ShaperSkillMicrosoft.Skills.Util.ShaperSkill 将输出映射到复杂类型(多部分数据类型,可用于全名、多行地址或姓氏和个人标识符的组合)。Maps output to a complex type (a multi-part data type, which might be used for a full name, a multi-line address, or a combination of last name and a personal identifier.)
Microsoft.Skills.Custom.WebApiSkillMicrosoft.Skills.Custom.WebApiSkill 通过对自定义 Web API 执行 HTTP 调用,实现 AI 扩充管道的可扩展性Allows extensibility of an AI enrichment pipeline by making an HTTP call into a custom Web API

有关创建自定义技能的指导,请参阅如何定义自定义界面示例:创建用于 AI 扩充的自定义技能For guidance on creating a custom skill, see How to define a custom interface and Example: Creating a custom skill for AI enrichment.

另请参阅See also