Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Inspects text for syntax and the part of speech of words in the document. For more information, see Syntax in the Comprehend Developer Guide.
Synopsis
- data DetectSyntax = DetectSyntax' {}
- newDetectSyntax :: Text -> SyntaxLanguageCode -> DetectSyntax
- detectSyntax_text :: Lens' DetectSyntax Text
- detectSyntax_languageCode :: Lens' DetectSyntax SyntaxLanguageCode
- data DetectSyntaxResponse = DetectSyntaxResponse' {
- syntaxTokens :: Maybe [SyntaxToken]
- httpStatus :: Int
- newDetectSyntaxResponse :: Int -> DetectSyntaxResponse
- detectSyntaxResponse_syntaxTokens :: Lens' DetectSyntaxResponse (Maybe [SyntaxToken])
- detectSyntaxResponse_httpStatus :: Lens' DetectSyntaxResponse Int
Creating a Request
data DetectSyntax Source #
See: newDetectSyntax
smart constructor.
DetectSyntax' | |
|
Instances
Create a value of DetectSyntax
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
DetectSyntax
, detectSyntax_text
- A UTF-8 string. The maximum string size is 5 KB.
DetectSyntax
, detectSyntax_languageCode
- The language code of the input documents. You can specify any of the
following languages supported by Amazon Comprehend: German ("de"),
English ("en"), Spanish ("es"), French ("fr"), Italian ("it"),
or Portuguese ("pt").
Request Lenses
detectSyntax_text :: Lens' DetectSyntax Text Source #
A UTF-8 string. The maximum string size is 5 KB.
detectSyntax_languageCode :: Lens' DetectSyntax SyntaxLanguageCode Source #
The language code of the input documents. You can specify any of the following languages supported by Amazon Comprehend: German ("de"), English ("en"), Spanish ("es"), French ("fr"), Italian ("it"), or Portuguese ("pt").
Destructuring the Response
data DetectSyntaxResponse Source #
See: newDetectSyntaxResponse
smart constructor.
DetectSyntaxResponse' | |
|
Instances
newDetectSyntaxResponse Source #
Create a value of DetectSyntaxResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
DetectSyntaxResponse
, detectSyntaxResponse_syntaxTokens
- A collection of syntax tokens describing the text. For each token, the
response provides the text, the token type, where the text begins and
ends, and the level of confidence that Amazon Comprehend has that the
token is correct. For a list of token types, see
Syntax
in the Comprehend Developer Guide.
$sel:httpStatus:DetectSyntaxResponse'
, detectSyntaxResponse_httpStatus
- The response's http status code.
Response Lenses
detectSyntaxResponse_syntaxTokens :: Lens' DetectSyntaxResponse (Maybe [SyntaxToken]) Source #
A collection of syntax tokens describing the text. For each token, the response provides the text, the token type, where the text begins and ends, and the level of confidence that Amazon Comprehend has that the token is correct. For a list of token types, see Syntax in the Comprehend Developer Guide.
detectSyntaxResponse_httpStatus :: Lens' DetectSyntaxResponse Int Source #
The response's http status code.