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 |
Synopsis
- data SyntaxToken = SyntaxToken' {
- beginOffset :: Maybe Int
- endOffset :: Maybe Int
- partOfSpeech :: Maybe PartOfSpeechTag
- text :: Maybe Text
- tokenId :: Maybe Int
- newSyntaxToken :: SyntaxToken
- syntaxToken_beginOffset :: Lens' SyntaxToken (Maybe Int)
- syntaxToken_endOffset :: Lens' SyntaxToken (Maybe Int)
- syntaxToken_partOfSpeech :: Lens' SyntaxToken (Maybe PartOfSpeechTag)
- syntaxToken_text :: Lens' SyntaxToken (Maybe Text)
- syntaxToken_tokenId :: Lens' SyntaxToken (Maybe Int)
Documentation
data SyntaxToken Source #
Represents a work in the input text that was recognized and assigned a part of speech. There is one syntax token record for each word in the source text.
See: newSyntaxToken
smart constructor.
SyntaxToken' | |
|
Instances
newSyntaxToken :: SyntaxToken Source #
Create a value of SyntaxToken
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:
$sel:beginOffset:SyntaxToken'
, syntaxToken_beginOffset
- The zero-based offset from the beginning of the source text to the first
character in the word.
$sel:endOffset:SyntaxToken'
, syntaxToken_endOffset
- The zero-based offset from the beginning of the source text to the last
character in the word.
$sel:partOfSpeech:SyntaxToken'
, syntaxToken_partOfSpeech
- Provides the part of speech label and the confidence level that Amazon
Comprehend has that the part of speech was correctly identified. For
more information, see
Syntax
in the Comprehend Developer Guide.
$sel:text:SyntaxToken'
, syntaxToken_text
- The word that was recognized in the source text.
$sel:tokenId:SyntaxToken'
, syntaxToken_tokenId
- A unique identifier for a token.
syntaxToken_beginOffset :: Lens' SyntaxToken (Maybe Int) Source #
The zero-based offset from the beginning of the source text to the first character in the word.
syntaxToken_endOffset :: Lens' SyntaxToken (Maybe Int) Source #
The zero-based offset from the beginning of the source text to the last character in the word.
syntaxToken_partOfSpeech :: Lens' SyntaxToken (Maybe PartOfSpeechTag) Source #
Provides the part of speech label and the confidence level that Amazon Comprehend has that the part of speech was correctly identified. For more information, see Syntax in the Comprehend Developer Guide.
syntaxToken_text :: Lens' SyntaxToken (Maybe Text) Source #
The word that was recognized in the source text.
syntaxToken_tokenId :: Lens' SyntaxToken (Maybe Int) Source #
A unique identifier for a token.