amazonka-comprehend-2.0: Amazon Comprehend SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.Comprehend.Types.SyntaxToken

Description

 
Synopsis

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.

Constructors

SyntaxToken' 

Fields

  • beginOffset :: Maybe Int

    The zero-based offset from the beginning of the source text to the first character in the word.

  • endOffset :: Maybe Int

    The zero-based offset from the beginning of the source text to the last character in the word.

  • partOfSpeech :: Maybe PartOfSpeechTag

    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.

  • text :: Maybe Text

    The word that was recognized in the source text.

  • tokenId :: Maybe Int

    A unique identifier for a token.

Instances

Instances details
FromJSON SyntaxToken Source # 
Instance details

Defined in Amazonka.Comprehend.Types.SyntaxToken

Generic SyntaxToken Source # 
Instance details

Defined in Amazonka.Comprehend.Types.SyntaxToken

Associated Types

type Rep SyntaxToken :: Type -> Type #

Read SyntaxToken Source # 
Instance details

Defined in Amazonka.Comprehend.Types.SyntaxToken

Show SyntaxToken Source # 
Instance details

Defined in Amazonka.Comprehend.Types.SyntaxToken

NFData SyntaxToken Source # 
Instance details

Defined in Amazonka.Comprehend.Types.SyntaxToken

Methods

rnf :: SyntaxToken -> () #

Eq SyntaxToken Source # 
Instance details

Defined in Amazonka.Comprehend.Types.SyntaxToken

Hashable SyntaxToken Source # 
Instance details

Defined in Amazonka.Comprehend.Types.SyntaxToken

type Rep SyntaxToken Source # 
Instance details

Defined in Amazonka.Comprehend.Types.SyntaxToken

type Rep SyntaxToken = D1 ('MetaData "SyntaxToken" "Amazonka.Comprehend.Types.SyntaxToken" "amazonka-comprehend-2.0-Ko6GCjAQF2RARapSdPn69F" 'False) (C1 ('MetaCons "SyntaxToken'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "beginOffset") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "endOffset") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int))) :*: (S1 ('MetaSel ('Just "partOfSpeech") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe PartOfSpeechTag)) :*: (S1 ('MetaSel ('Just "text") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "tokenId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int))))))

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.