CmdID / aws / aws comprehend
aws comprehend batch-detect-syntax
Inspects the text of a batch of documents for the syntax and part of speech of the words in the document and returns information about them. AWS CLI reference
1 example 2 options Its page in the AWS CLI reference
Examples
To inspect the syntax and parts of speech of words in multiple input texts
The following batch-detect-syntax example analyzes the syntax of multiple input texts and returns the different parts of speech. The pre-trained model's confidence score is also output for each prediction.
aws comprehend batch-detect-syntax --text-list "It is a beautiful day." "Can you please pass the salt?" "Please pay the bill before the 31st." --language-code enIdentify--text-listA list containing the UTF-8 encoded text of the input documents.--language-codeThe language of the input documents.Its output, shortened
{
"ResultList": [
{
"Index": 0,
"SyntaxTokens": [
{
"TokenId": 1,
"Text": "It",
"BeginOffset": 0,
"EndOffset": 2,
"PartOfSpeech": {
"Tag": "PRON",
"Score": 0.9999740719795227
}
},
{
"TokenId": 2,
"Text": "is",
"BeginOffset": 3,
"EndOffset": 5,
"PartOfSpeech": {
"Tag": "VERB",
"Score": 0.999937117099762
}
},
{
"TokenId": 3,
"Text": "a",
"BeginOffset": 6,
"EndOffset": 7,
… 200 more linesFor more information, see Syntax Analysis in the Amazon Comprehend Developer Guide.
Options
--language-codeThe language of the input documents.--text-listA list containing the UTF-8 encoded text of the input documents.