你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Content Analyzers - Get

获取分析器属性。

GET {endpoint}/contentunderstanding/analyzers/{analyzerId}?api-version=2025-05-01-preview

URI 参数

名称 必需 类型 说明
analyzerId
path True

string

pattern: ^[a-zA-Z0-9._-]{1,64}$

分析器的唯一标识符。

endpoint
path True

string (uri)

内容理解服务终结点。

api-version
query True

string

minLength: 1

要用于此操作的 API 版本。

请求头

名称 必需 类型 说明
x-ms-client-request-id

string (uuid)

请求的不透明、全局唯一的客户端生成的字符串标识符。

响应

名称 类型 说明
200 OK

ContentAnalyzer

请求已成功。

标头

x-ms-client-request-id: string

Other Status Codes

Azure.Core.Foundations.ErrorResponse

意外的错误响应。

标头

x-ms-error-code: string

安全性

Ocp-Apim-Subscription-Key

类型: apiKey
在: header

OAuth2Auth

类型: oauth2
流向: accessCode
授权 URL: https://login.microsoftonline.com/common/oauth2/authorize
令牌 URL: https://login.microsoftonline.com/common/oauth2/token

作用域

名称 说明
https://cognitiveservices.azure.com/.default

示例

Get Analyzer

示例请求

GET {endpoint}/contentunderstanding/analyzers/myAnalyzer?api-version=2025-05-01-preview

示例响应

{
  "analyzerId": "myAnalyzer",
  "description": "My analyzer",
  "tags": {
    "createdBy": "John"
  },
  "status": "creating",
  "createdAt": "2025-05-01T18:46:36.051Z",
  "lastModifiedAt": "2025-05-01T18:46:36.051Z",
  "baseAnalyzerId": "prebuilt-documentAnalyzer",
  "config": {
    "locales": null,
    "enableFace": false,
    "enableOcr": true,
    "enableLayout": true,
    "enableFormula": false,
    "returnDetails": true
  },
  "fieldSchema": {
    "name": "MyForm",
    "description": "My form",
    "fields": {
      "Company": {
        "type": "string",
        "description": "Name of company."
      }
    },
    "definitions": {}
  },
  "trainingData": {
    "kind": "blob",
    "containerUrl": "https://myStorageAccount.blob.core.windows.net/myContainer",
    "prefix": "trainingData",
    "fileListPath": "trainingData/fileList.jsonl"
  }
}

定义

名称 说明
AnalysisMode

分析模式:standard、pro。 默认值为 standard。

Azure.Core.Foundations.Error

错误对象。

Azure.Core.Foundations.ErrorResponse

包含错误详细信息的响应。

Azure.Core.Foundations.InnerError

包含有关错误的更具体信息的对象。 根据 Azure REST API 准则 - https://aka.ms/AzureRestApiGuidelines#handling-errors

BlobDataSource

Blob 存储数据源。

ContentAnalyzer

从多模式文档中提取内容和字段的分析器。

ContentAnalyzerConfig

分析器的配置设置。

ContentFieldDefinition

使用 JSON 架构(如语法)定义字段。

ContentFieldSchema

要从文档中提取的字段的架构。

ContentFieldType

字段值的语义数据类型。

DataSourceKind

数据源类型。

GenerationMethod

生成方法。

KnowledgeSourceKind

知识源类型。

ProcessingLocation

可能处理数据的位置。

ReferenceKnowledgeSource

文件知识源。

ResourceStatus

资源的状态。

SegmentationMode

用于拆分音频/视频内容的分段模式。

TableFormat

分析结果 Markdown 中表格的表示格式。

AnalysisMode

分析模式:standard、pro。 默认值为 standard。

说明
standard

标准分析模式。

pro

专业分析模式。

Azure.Core.Foundations.Error

错误对象。

名称 类型 说明
code

string

服务器定义的错误代码集之一。

details

Azure.Core.Foundations.Error[]

导致此报告错误的特定错误的详细信息数组。

innererror

Azure.Core.Foundations.InnerError

包含与当前对象有关错误的更具体信息的对象。

message

string

有关错误的可读的表示形式。

target

string

错误的目标。

Azure.Core.Foundations.ErrorResponse

包含错误详细信息的响应。

名称 类型 说明
error

Azure.Core.Foundations.Error

错误对象。

Azure.Core.Foundations.InnerError

包含有关错误的更具体信息的对象。 根据 Azure REST API 准则 - https://aka.ms/AzureRestApiGuidelines#handling-errors

名称 类型 说明
code

string

服务器定义的错误代码集之一。

innererror

Azure.Core.Foundations.InnerError

内部错误。

BlobDataSource

Blob 存储数据源。

名称 类型 说明
containerUrl

string (uri)

blob 容器的 URL。

fileListPath

string

列出要包含的特定 Blob 的文件的可选路径。

kind string:

blob

数据源的类型。

prefix

string

用于筛选容器中的 Blob 的可选前缀。

ContentAnalyzer

从多模式文档中提取内容和字段的分析器。

名称 类型 默认值 说明
analyzerId

string

pattern: ^[a-zA-Z0-9._-]{1,64}$

分析器的唯一标识符。

baseAnalyzerId

string

pattern: ^[a-zA-Z0-9._-]{1,64}$

要从中增量训练的分析器。

config

ContentAnalyzerConfig

分析器配置设置。

createdAt

string (date-time)

创建分析器的日期和时间。

description

string

分析器的说明。

fieldSchema

ContentFieldSchema

要提取的字段的架构。

knowledgeSources KnowledgeSource[]:

ReferenceKnowledgeSource[]

用于增强分析器的其他知识源。

lastModifiedAt

string (date-time)

上次修改分析器的日期和时间。

mode

AnalysisMode

standard

分析模式:standard、pro。 默认值为 standard。

processingLocation

ProcessingLocation

geography

可能处理数据的位置。

status

ResourceStatus

分析器的状态。

tags

object

与分析器关联的标记。

trainingData DataSource:

BlobDataSource

包含分析器的训练数据的数据源。

warnings

Azure.Core.Foundations.Error[]

创建分析器时遇到的警告。

ContentAnalyzerConfig

分析器的配置设置。

名称 类型 默认值 说明
disableContentFiltering

boolean

禁用检测并防止输出有害内容的内容筛选。

disableFaceBlurring

boolean

在处理内容时禁用默认的人脸模糊处理以保护隐私。

enableFace

boolean

启用人脸检测。

enableFormula

boolean

启用数学公式检测。

enableLayout

boolean

启用布局分析。

enableOcr

boolean

启用光学字符识别(OCR)。

estimateFieldSourceAndConfidence

boolean

返回提取场的接地源和置信度。

locales

string[]

语音听录的区域设置提示列表。

personDirectoryId

string

指定用于识别检测到的人脸的 person 目录。

returnDetails

boolean

返回所有内容详细信息。

segmentationDefinition

string

用于自定义分段模式的分段定义。

segmentationMode

SegmentationMode

noSegmentation

用于拆分音频/视频内容的分段模式。

tableFormat

TableFormat

html

分析结果 Markdown 中表格的表示格式。

ContentFieldDefinition

使用 JSON 架构(如语法)定义字段。

名称 类型 默认值 说明
$ref

string

对另一个字段定义的引用。

description

string

字段说明。

enum

string[]

可能的字段值的枚举。

enumDescriptions

object

每个枚举值的说明。

examples

string[]

字段值的示例。

items

ContentFieldDefinition

每个数组元素的字段类型架构(如果类型为数组)。

method

GenerationMethod

generate

生成方法。

properties

<string,  ContentFieldDefinition>

命名子字段(如果类型为对象)。

type

ContentFieldType

字段值的语义数据类型。

ContentFieldSchema

要从文档中提取的字段的架构。

名称 类型 说明
definitions

<string,  ContentFieldDefinition>

架构中字段引用的其他定义。

description

string

字段架构的说明。

fields

<string,  ContentFieldDefinition>

架构中定义的字段。

name

string

字段架构的名称。

ContentFieldType

字段值的语义数据类型。

说明
string

纯文本。

date

日期,规范化为 ISO 8601 (YYYY-MM-DD) 格式。

time

时间,规范化为 ISO 8601 (hh:mm:ss) 格式。

number

数字为双精度浮点。

integer

整数为 64 位有符号整数。

boolean

Boolean 值。

array

相同类型的子字段列表。

object

子字段的命名列表。

DataSourceKind

数据源类型。

说明
blob

Blob 存储数据源。

GenerationMethod

生成方法。

说明
generate

值基于内容自由生成。

extract

值在内容中出现时提取。

classify

值根据预定义的类别集进行分类。

KnowledgeSourceKind

知识源类型。

说明
reference

参考知识源。

ProcessingLocation

可能处理数据的位置。

说明
geography

数据可以在与资源相同的地理位置进行处理。

dataZone

数据可以在与资源相同的数据区中进行处理。

global

数据可以在全球任何 Azure 数据中心进行处理。

ReferenceKnowledgeSource

文件知识源。

名称 类型 说明
containerUrl

string (uri)

blob 容器的 URL。

fileListPath

string

列出要包含的特定 blob 的文件的路径。

kind string:

reference

知识源的类型。

prefix

string

用于筛选容器中的 Blob 的可选前缀。

ResourceStatus

资源的状态。

说明
creating

正在创建资源。

ready

资源已准备就绪。

deleting

正在删除此资源。

failed

创建期间资源失败。

SegmentationMode

用于拆分音频/视频内容的分段模式。

说明
noSegmentation

无分段。

auto

自动分段。

custom

根据自定义分段定义进行分段。

TableFormat

分析结果 Markdown 中表格的表示格式。

说明
html

使用 HTML 表格元素表示表格: <table>、 <th>、 <tr>、 <td>。