libZSservicesZSamazonka-comprehendZSamazonka-comprehend
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

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.

  • text :: Maybe Text

    The word that was recognized in the source text.

  • tokenId :: Maybe Int

    A unique identifier for a token.

  • 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 how-syntax.

Instances

Instances details
Eq SyntaxToken Source # 
Instance details

Defined in Amazonka.Comprehend.Types.SyntaxToken

Read SyntaxToken Source # 
Instance details

Defined in Amazonka.Comprehend.Types.SyntaxToken

Show 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 #

NFData SyntaxToken Source # 
Instance details

Defined in Amazonka.Comprehend.Types.SyntaxToken

Methods

rnf :: SyntaxToken -> () #

Hashable SyntaxToken Source # 
Instance details

Defined in Amazonka.Comprehend.Types.SyntaxToken

FromJSON 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" "libZSservicesZSamazonka-comprehendZSamazonka-comprehend" 'False) (C1 ('MetaCons "SyntaxToken'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "beginOffset") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "text") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "tokenId") '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))))))

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:text:SyntaxToken', syntaxToken_text - The word that was recognized in the source text.

$sel:tokenId:SyntaxToken', syntaxToken_tokenId - A unique identifier for a token.

$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 how-syntax.

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_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.

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 how-syntax.