Extracts text from the body of a document file.
Operation description
-
Before you use this operation, make sure that you fully understand the billing and pricing of Intelligent Media Management (IMM).
-
Before you call this operation, make sure that a project is available in the current region. For more information, see Project Management.
-
Supported file formats include Word, Excel, PPT, PDF, and TXT.
-
The maximum file size is 200 MB. The extracted plain text must not exceed 2 MB (approximately 600,000 Chinese characters).
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
imm:ExtractDocumentText |
none |
*Project
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectName |
string |
Yes |
The project name. For information about how to obtain the project name, see Creating a Project. |
immtest |
| SourceURI |
string |
Yes |
The storage address of the source data. The OSS address follows the format oss://${Bucket}/${Object}, where Important Only HTTP protocol addresses are supported. |
oss://test-bucket/test-object |
| SourceType |
string |
No |
The file type of the source data. By default, the file type is determined by the file extension of the input object. If the input object has no extension, specify this parameter. Valid values:
|
docx |
| CredentialConfig | CredentialConfig |
No |
Leave this parameter empty if you have no special requirements. Optional. Chain authorization configuration. For more information, see Using Chain Authorization to Access Other Entity Resources. |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response body. |
||
| RequestId |
string |
The request ID. |
94D6F994-E298-037E-8E8B-0090F27***** |
| DocumentText |
string |
The extracted text content of the document. |
Test content. |
Examples
Success response
JSON format
{
"RequestId": "94D6F994-E298-037E-8E8B-0090F27*****",
"DocumentText": "Test content."
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.