Cloud Natural Language V1beta2 Client - Class Features (0.30.2)

Reference documentation and code samples for the Cloud Natural Language V1beta2 Client class Features.

All available features for sentiment, syntax, and semantic analysis.

Setting each one to true will enable that specific analysis for the input. Next ID: 12

Generated from protobuf message google.cloud.language.v1beta2.AnnotateTextRequest.Features

Namespace

Google \ Cloud \ Language \ V1beta2 \ AnnotateTextRequest

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ extract_syntax bool

Extract syntax information.

↳ extract_entities bool

Extract entities.

↳ extract_document_sentiment bool

Extract document-level sentiment.

↳ extract_entity_sentiment bool

Extract entities and their associated sentiment.

↳ classify_text bool

Classify the full document into categories. If this is true, the API will use the default model which classifies into a predefined taxonomy.

↳ moderate_text bool

Moderate the document for harmful and sensitive categories.

↳ classification_model_options Google\Cloud\Language\V1beta2\ClassificationModelOptions

The model options to use for classification. Defaults to v1 options if not specified. Only used if classify_text is set to true.

getExtractSyntax

Extract syntax information.

Returns
TypeDescription
bool

setExtractSyntax

Extract syntax information.

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getExtractEntities

Extract entities.

Returns
TypeDescription
bool

setExtractEntities

Extract entities.

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getExtractDocumentSentiment

Extract document-level sentiment.

Returns
TypeDescription
bool

setExtractDocumentSentiment

Extract document-level sentiment.

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getExtractEntitySentiment

Extract entities and their associated sentiment.

Returns
TypeDescription
bool

setExtractEntitySentiment

Extract entities and their associated sentiment.

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getClassifyText

Classify the full document into categories. If this is true, the API will use the default model which classifies into a predefined taxonomy.

Returns
TypeDescription
bool

setClassifyText

Classify the full document into categories. If this is true, the API will use the default model which classifies into a predefined taxonomy.

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getModerateText

Moderate the document for harmful and sensitive categories.

Returns
TypeDescription
bool

setModerateText

Moderate the document for harmful and sensitive categories.

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getClassificationModelOptions

The model options to use for classification. Defaults to v1 options if not specified. Only used if classify_text is set to true.

Returns
TypeDescription
Google\Cloud\Language\V1beta2\ClassificationModelOptions|null

hasClassificationModelOptions

clearClassificationModelOptions

setClassificationModelOptions

The model options to use for classification. Defaults to v1 options if not specified. Only used if classify_text is set to true.

Parameter
NameDescription
var Google\Cloud\Language\V1beta2\ClassificationModelOptions
Returns
TypeDescription
$this