文本分析 API 的数据和速率限制Data and rate limits for the Text Analytics API

使用本文查找将数据发送到文本分析 API 的大小和速率限制。Use this article to find the limits for the size, and rates that you can send data to Text Analytics API. 请注意,定价不受数据限制或速率限制的影响。Note that pricing is not affected by the data limits or rate limits. 定价受限于文本分析资源的定价详细信息Pricing is subject to your Text Analytics resource's pricing details.

数据限制Data limits

备注

  • 如果需要分析的文档的大小超出限制,则可将文本拆分成较小的文本块,然后再将其发送到 API。If you need to analyze larger documents than the limit allows, you can break the text into smaller chunks of text before sending them to the API.
  • 文档是由文本字符构成的单个字符串。A document is a single string of text characters.
限制Limit Value
单个文档的最大大小Maximum size of a single document 5,120 个字符,通过 StringInfo.LengthInTextElements 进行度量。5,120 characters as measured by StringInfo.LengthInTextElements.
整个请求的最大大小Maximum size of entire request 1MB。1 MB.

可以在单个请求中发送的最大文档数将取决于所使用的 API 版本和功能,如下表中所述。The maximum number of documents you can send in a single request will depend on the API version and feature you're using, which is described in the table below.

以下限制针对当前 v3 API。The following limits are for the current v3 API. 超过以下限制将生成 HTTP 400 错误代码。Exceeding the limits below will generate an HTTP 400 error code.

FeatureFeature 每个请求的最大文档数Max Documents Per Request
语言检测Language Detection 10001000
情绪分析Sentiment Analysis 1010
观点挖掘Opinion Mining 1010
关键短语提取Key Phrase Extraction 1010
命名实体识别Named Entity Recognition 55
实体链接Entity Linking 55
分析终结点Analyze endpoint 对于所有操作为 25。25 for all operations.

速率限制Rate limits

速率限制将因定价层而异。Your rate limit will vary with your pricing tier. 两个 API 版本的这些限制是相同的。These limits are the same for both versions of the API.

Tier 每秒请求数Requests per second 每分钟请求数Requests per minute
S/多服务S / Multi-service 10001000 10001000
S0/F0S0 / F0 100100 300300
S1S1 200200 300300
S2S2 300300 300300
S3S3 500500 500500
S4S4 10001000 10001000

对每个文本分析功能的请求速率分别进行测量。Requests rates are measured for each Text Analytics feature separately. 可以同时向每个功能发送定价层的最大数量的请求。You can send the maximum number of requests for your pricing tier to each feature, at the same time. 例如,如果你处于 S 层并一次发送了 1000 个请求,则你将无法在 59 秒内再发送其他请求。For example, if you're in the S tier and send 1000 requests at once, you wouldn't be able to send another request for 59 seconds.

另请参阅See also