Documentation ¶
Overview ¶
Package naturallanguageunderstandingv1 : Operations and models for the NaturalLanguageUnderstandingV1 service
Index ¶
- Constants
- func GetServiceURLForRegion(region string) (string, error)
- func UnmarshalAnalysisResults(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalAnalysisResultsUsage(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalAuthor(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalCategoriesModel(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalCategoriesModelList(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalCategoriesOptions(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalCategoriesRelevantText(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalCategoriesResult(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalCategoriesResultExplanation(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalClassificationsModel(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalClassificationsModelList(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalClassificationsOptions(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalClassificationsResult(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalConceptsOptions(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalConceptsResult(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalDeleteModelResults(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalDisambiguationResult(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalDocumentEmotionResults(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalDocumentSentimentResults(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalEmotionOptions(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalEmotionResult(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalEmotionScores(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalEntitiesOptions(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalEntitiesResult(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalEntityMention(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalFeatureSentimentResults(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalFeatures(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalFeaturesResultsMetadata(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalFeed(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalKeywordsOptions(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalKeywordsResult(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalListModelsResults(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalListSentimentModelsResponse(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalMetadataOptions(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalModel(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalNotice(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalRelationArgument(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalRelationEntity(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalRelationsOptions(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalRelationsResult(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalSemanticRolesEntity(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalSemanticRolesKeyword(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalSemanticRolesOptions(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalSemanticRolesResult(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalSemanticRolesResultAction(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalSemanticRolesResultObject(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalSemanticRolesResultSubject(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalSemanticRolesVerb(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalSentenceResult(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalSentimentModel(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalSentimentOptions(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalSentimentResult(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalSummarizationOptions(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalSyntaxOptions(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalSyntaxOptionsTokens(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalSyntaxResult(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalTargetedEmotionResults(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalTargetedSentimentResults(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalTokenResult(m map[string]json.RawMessage, result interface{}) (err error)
- type AnalysisResults
- type AnalysisResultsUsage
- type AnalyzeOptions
- func (_options *AnalyzeOptions) SetClean(clean bool) *AnalyzeOptions
- func (_options *AnalyzeOptions) SetFallbackToRaw(fallbackToRaw bool) *AnalyzeOptions
- func (_options *AnalyzeOptions) SetFeatures(features *Features) *AnalyzeOptions
- func (_options *AnalyzeOptions) SetHTML(html string) *AnalyzeOptions
- func (options *AnalyzeOptions) SetHeaders(param map[string]string) *AnalyzeOptions
- func (_options *AnalyzeOptions) SetLanguage(language string) *AnalyzeOptions
- func (_options *AnalyzeOptions) SetLimitTextCharacters(limitTextCharacters int64) *AnalyzeOptions
- func (_options *AnalyzeOptions) SetReturnAnalyzedText(returnAnalyzedText bool) *AnalyzeOptions
- func (_options *AnalyzeOptions) SetText(text string) *AnalyzeOptions
- func (_options *AnalyzeOptions) SetURL(url string) *AnalyzeOptions
- func (_options *AnalyzeOptions) SetXpath(xpath string) *AnalyzeOptions
- type Author
- type CategoriesModel
- type CategoriesModelList
- type CategoriesOptions
- type CategoriesRelevantText
- type CategoriesResult
- type CategoriesResultExplanation
- type ClassificationsModel
- type ClassificationsModelList
- type ClassificationsOptions
- type ClassificationsResult
- type ConceptsOptions
- type ConceptsResult
- type CreateCategoriesModelOptions
- func (_options *CreateCategoriesModelOptions) SetDescription(description string) *CreateCategoriesModelOptions
- func (options *CreateCategoriesModelOptions) SetHeaders(param map[string]string) *CreateCategoriesModelOptions
- func (_options *CreateCategoriesModelOptions) SetLanguage(language string) *CreateCategoriesModelOptions
- func (_options *CreateCategoriesModelOptions) SetModelVersion(modelVersion string) *CreateCategoriesModelOptions
- func (_options *CreateCategoriesModelOptions) SetName(name string) *CreateCategoriesModelOptions
- func (_options *CreateCategoriesModelOptions) SetTrainingData(trainingData io.ReadCloser) *CreateCategoriesModelOptions
- func (_options *CreateCategoriesModelOptions) SetTrainingDataContentType(trainingDataContentType string) *CreateCategoriesModelOptions
- func (_options *CreateCategoriesModelOptions) SetUserMetadata(userMetadata map[string]interface{}) *CreateCategoriesModelOptions
- func (_options *CreateCategoriesModelOptions) SetVersionDescription(versionDescription string) *CreateCategoriesModelOptions
- func (_options *CreateCategoriesModelOptions) SetWorkspaceID(workspaceID string) *CreateCategoriesModelOptions
- type CreateClassificationsModelOptions
- func (_options *CreateClassificationsModelOptions) SetDescription(description string) *CreateClassificationsModelOptions
- func (options *CreateClassificationsModelOptions) SetHeaders(param map[string]string) *CreateClassificationsModelOptions
- func (_options *CreateClassificationsModelOptions) SetLanguage(language string) *CreateClassificationsModelOptions
- func (_options *CreateClassificationsModelOptions) SetModelVersion(modelVersion string) *CreateClassificationsModelOptions
- func (_options *CreateClassificationsModelOptions) SetName(name string) *CreateClassificationsModelOptions
- func (_options *CreateClassificationsModelOptions) SetTrainingData(trainingData io.ReadCloser) *CreateClassificationsModelOptions
- func (_options *CreateClassificationsModelOptions) SetTrainingDataContentType(trainingDataContentType string) *CreateClassificationsModelOptions
- func (_options *CreateClassificationsModelOptions) SetUserMetadata(userMetadata map[string]interface{}) *CreateClassificationsModelOptions
- func (_options *CreateClassificationsModelOptions) SetVersionDescription(versionDescription string) *CreateClassificationsModelOptions
- func (_options *CreateClassificationsModelOptions) SetWorkspaceID(workspaceID string) *CreateClassificationsModelOptions
- type CreateSentimentModelOptions
- func (_options *CreateSentimentModelOptions) SetDescription(description string) *CreateSentimentModelOptions
- func (options *CreateSentimentModelOptions) SetHeaders(param map[string]string) *CreateSentimentModelOptions
- func (_options *CreateSentimentModelOptions) SetLanguage(language string) *CreateSentimentModelOptions
- func (_options *CreateSentimentModelOptions) SetModelVersion(modelVersion string) *CreateSentimentModelOptions
- func (_options *CreateSentimentModelOptions) SetName(name string) *CreateSentimentModelOptions
- func (_options *CreateSentimentModelOptions) SetTrainingData(trainingData io.ReadCloser) *CreateSentimentModelOptions
- func (_options *CreateSentimentModelOptions) SetUserMetadata(userMetadata map[string]interface{}) *CreateSentimentModelOptions
- func (_options *CreateSentimentModelOptions) SetVersionDescription(versionDescription string) *CreateSentimentModelOptions
- func (_options *CreateSentimentModelOptions) SetWorkspaceID(workspaceID string) *CreateSentimentModelOptions
- type DeleteCategoriesModelOptions
- type DeleteClassificationsModelOptions
- type DeleteModelOptions
- type DeleteModelResults
- type DeleteSentimentModelOptions
- type DisambiguationResult
- type DocumentEmotionResults
- type DocumentSentimentResults
- type EmotionOptions
- type EmotionResult
- type EmotionScores
- type EntitiesOptions
- type EntitiesResult
- type EntityMention
- type FeatureSentimentResults
- type Features
- type FeaturesResultsMetadata
- type Feed
- type GetCategoriesModelOptions
- type GetClassificationsModelOptions
- type GetSentimentModelOptions
- type KeywordsOptions
- type KeywordsResult
- type ListCategoriesModelsOptions
- type ListClassificationsModelsOptions
- type ListModelsOptions
- type ListModelsResults
- type ListSentimentModelsOptions
- type ListSentimentModelsResponse
- type MetadataOptions
- type Model
- type NaturalLanguageUnderstandingV1
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) Analyze(analyzeOptions *AnalyzeOptions) (result *AnalysisResults, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) AnalyzeWithContext(ctx context.Context, analyzeOptions *AnalyzeOptions) (result *AnalysisResults, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) Clone() *NaturalLanguageUnderstandingV1
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) CreateCategoriesModel(createCategoriesModelOptions *CreateCategoriesModelOptions) (result *CategoriesModel, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) CreateCategoriesModelWithContext(ctx context.Context, ...) (result *CategoriesModel, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) CreateClassificationsModel(createClassificationsModelOptions *CreateClassificationsModelOptions) (result *ClassificationsModel, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) CreateClassificationsModelWithContext(ctx context.Context, ...) (result *ClassificationsModel, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) CreateSentimentModel(createSentimentModelOptions *CreateSentimentModelOptions) (result *SentimentModel, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) CreateSentimentModelWithContext(ctx context.Context, createSentimentModelOptions *CreateSentimentModelOptions) (result *SentimentModel, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) DeleteCategoriesModel(deleteCategoriesModelOptions *DeleteCategoriesModelOptions) (result *DeleteModelResults, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) DeleteCategoriesModelWithContext(ctx context.Context, ...) (result *DeleteModelResults, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) DeleteClassificationsModel(deleteClassificationsModelOptions *DeleteClassificationsModelOptions) (result *DeleteModelResults, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) DeleteClassificationsModelWithContext(ctx context.Context, ...) (result *DeleteModelResults, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) DeleteModel(deleteModelOptions *DeleteModelOptions) (result *DeleteModelResults, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) DeleteModelWithContext(ctx context.Context, deleteModelOptions *DeleteModelOptions) (result *DeleteModelResults, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) DeleteSentimentModel(deleteSentimentModelOptions *DeleteSentimentModelOptions) (result *DeleteModelResults, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) DeleteSentimentModelWithContext(ctx context.Context, deleteSentimentModelOptions *DeleteSentimentModelOptions) (result *DeleteModelResults, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) DisableRetries()
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) DisableSSLVerification()
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) EnableRetries(maxRetries int, maxRetryInterval time.Duration)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) GetCategoriesModel(getCategoriesModelOptions *GetCategoriesModelOptions) (result *CategoriesModel, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) GetCategoriesModelWithContext(ctx context.Context, getCategoriesModelOptions *GetCategoriesModelOptions) (result *CategoriesModel, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) GetClassificationsModel(getClassificationsModelOptions *GetClassificationsModelOptions) (result *ClassificationsModel, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) GetClassificationsModelWithContext(ctx context.Context, ...) (result *ClassificationsModel, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) GetEnableGzipCompression() bool
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) GetSentimentModel(getSentimentModelOptions *GetSentimentModelOptions) (result *SentimentModel, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) GetSentimentModelWithContext(ctx context.Context, getSentimentModelOptions *GetSentimentModelOptions) (result *SentimentModel, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) GetServiceURL() string
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) ListCategoriesModels(listCategoriesModelsOptions *ListCategoriesModelsOptions) (result *CategoriesModelList, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) ListCategoriesModelsWithContext(ctx context.Context, listCategoriesModelsOptions *ListCategoriesModelsOptions) (result *CategoriesModelList, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) ListClassificationsModels(listClassificationsModelsOptions *ListClassificationsModelsOptions) (result *ClassificationsModelList, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) ListClassificationsModelsWithContext(ctx context.Context, ...) (result *ClassificationsModelList, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) ListModels(listModelsOptions *ListModelsOptions) (result *ListModelsResults, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) ListModelsWithContext(ctx context.Context, listModelsOptions *ListModelsOptions) (result *ListModelsResults, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) ListSentimentModels(listSentimentModelsOptions *ListSentimentModelsOptions) (result *ListSentimentModelsResponse, response *core.DetailedResponse, ...)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) ListSentimentModelsWithContext(ctx context.Context, listSentimentModelsOptions *ListSentimentModelsOptions) (result *ListSentimentModelsResponse, response *core.DetailedResponse, ...)
- func (*NaturalLanguageUnderstandingV1) NewAnalyzeOptions(features *Features) *AnalyzeOptions
- func (*NaturalLanguageUnderstandingV1) NewCreateCategoriesModelOptions(language string, trainingData io.ReadCloser) *CreateCategoriesModelOptions
- func (*NaturalLanguageUnderstandingV1) NewCreateClassificationsModelOptions(language string, trainingData io.ReadCloser) *CreateClassificationsModelOptions
- func (*NaturalLanguageUnderstandingV1) NewCreateSentimentModelOptions(language string, trainingData io.ReadCloser) *CreateSentimentModelOptions
- func (*NaturalLanguageUnderstandingV1) NewDeleteCategoriesModelOptions(modelID string) *DeleteCategoriesModelOptions
- func (*NaturalLanguageUnderstandingV1) NewDeleteClassificationsModelOptions(modelID string) *DeleteClassificationsModelOptions
- func (*NaturalLanguageUnderstandingV1) NewDeleteModelOptions(modelID string) *DeleteModelOptions
- func (*NaturalLanguageUnderstandingV1) NewDeleteSentimentModelOptions(modelID string) *DeleteSentimentModelOptions
- func (*NaturalLanguageUnderstandingV1) NewGetCategoriesModelOptions(modelID string) *GetCategoriesModelOptions
- func (*NaturalLanguageUnderstandingV1) NewGetClassificationsModelOptions(modelID string) *GetClassificationsModelOptions
- func (*NaturalLanguageUnderstandingV1) NewGetSentimentModelOptions(modelID string) *GetSentimentModelOptions
- func (*NaturalLanguageUnderstandingV1) NewListCategoriesModelsOptions() *ListCategoriesModelsOptions
- func (*NaturalLanguageUnderstandingV1) NewListClassificationsModelsOptions() *ListClassificationsModelsOptions
- func (*NaturalLanguageUnderstandingV1) NewListModelsOptions() *ListModelsOptions
- func (*NaturalLanguageUnderstandingV1) NewListSentimentModelsOptions() *ListSentimentModelsOptions
- func (*NaturalLanguageUnderstandingV1) NewUpdateCategoriesModelOptions(modelID string, language string, trainingData io.ReadCloser) *UpdateCategoriesModelOptions
- func (*NaturalLanguageUnderstandingV1) NewUpdateClassificationsModelOptions(modelID string, language string, trainingData io.ReadCloser) *UpdateClassificationsModelOptions
- func (*NaturalLanguageUnderstandingV1) NewUpdateSentimentModelOptions(modelID string, language string, trainingData io.ReadCloser) *UpdateSentimentModelOptions
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) SetDefaultHeaders(headers http.Header)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) SetEnableGzipCompression(enableGzip bool)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) SetServiceURL(url string) error
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) UpdateCategoriesModel(updateCategoriesModelOptions *UpdateCategoriesModelOptions) (result *CategoriesModel, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) UpdateCategoriesModelWithContext(ctx context.Context, ...) (result *CategoriesModel, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) UpdateClassificationsModel(updateClassificationsModelOptions *UpdateClassificationsModelOptions) (result *ClassificationsModel, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) UpdateClassificationsModelWithContext(ctx context.Context, ...) (result *ClassificationsModel, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) UpdateSentimentModel(updateSentimentModelOptions *UpdateSentimentModelOptions) (result *SentimentModel, response *core.DetailedResponse, err error)
- func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) UpdateSentimentModelWithContext(ctx context.Context, updateSentimentModelOptions *UpdateSentimentModelOptions) (result *SentimentModel, response *core.DetailedResponse, err error)
- type NaturalLanguageUnderstandingV1Options
- type Notice
- type RelationArgument
- type RelationEntity
- type RelationsOptions
- type RelationsResult
- type SemanticRolesEntity
- type SemanticRolesKeyword
- type SemanticRolesOptions
- type SemanticRolesResult
- type SemanticRolesResultAction
- type SemanticRolesResultObject
- type SemanticRolesResultSubject
- type SemanticRolesVerb
- type SentenceResult
- type SentimentModel
- type SentimentOptions
- type SentimentResult
- type SummarizationOptions
- type SyntaxOptions
- type SyntaxOptionsTokens
- type SyntaxResult
- type TargetedEmotionResults
- type TargetedSentimentResults
- type TokenResult
- type UpdateCategoriesModelOptions
- func (_options *UpdateCategoriesModelOptions) SetDescription(description string) *UpdateCategoriesModelOptions
- func (options *UpdateCategoriesModelOptions) SetHeaders(param map[string]string) *UpdateCategoriesModelOptions
- func (_options *UpdateCategoriesModelOptions) SetLanguage(language string) *UpdateCategoriesModelOptions
- func (_options *UpdateCategoriesModelOptions) SetModelID(modelID string) *UpdateCategoriesModelOptions
- func (_options *UpdateCategoriesModelOptions) SetModelVersion(modelVersion string) *UpdateCategoriesModelOptions
- func (_options *UpdateCategoriesModelOptions) SetName(name string) *UpdateCategoriesModelOptions
- func (_options *UpdateCategoriesModelOptions) SetTrainingData(trainingData io.ReadCloser) *UpdateCategoriesModelOptions
- func (_options *UpdateCategoriesModelOptions) SetTrainingDataContentType(trainingDataContentType string) *UpdateCategoriesModelOptions
- func (_options *UpdateCategoriesModelOptions) SetUserMetadata(userMetadata map[string]interface{}) *UpdateCategoriesModelOptions
- func (_options *UpdateCategoriesModelOptions) SetVersionDescription(versionDescription string) *UpdateCategoriesModelOptions
- func (_options *UpdateCategoriesModelOptions) SetWorkspaceID(workspaceID string) *UpdateCategoriesModelOptions
- type UpdateClassificationsModelOptions
- func (_options *UpdateClassificationsModelOptions) SetDescription(description string) *UpdateClassificationsModelOptions
- func (options *UpdateClassificationsModelOptions) SetHeaders(param map[string]string) *UpdateClassificationsModelOptions
- func (_options *UpdateClassificationsModelOptions) SetLanguage(language string) *UpdateClassificationsModelOptions
- func (_options *UpdateClassificationsModelOptions) SetModelID(modelID string) *UpdateClassificationsModelOptions
- func (_options *UpdateClassificationsModelOptions) SetModelVersion(modelVersion string) *UpdateClassificationsModelOptions
- func (_options *UpdateClassificationsModelOptions) SetName(name string) *UpdateClassificationsModelOptions
- func (_options *UpdateClassificationsModelOptions) SetTrainingData(trainingData io.ReadCloser) *UpdateClassificationsModelOptions
- func (_options *UpdateClassificationsModelOptions) SetTrainingDataContentType(trainingDataContentType string) *UpdateClassificationsModelOptions
- func (_options *UpdateClassificationsModelOptions) SetUserMetadata(userMetadata map[string]interface{}) *UpdateClassificationsModelOptions
- func (_options *UpdateClassificationsModelOptions) SetVersionDescription(versionDescription string) *UpdateClassificationsModelOptions
- func (_options *UpdateClassificationsModelOptions) SetWorkspaceID(workspaceID string) *UpdateClassificationsModelOptions
- type UpdateSentimentModelOptions
- func (_options *UpdateSentimentModelOptions) SetDescription(description string) *UpdateSentimentModelOptions
- func (options *UpdateSentimentModelOptions) SetHeaders(param map[string]string) *UpdateSentimentModelOptions
- func (_options *UpdateSentimentModelOptions) SetLanguage(language string) *UpdateSentimentModelOptions
- func (_options *UpdateSentimentModelOptions) SetModelID(modelID string) *UpdateSentimentModelOptions
- func (_options *UpdateSentimentModelOptions) SetModelVersion(modelVersion string) *UpdateSentimentModelOptions
- func (_options *UpdateSentimentModelOptions) SetName(name string) *UpdateSentimentModelOptions
- func (_options *UpdateSentimentModelOptions) SetTrainingData(trainingData io.ReadCloser) *UpdateSentimentModelOptions
- func (_options *UpdateSentimentModelOptions) SetUserMetadata(userMetadata map[string]interface{}) *UpdateSentimentModelOptions
- func (_options *UpdateSentimentModelOptions) SetVersionDescription(versionDescription string) *UpdateSentimentModelOptions
- func (_options *UpdateSentimentModelOptions) SetWorkspaceID(workspaceID string) *UpdateSentimentModelOptions
Constants ¶
const ( CategoriesModelStatusAvailableConst = "available" CategoriesModelStatusDeletedConst = "deleted" CategoriesModelStatusDeployingConst = "deploying" CategoriesModelStatusErrorConst = "error" CategoriesModelStatusStartingConst = "starting" CategoriesModelStatusTrainingConst = "training" )
Constants associated with the CategoriesModel.Status property. When the status is `available`, the model is ready to use.
const ( ClassificationsModelStatusAvailableConst = "available" ClassificationsModelStatusDeletedConst = "deleted" ClassificationsModelStatusDeployingConst = "deploying" ClassificationsModelStatusErrorConst = "error" ClassificationsModelStatusStartingConst = "starting" ClassificationsModelStatusTrainingConst = "training" )
Constants associated with the ClassificationsModel.Status property. When the status is `available`, the model is ready to use.
const ( ModelStatusAvailableConst = "available" ModelStatusDeletedConst = "deleted" ModelStatusDeployingConst = "deploying" ModelStatusErrorConst = "error" ModelStatusStartingConst = "starting" ModelStatusTrainingConst = "training" )
Constants associated with the Model.Status property. When the status is `available`, the model is ready to use.
const ( SentimentModelStatusAvailableConst = "available" SentimentModelStatusDeletedConst = "deleted" SentimentModelStatusDeployingConst = "deploying" SentimentModelStatusErrorConst = "error" SentimentModelStatusStartingConst = "starting" SentimentModelStatusTrainingConst = "training" )
Constants associated with the SentimentModel.Status property. When the status is `available`, the model is ready to use.
const ( TokenResultPartOfSpeechAdjConst = "ADJ" TokenResultPartOfSpeechAdpConst = "ADP" TokenResultPartOfSpeechAdvConst = "ADV" TokenResultPartOfSpeechAuxConst = "AUX" TokenResultPartOfSpeechCconjConst = "CCONJ" TokenResultPartOfSpeechDetConst = "DET" TokenResultPartOfSpeechIntjConst = "INTJ" TokenResultPartOfSpeechNounConst = "NOUN" TokenResultPartOfSpeechNumConst = "NUM" TokenResultPartOfSpeechPartConst = "PART" TokenResultPartOfSpeechPronConst = "PRON" TokenResultPartOfSpeechPropnConst = "PROPN" TokenResultPartOfSpeechPunctConst = "PUNCT" TokenResultPartOfSpeechSconjConst = "SCONJ" TokenResultPartOfSpeechSymConst = "SYM" TokenResultPartOfSpeechVerbConst = "VERB" TokenResultPartOfSpeechXConst = "X" )
Constants associated with the TokenResult.PartOfSpeech property. The part of speech of the token. For more information about the values, see [Universal Dependencies POS tags](https://universaldependencies.org/u/pos/).
const DefaultServiceName = "natural-language-understanding"
DefaultServiceName is the default key used to find external configuration information.
const DefaultServiceURL = "https://api.us-south.natural-language-understanding.watson.cloud.ibm.com"
DefaultServiceURL is the default URL to make service requests to.
Variables ¶
This section is empty.
Functions ¶
func GetServiceURLForRegion ¶
GetServiceURLForRegion returns the service URL to be used for the specified region
func UnmarshalAnalysisResults ¶
func UnmarshalAnalysisResults(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalAnalysisResults unmarshals an instance of AnalysisResults from the specified map of raw messages.
func UnmarshalAnalysisResultsUsage ¶
func UnmarshalAnalysisResultsUsage(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalAnalysisResultsUsage unmarshals an instance of AnalysisResultsUsage from the specified map of raw messages.
func UnmarshalAuthor ¶
func UnmarshalAuthor(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalAuthor unmarshals an instance of Author from the specified map of raw messages.
func UnmarshalCategoriesModel ¶ added in v2.1.0
func UnmarshalCategoriesModel(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalCategoriesModel unmarshals an instance of CategoriesModel from the specified map of raw messages.
func UnmarshalCategoriesModelList ¶ added in v2.1.0
func UnmarshalCategoriesModelList(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalCategoriesModelList unmarshals an instance of CategoriesModelList from the specified map of raw messages.
func UnmarshalCategoriesOptions ¶
func UnmarshalCategoriesOptions(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalCategoriesOptions unmarshals an instance of CategoriesOptions from the specified map of raw messages.
func UnmarshalCategoriesRelevantText ¶
func UnmarshalCategoriesRelevantText(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalCategoriesRelevantText unmarshals an instance of CategoriesRelevantText from the specified map of raw messages.
func UnmarshalCategoriesResult ¶
func UnmarshalCategoriesResult(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalCategoriesResult unmarshals an instance of CategoriesResult from the specified map of raw messages.
func UnmarshalCategoriesResultExplanation ¶
func UnmarshalCategoriesResultExplanation(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalCategoriesResultExplanation unmarshals an instance of CategoriesResultExplanation from the specified map of raw messages.
func UnmarshalClassificationsModel ¶ added in v2.1.0
func UnmarshalClassificationsModel(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalClassificationsModel unmarshals an instance of ClassificationsModel from the specified map of raw messages.
func UnmarshalClassificationsModelList ¶ added in v2.1.0
func UnmarshalClassificationsModelList(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalClassificationsModelList unmarshals an instance of ClassificationsModelList from the specified map of raw messages.
func UnmarshalClassificationsOptions ¶ added in v2.1.0
func UnmarshalClassificationsOptions(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalClassificationsOptions unmarshals an instance of ClassificationsOptions from the specified map of raw messages.
func UnmarshalClassificationsResult ¶ added in v2.1.0
func UnmarshalClassificationsResult(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalClassificationsResult unmarshals an instance of ClassificationsResult from the specified map of raw messages.
func UnmarshalConceptsOptions ¶
func UnmarshalConceptsOptions(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalConceptsOptions unmarshals an instance of ConceptsOptions from the specified map of raw messages.
func UnmarshalConceptsResult ¶
func UnmarshalConceptsResult(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalConceptsResult unmarshals an instance of ConceptsResult from the specified map of raw messages.
func UnmarshalDeleteModelResults ¶
func UnmarshalDeleteModelResults(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalDeleteModelResults unmarshals an instance of DeleteModelResults from the specified map of raw messages.
func UnmarshalDisambiguationResult ¶
func UnmarshalDisambiguationResult(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalDisambiguationResult unmarshals an instance of DisambiguationResult from the specified map of raw messages.
func UnmarshalDocumentEmotionResults ¶
func UnmarshalDocumentEmotionResults(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalDocumentEmotionResults unmarshals an instance of DocumentEmotionResults from the specified map of raw messages.
func UnmarshalDocumentSentimentResults ¶
func UnmarshalDocumentSentimentResults(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalDocumentSentimentResults unmarshals an instance of DocumentSentimentResults from the specified map of raw messages.
func UnmarshalEmotionOptions ¶
func UnmarshalEmotionOptions(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalEmotionOptions unmarshals an instance of EmotionOptions from the specified map of raw messages.
func UnmarshalEmotionResult ¶
func UnmarshalEmotionResult(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalEmotionResult unmarshals an instance of EmotionResult from the specified map of raw messages.
func UnmarshalEmotionScores ¶
func UnmarshalEmotionScores(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalEmotionScores unmarshals an instance of EmotionScores from the specified map of raw messages.
func UnmarshalEntitiesOptions ¶
func UnmarshalEntitiesOptions(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalEntitiesOptions unmarshals an instance of EntitiesOptions from the specified map of raw messages.
func UnmarshalEntitiesResult ¶
func UnmarshalEntitiesResult(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalEntitiesResult unmarshals an instance of EntitiesResult from the specified map of raw messages.
func UnmarshalEntityMention ¶
func UnmarshalEntityMention(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalEntityMention unmarshals an instance of EntityMention from the specified map of raw messages.
func UnmarshalFeatureSentimentResults ¶
func UnmarshalFeatureSentimentResults(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalFeatureSentimentResults unmarshals an instance of FeatureSentimentResults from the specified map of raw messages.
func UnmarshalFeatures ¶
func UnmarshalFeatures(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalFeatures unmarshals an instance of Features from the specified map of raw messages.
func UnmarshalFeaturesResultsMetadata ¶
func UnmarshalFeaturesResultsMetadata(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalFeaturesResultsMetadata unmarshals an instance of FeaturesResultsMetadata from the specified map of raw messages.
func UnmarshalFeed ¶
func UnmarshalFeed(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalFeed unmarshals an instance of Feed from the specified map of raw messages.
func UnmarshalKeywordsOptions ¶
func UnmarshalKeywordsOptions(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalKeywordsOptions unmarshals an instance of KeywordsOptions from the specified map of raw messages.
func UnmarshalKeywordsResult ¶
func UnmarshalKeywordsResult(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalKeywordsResult unmarshals an instance of KeywordsResult from the specified map of raw messages.
func UnmarshalListModelsResults ¶
func UnmarshalListModelsResults(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalListModelsResults unmarshals an instance of ListModelsResults from the specified map of raw messages.
func UnmarshalListSentimentModelsResponse ¶ added in v2.1.0
func UnmarshalListSentimentModelsResponse(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalListSentimentModelsResponse unmarshals an instance of ListSentimentModelsResponse from the specified map of raw messages.
func UnmarshalMetadataOptions ¶ added in v2.1.0
func UnmarshalMetadataOptions(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalMetadataOptions unmarshals an instance of MetadataOptions from the specified map of raw messages.
func UnmarshalModel ¶
func UnmarshalModel(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalModel unmarshals an instance of Model from the specified map of raw messages.
func UnmarshalNotice ¶ added in v2.1.0
func UnmarshalNotice(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalNotice unmarshals an instance of Notice from the specified map of raw messages.
func UnmarshalRelationArgument ¶
func UnmarshalRelationArgument(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalRelationArgument unmarshals an instance of RelationArgument from the specified map of raw messages.
func UnmarshalRelationEntity ¶
func UnmarshalRelationEntity(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalRelationEntity unmarshals an instance of RelationEntity from the specified map of raw messages.
func UnmarshalRelationsOptions ¶
func UnmarshalRelationsOptions(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalRelationsOptions unmarshals an instance of RelationsOptions from the specified map of raw messages.
func UnmarshalRelationsResult ¶
func UnmarshalRelationsResult(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalRelationsResult unmarshals an instance of RelationsResult from the specified map of raw messages.
func UnmarshalSemanticRolesEntity ¶
func UnmarshalSemanticRolesEntity(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalSemanticRolesEntity unmarshals an instance of SemanticRolesEntity from the specified map of raw messages.
func UnmarshalSemanticRolesKeyword ¶
func UnmarshalSemanticRolesKeyword(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalSemanticRolesKeyword unmarshals an instance of SemanticRolesKeyword from the specified map of raw messages.
func UnmarshalSemanticRolesOptions ¶
func UnmarshalSemanticRolesOptions(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalSemanticRolesOptions unmarshals an instance of SemanticRolesOptions from the specified map of raw messages.
func UnmarshalSemanticRolesResult ¶
func UnmarshalSemanticRolesResult(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalSemanticRolesResult unmarshals an instance of SemanticRolesResult from the specified map of raw messages.
func UnmarshalSemanticRolesResultAction ¶
func UnmarshalSemanticRolesResultAction(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalSemanticRolesResultAction unmarshals an instance of SemanticRolesResultAction from the specified map of raw messages.
func UnmarshalSemanticRolesResultObject ¶
func UnmarshalSemanticRolesResultObject(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalSemanticRolesResultObject unmarshals an instance of SemanticRolesResultObject from the specified map of raw messages.
func UnmarshalSemanticRolesResultSubject ¶
func UnmarshalSemanticRolesResultSubject(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalSemanticRolesResultSubject unmarshals an instance of SemanticRolesResultSubject from the specified map of raw messages.
func UnmarshalSemanticRolesVerb ¶
func UnmarshalSemanticRolesVerb(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalSemanticRolesVerb unmarshals an instance of SemanticRolesVerb from the specified map of raw messages.
func UnmarshalSentenceResult ¶
func UnmarshalSentenceResult(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalSentenceResult unmarshals an instance of SentenceResult from the specified map of raw messages.
func UnmarshalSentimentModel ¶ added in v2.1.0
func UnmarshalSentimentModel(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalSentimentModel unmarshals an instance of SentimentModel from the specified map of raw messages.
func UnmarshalSentimentOptions ¶
func UnmarshalSentimentOptions(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalSentimentOptions unmarshals an instance of SentimentOptions from the specified map of raw messages.
func UnmarshalSentimentResult ¶
func UnmarshalSentimentResult(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalSentimentResult unmarshals an instance of SentimentResult from the specified map of raw messages.
func UnmarshalSummarizationOptions ¶ added in v2.1.0
func UnmarshalSummarizationOptions(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalSummarizationOptions unmarshals an instance of SummarizationOptions from the specified map of raw messages.
func UnmarshalSyntaxOptions ¶
func UnmarshalSyntaxOptions(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalSyntaxOptions unmarshals an instance of SyntaxOptions from the specified map of raw messages.
func UnmarshalSyntaxOptionsTokens ¶
func UnmarshalSyntaxOptionsTokens(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalSyntaxOptionsTokens unmarshals an instance of SyntaxOptionsTokens from the specified map of raw messages.
func UnmarshalSyntaxResult ¶
func UnmarshalSyntaxResult(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalSyntaxResult unmarshals an instance of SyntaxResult from the specified map of raw messages.
func UnmarshalTargetedEmotionResults ¶
func UnmarshalTargetedEmotionResults(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalTargetedEmotionResults unmarshals an instance of TargetedEmotionResults from the specified map of raw messages.
func UnmarshalTargetedSentimentResults ¶
func UnmarshalTargetedSentimentResults(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalTargetedSentimentResults unmarshals an instance of TargetedSentimentResults from the specified map of raw messages.
func UnmarshalTokenResult ¶
func UnmarshalTokenResult(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalTokenResult unmarshals an instance of TokenResult from the specified map of raw messages.
Types ¶
type AnalysisResults ¶
type AnalysisResults struct { // Language used to analyze the text. Language *string `json:"language,omitempty"` // Text that was used in the analysis. AnalyzedText *string `json:"analyzed_text,omitempty"` // URL of the webpage that was analyzed. RetrievedURL *string `json:"retrieved_url,omitempty"` // API usage information for the request. Usage *AnalysisResultsUsage `json:"usage,omitempty"` // The general concepts referenced or alluded to in the analyzed text. Concepts []ConceptsResult `json:"concepts,omitempty"` // The entities detected in the analyzed text. Entities []EntitiesResult `json:"entities,omitempty"` // The keywords from the analyzed text. Keywords []KeywordsResult `json:"keywords,omitempty"` // The categories that the service assigned to the analyzed text. Categories []CategoriesResult `json:"categories,omitempty"` // The classifications assigned to the analyzed text. Classifications []ClassificationsResult `json:"classifications,omitempty"` // The anger, disgust, fear, joy, or sadness conveyed by the content. Emotion *EmotionResult `json:"emotion,omitempty"` // Webpage metadata, such as the author and the title of the page. Metadata *FeaturesResultsMetadata `json:"metadata,omitempty"` // The relationships between entities in the content. Relations []RelationsResult `json:"relations,omitempty"` // Sentences parsed into `subject`, `action`, and `object` form. SemanticRoles []SemanticRolesResult `json:"semantic_roles,omitempty"` // The sentiment of the content. Sentiment *SentimentResult `json:"sentiment,omitempty"` // Tokens and sentences returned from syntax analysis. Syntax *SyntaxResult `json:"syntax,omitempty"` }
AnalysisResults : Results of the analysis, organized by feature.
type AnalysisResultsUsage ¶
type AnalysisResultsUsage struct { // Number of features used in the API call. Features *int64 `json:"features,omitempty"` // Number of text characters processed. TextCharacters *int64 `json:"text_characters,omitempty"` // Number of 10,000-character units processed. TextUnits *int64 `json:"text_units,omitempty"` }
AnalysisResultsUsage : API usage information for the request.
type AnalyzeOptions ¶
type AnalyzeOptions struct { // Specific features to analyze the document for. Features *Features `json:"features" validate:"required"` // The plain text to analyze. One of the `text`, `html`, or `url` parameters is required. Text *string `json:"text,omitempty"` // The HTML file to analyze. One of the `text`, `html`, or `url` parameters is required. HTML *string `json:"html,omitempty"` // The webpage to analyze. One of the `text`, `html`, or `url` parameters is required. URL *string `json:"url,omitempty"` // Set this to `false` to disable webpage cleaning. For more information about webpage cleaning, see [Analyzing // webpages](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-analyzing-webpages). Clean *bool `json:"clean,omitempty"` // An [XPath // query](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-analyzing-webpages#xpath) // to perform on `html` or `url` input. Results of the query will be appended to the cleaned webpage text before it is // analyzed. To analyze only the results of the XPath query, set the `clean` parameter to `false`. Xpath *string `json:"xpath,omitempty"` // Whether to use raw HTML content if text cleaning fails. FallbackToRaw *bool `json:"fallback_to_raw,omitempty"` // Whether or not to return the analyzed text. ReturnAnalyzedText *bool `json:"return_analyzed_text,omitempty"` // ISO 639-1 code that specifies the language of your text. This overrides automatic language detection. Language // support differs depending on the features you include in your analysis. For more information, see [Language // support](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-language-support). Language *string `json:"language,omitempty"` // Sets the maximum number of characters that are processed by the service. LimitTextCharacters *int64 `json:"limit_text_characters,omitempty"` // Allows users to set headers on API requests Headers map[string]string }
AnalyzeOptions : The Analyze options.
func (*AnalyzeOptions) SetClean ¶
func (_options *AnalyzeOptions) SetClean(clean bool) *AnalyzeOptions
SetClean : Allow user to set Clean
func (*AnalyzeOptions) SetFallbackToRaw ¶
func (_options *AnalyzeOptions) SetFallbackToRaw(fallbackToRaw bool) *AnalyzeOptions
SetFallbackToRaw : Allow user to set FallbackToRaw
func (*AnalyzeOptions) SetFeatures ¶
func (_options *AnalyzeOptions) SetFeatures(features *Features) *AnalyzeOptions
SetFeatures : Allow user to set Features
func (*AnalyzeOptions) SetHTML ¶
func (_options *AnalyzeOptions) SetHTML(html string) *AnalyzeOptions
SetHTML : Allow user to set HTML
func (*AnalyzeOptions) SetHeaders ¶
func (options *AnalyzeOptions) SetHeaders(param map[string]string) *AnalyzeOptions
SetHeaders : Allow user to set Headers
func (*AnalyzeOptions) SetLanguage ¶
func (_options *AnalyzeOptions) SetLanguage(language string) *AnalyzeOptions
SetLanguage : Allow user to set Language
func (*AnalyzeOptions) SetLimitTextCharacters ¶
func (_options *AnalyzeOptions) SetLimitTextCharacters(limitTextCharacters int64) *AnalyzeOptions
SetLimitTextCharacters : Allow user to set LimitTextCharacters
func (*AnalyzeOptions) SetReturnAnalyzedText ¶
func (_options *AnalyzeOptions) SetReturnAnalyzedText(returnAnalyzedText bool) *AnalyzeOptions
SetReturnAnalyzedText : Allow user to set ReturnAnalyzedText
func (*AnalyzeOptions) SetText ¶
func (_options *AnalyzeOptions) SetText(text string) *AnalyzeOptions
SetText : Allow user to set Text
func (*AnalyzeOptions) SetURL ¶
func (_options *AnalyzeOptions) SetURL(url string) *AnalyzeOptions
SetURL : Allow user to set URL
func (*AnalyzeOptions) SetXpath ¶
func (_options *AnalyzeOptions) SetXpath(xpath string) *AnalyzeOptions
SetXpath : Allow user to set Xpath
type Author ¶
type Author struct { // Name of the author. Name *string `json:"name,omitempty"` }
Author : The author of the analyzed content.
type CategoriesModel ¶ added in v2.1.0
type CategoriesModel struct { // An optional name for the model. Name *string `json:"name,omitempty"` // An optional map of metadata key-value pairs to store with this model. UserMetadata map[string]interface{} `json:"user_metadata,omitempty"` // The 2-letter language code of this model. Language *string `json:"language" validate:"required"` // An optional description of the model. Description *string `json:"description,omitempty"` // An optional version string. ModelVersion *string `json:"model_version,omitempty"` // ID of the Watson Knowledge Studio workspace that deployed this model to Natural Language Understanding. WorkspaceID *string `json:"workspace_id,omitempty"` // The description of the version. VersionDescription *string `json:"version_description,omitempty"` // The service features that are supported by the custom model. Features []string `json:"features,omitempty"` // When the status is `available`, the model is ready to use. Status *string `json:"status" validate:"required"` // Unique model ID. ModelID *string `json:"model_id" validate:"required"` // dateTime indicating when the model was created. Created *strfmt.DateTime `json:"created" validate:"required"` Notices []Notice `json:"notices,omitempty"` // dateTime of last successful model training. LastTrained *strfmt.DateTime `json:"last_trained,omitempty"` // dateTime of last successful model deployment. LastDeployed *strfmt.DateTime `json:"last_deployed,omitempty"` }
CategoriesModel : Categories model.
type CategoriesModelList ¶ added in v2.1.0
type CategoriesModelList struct { // The categories models. Models []CategoriesModel `json:"models,omitempty"` }
CategoriesModelList : List of categories models.
type CategoriesOptions ¶
type CategoriesOptions struct { // Set this to `true` to return explanations for each categorization. **This is available only for English // categories.**. Explanation *bool `json:"explanation,omitempty"` // Maximum number of categories to return. Limit *int64 `json:"limit,omitempty"` // (Beta) Enter a [custom // model](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing) // ID to override the standard categories model. **This is available only for English categories.**. Model *string `json:"model,omitempty"` }
CategoriesOptions : Returns a hierarchical taxonomy of the content. The top three categories are returned by default.
Supported languages: Arabic, English, French, German, Italian, Japanese, Korean, Portuguese, Spanish.
type CategoriesRelevantText ¶
type CategoriesRelevantText struct { // Text from the analyzed source that supports the categorization. Text *string `json:"text,omitempty"` }
CategoriesRelevantText : Relevant text that contributed to the categorization.
type CategoriesResult ¶
type CategoriesResult struct { // The path to the category through the multi-level taxonomy hierarchy. For more information about the categories, see // [Categories // hierarchy](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-categories#categories-hierarchy). Label *string `json:"label,omitempty"` // Confidence score for the category classification. Higher values indicate greater confidence. Score *float64 `json:"score,omitempty"` // Information that helps to explain what contributed to the categories result. Explanation *CategoriesResultExplanation `json:"explanation,omitempty"` }
CategoriesResult : A categorization of the analyzed text.
type CategoriesResultExplanation ¶
type CategoriesResultExplanation struct { // An array of relevant text from the source that contributed to the categorization. The sorted array begins with the // phrase that contributed most significantly to the result, followed by phrases that were less and less impactful. RelevantText []CategoriesRelevantText `json:"relevant_text,omitempty"` }
CategoriesResultExplanation : Information that helps to explain what contributed to the categories result.
type ClassificationsModel ¶ added in v2.1.0
type ClassificationsModel struct { // An optional name for the model. Name *string `json:"name,omitempty"` // An optional map of metadata key-value pairs to store with this model. UserMetadata map[string]interface{} `json:"user_metadata,omitempty"` // The 2-letter language code of this model. Language *string `json:"language" validate:"required"` // An optional description of the model. Description *string `json:"description,omitempty"` // An optional version string. ModelVersion *string `json:"model_version,omitempty"` // ID of the Watson Knowledge Studio workspace that deployed this model to Natural Language Understanding. WorkspaceID *string `json:"workspace_id,omitempty"` // The description of the version. VersionDescription *string `json:"version_description,omitempty"` // The service features that are supported by the custom model. Features []string `json:"features,omitempty"` // When the status is `available`, the model is ready to use. Status *string `json:"status" validate:"required"` // Unique model ID. ModelID *string `json:"model_id" validate:"required"` // dateTime indicating when the model was created. Created *strfmt.DateTime `json:"created" validate:"required"` Notices []Notice `json:"notices,omitempty"` // dateTime of last successful model training. LastTrained *strfmt.DateTime `json:"last_trained,omitempty"` // dateTime of last successful model deployment. LastDeployed *strfmt.DateTime `json:"last_deployed,omitempty"` }
ClassificationsModel : Classifications model.
type ClassificationsModelList ¶ added in v2.1.0
type ClassificationsModelList struct { // The classifications models. Models []ClassificationsModel `json:"models,omitempty"` }
ClassificationsModelList : List of classifications models.
type ClassificationsOptions ¶ added in v2.1.0
type ClassificationsOptions struct { // Enter a [custom // model](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing) // ID of the classification model to be used. Model *string `json:"model,omitempty"` }
ClassificationsOptions : Returns text classifications for the content.
Supported languages: English only.
type ClassificationsResult ¶ added in v2.1.0
type ClassificationsResult struct { // Classification assigned to the text. ClassName *string `json:"class_name,omitempty"` // Confidence score for the classification. Higher values indicate greater confidence. Confidence *float64 `json:"confidence,omitempty"` }
ClassificationsResult : A classification of the analyzed text.
type ConceptsOptions ¶
type ConceptsOptions struct { // Maximum number of concepts to return. Limit *int64 `json:"limit,omitempty"` }
ConceptsOptions : Returns high-level concepts in the content. For example, a research paper about deep learning might return the concept, "Artificial Intelligence" although the term is not mentioned.
Supported languages: English, French, German, Italian, Japanese, Korean, Portuguese, Spanish.
type ConceptsResult ¶
type ConceptsResult struct { // Name of the concept. Text *string `json:"text,omitempty"` // Relevance score between 0 and 1. Higher scores indicate greater relevance. Relevance *float64 `json:"relevance,omitempty"` // Link to the corresponding DBpedia resource. DbpediaResource *string `json:"dbpedia_resource,omitempty"` }
ConceptsResult : The general concepts referenced or alluded to in the analyzed text.
type CreateCategoriesModelOptions ¶ added in v2.1.0
type CreateCategoriesModelOptions struct { // The 2-letter language code of this model. Language *string `json:"-" validate:"required"` // Training data in JSON format. For more information, see [Categories training data // requirements](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-categories##categories-training-data-requirements). TrainingData io.ReadCloser `json:"-" validate:"required"` // The content type of trainingData. TrainingDataContentType *string `json:"-"` // An optional name for the model. Name *string `json:"-"` // An optional map of metadata key-value pairs to store with this model. UserMetadata map[string]interface{} `json:"-"` // An optional description of the model. Description *string `json:"-"` // An optional version string. ModelVersion *string `json:"-"` // ID of the Watson Knowledge Studio workspace that deployed this model to Natural Language Understanding. WorkspaceID *string `json:"-"` // The description of the version. VersionDescription *string `json:"-"` // Allows users to set headers on API requests Headers map[string]string }
CreateCategoriesModelOptions : The CreateCategoriesModel options.
func (*CreateCategoriesModelOptions) SetDescription ¶ added in v2.1.0
func (_options *CreateCategoriesModelOptions) SetDescription(description string) *CreateCategoriesModelOptions
SetDescription : Allow user to set Description
func (*CreateCategoriesModelOptions) SetHeaders ¶ added in v2.1.0
func (options *CreateCategoriesModelOptions) SetHeaders(param map[string]string) *CreateCategoriesModelOptions
SetHeaders : Allow user to set Headers
func (*CreateCategoriesModelOptions) SetLanguage ¶ added in v2.1.0
func (_options *CreateCategoriesModelOptions) SetLanguage(language string) *CreateCategoriesModelOptions
SetLanguage : Allow user to set Language
func (*CreateCategoriesModelOptions) SetModelVersion ¶ added in v2.1.0
func (_options *CreateCategoriesModelOptions) SetModelVersion(modelVersion string) *CreateCategoriesModelOptions
SetModelVersion : Allow user to set ModelVersion
func (*CreateCategoriesModelOptions) SetName ¶ added in v2.1.0
func (_options *CreateCategoriesModelOptions) SetName(name string) *CreateCategoriesModelOptions
SetName : Allow user to set Name
func (*CreateCategoriesModelOptions) SetTrainingData ¶ added in v2.1.0
func (_options *CreateCategoriesModelOptions) SetTrainingData(trainingData io.ReadCloser) *CreateCategoriesModelOptions
SetTrainingData : Allow user to set TrainingData
func (*CreateCategoriesModelOptions) SetTrainingDataContentType ¶ added in v2.1.0
func (_options *CreateCategoriesModelOptions) SetTrainingDataContentType(trainingDataContentType string) *CreateCategoriesModelOptions
SetTrainingDataContentType : Allow user to set TrainingDataContentType
func (*CreateCategoriesModelOptions) SetUserMetadata ¶ added in v2.1.0
func (_options *CreateCategoriesModelOptions) SetUserMetadata(userMetadata map[string]interface{}) *CreateCategoriesModelOptions
SetUserMetadata : Allow user to set UserMetadata
func (*CreateCategoriesModelOptions) SetVersionDescription ¶ added in v2.1.0
func (_options *CreateCategoriesModelOptions) SetVersionDescription(versionDescription string) *CreateCategoriesModelOptions
SetVersionDescription : Allow user to set VersionDescription
func (*CreateCategoriesModelOptions) SetWorkspaceID ¶ added in v2.1.0
func (_options *CreateCategoriesModelOptions) SetWorkspaceID(workspaceID string) *CreateCategoriesModelOptions
SetWorkspaceID : Allow user to set WorkspaceID
type CreateClassificationsModelOptions ¶ added in v2.1.0
type CreateClassificationsModelOptions struct { // The 2-letter language code of this model. Language *string `json:"-" validate:"required"` // Training data in JSON format. For more information, see [Classifications training data // requirements](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-classifications#classification-training-data-requirements). TrainingData io.ReadCloser `json:"-" validate:"required"` // The content type of trainingData. TrainingDataContentType *string `json:"-"` // An optional name for the model. Name *string `json:"-"` // An optional map of metadata key-value pairs to store with this model. UserMetadata map[string]interface{} `json:"-"` // An optional description of the model. Description *string `json:"-"` // An optional version string. ModelVersion *string `json:"-"` // ID of the Watson Knowledge Studio workspace that deployed this model to Natural Language Understanding. WorkspaceID *string `json:"-"` // The description of the version. VersionDescription *string `json:"-"` // Allows users to set headers on API requests Headers map[string]string }
CreateClassificationsModelOptions : The CreateClassificationsModel options.
func (*CreateClassificationsModelOptions) SetDescription ¶ added in v2.1.0
func (_options *CreateClassificationsModelOptions) SetDescription(description string) *CreateClassificationsModelOptions
SetDescription : Allow user to set Description
func (*CreateClassificationsModelOptions) SetHeaders ¶ added in v2.1.0
func (options *CreateClassificationsModelOptions) SetHeaders(param map[string]string) *CreateClassificationsModelOptions
SetHeaders : Allow user to set Headers
func (*CreateClassificationsModelOptions) SetLanguage ¶ added in v2.1.0
func (_options *CreateClassificationsModelOptions) SetLanguage(language string) *CreateClassificationsModelOptions
SetLanguage : Allow user to set Language
func (*CreateClassificationsModelOptions) SetModelVersion ¶ added in v2.1.0
func (_options *CreateClassificationsModelOptions) SetModelVersion(modelVersion string) *CreateClassificationsModelOptions
SetModelVersion : Allow user to set ModelVersion
func (*CreateClassificationsModelOptions) SetName ¶ added in v2.1.0
func (_options *CreateClassificationsModelOptions) SetName(name string) *CreateClassificationsModelOptions
SetName : Allow user to set Name
func (*CreateClassificationsModelOptions) SetTrainingData ¶ added in v2.1.0
func (_options *CreateClassificationsModelOptions) SetTrainingData(trainingData io.ReadCloser) *CreateClassificationsModelOptions
SetTrainingData : Allow user to set TrainingData
func (*CreateClassificationsModelOptions) SetTrainingDataContentType ¶ added in v2.1.0
func (_options *CreateClassificationsModelOptions) SetTrainingDataContentType(trainingDataContentType string) *CreateClassificationsModelOptions
SetTrainingDataContentType : Allow user to set TrainingDataContentType
func (*CreateClassificationsModelOptions) SetUserMetadata ¶ added in v2.1.0
func (_options *CreateClassificationsModelOptions) SetUserMetadata(userMetadata map[string]interface{}) *CreateClassificationsModelOptions
SetUserMetadata : Allow user to set UserMetadata
func (*CreateClassificationsModelOptions) SetVersionDescription ¶ added in v2.1.0
func (_options *CreateClassificationsModelOptions) SetVersionDescription(versionDescription string) *CreateClassificationsModelOptions
SetVersionDescription : Allow user to set VersionDescription
func (*CreateClassificationsModelOptions) SetWorkspaceID ¶ added in v2.1.0
func (_options *CreateClassificationsModelOptions) SetWorkspaceID(workspaceID string) *CreateClassificationsModelOptions
SetWorkspaceID : Allow user to set WorkspaceID
type CreateSentimentModelOptions ¶ added in v2.1.0
type CreateSentimentModelOptions struct { // The 2-letter language code of this model. Language *string `json:"-" validate:"required"` // Training data in CSV format. For more information, see [Sentiment training data // requirements](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-custom-sentiment#sentiment-training-data-requirements). TrainingData io.ReadCloser `json:"-" validate:"required"` // An optional name for the model. Name *string `json:"-"` // An optional map of metadata key-value pairs to store with this model. UserMetadata map[string]interface{} `json:"-"` // An optional description of the model. Description *string `json:"-"` // An optional version string. ModelVersion *string `json:"-"` // ID of the Watson Knowledge Studio workspace that deployed this model to Natural Language Understanding. WorkspaceID *string `json:"-"` // The description of the version. VersionDescription *string `json:"-"` // Allows users to set headers on API requests Headers map[string]string }
CreateSentimentModelOptions : The CreateSentimentModel options.
func (*CreateSentimentModelOptions) SetDescription ¶ added in v2.1.0
func (_options *CreateSentimentModelOptions) SetDescription(description string) *CreateSentimentModelOptions
SetDescription : Allow user to set Description
func (*CreateSentimentModelOptions) SetHeaders ¶ added in v2.1.0
func (options *CreateSentimentModelOptions) SetHeaders(param map[string]string) *CreateSentimentModelOptions
SetHeaders : Allow user to set Headers
func (*CreateSentimentModelOptions) SetLanguage ¶ added in v2.1.0
func (_options *CreateSentimentModelOptions) SetLanguage(language string) *CreateSentimentModelOptions
SetLanguage : Allow user to set Language
func (*CreateSentimentModelOptions) SetModelVersion ¶ added in v2.1.0
func (_options *CreateSentimentModelOptions) SetModelVersion(modelVersion string) *CreateSentimentModelOptions
SetModelVersion : Allow user to set ModelVersion
func (*CreateSentimentModelOptions) SetName ¶ added in v2.1.0
func (_options *CreateSentimentModelOptions) SetName(name string) *CreateSentimentModelOptions
SetName : Allow user to set Name
func (*CreateSentimentModelOptions) SetTrainingData ¶ added in v2.1.0
func (_options *CreateSentimentModelOptions) SetTrainingData(trainingData io.ReadCloser) *CreateSentimentModelOptions
SetTrainingData : Allow user to set TrainingData
func (*CreateSentimentModelOptions) SetUserMetadata ¶ added in v2.1.0
func (_options *CreateSentimentModelOptions) SetUserMetadata(userMetadata map[string]interface{}) *CreateSentimentModelOptions
SetUserMetadata : Allow user to set UserMetadata
func (*CreateSentimentModelOptions) SetVersionDescription ¶ added in v2.1.0
func (_options *CreateSentimentModelOptions) SetVersionDescription(versionDescription string) *CreateSentimentModelOptions
SetVersionDescription : Allow user to set VersionDescription
func (*CreateSentimentModelOptions) SetWorkspaceID ¶ added in v2.1.0
func (_options *CreateSentimentModelOptions) SetWorkspaceID(workspaceID string) *CreateSentimentModelOptions
SetWorkspaceID : Allow user to set WorkspaceID
type DeleteCategoriesModelOptions ¶ added in v2.1.0
type DeleteCategoriesModelOptions struct { // ID of the model. ModelID *string `json:"-" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string }
DeleteCategoriesModelOptions : The DeleteCategoriesModel options.
func (*DeleteCategoriesModelOptions) SetHeaders ¶ added in v2.1.0
func (options *DeleteCategoriesModelOptions) SetHeaders(param map[string]string) *DeleteCategoriesModelOptions
SetHeaders : Allow user to set Headers
func (*DeleteCategoriesModelOptions) SetModelID ¶ added in v2.1.0
func (_options *DeleteCategoriesModelOptions) SetModelID(modelID string) *DeleteCategoriesModelOptions
SetModelID : Allow user to set ModelID
type DeleteClassificationsModelOptions ¶ added in v2.1.0
type DeleteClassificationsModelOptions struct { // ID of the model. ModelID *string `json:"-" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string }
DeleteClassificationsModelOptions : The DeleteClassificationsModel options.
func (*DeleteClassificationsModelOptions) SetHeaders ¶ added in v2.1.0
func (options *DeleteClassificationsModelOptions) SetHeaders(param map[string]string) *DeleteClassificationsModelOptions
SetHeaders : Allow user to set Headers
func (*DeleteClassificationsModelOptions) SetModelID ¶ added in v2.1.0
func (_options *DeleteClassificationsModelOptions) SetModelID(modelID string) *DeleteClassificationsModelOptions
SetModelID : Allow user to set ModelID
type DeleteModelOptions ¶
type DeleteModelOptions struct { // Model ID of the model to delete. ModelID *string `json:"-" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string }
DeleteModelOptions : The DeleteModel options.
func (*DeleteModelOptions) SetHeaders ¶
func (options *DeleteModelOptions) SetHeaders(param map[string]string) *DeleteModelOptions
SetHeaders : Allow user to set Headers
func (*DeleteModelOptions) SetModelID ¶
func (_options *DeleteModelOptions) SetModelID(modelID string) *DeleteModelOptions
SetModelID : Allow user to set ModelID
type DeleteModelResults ¶
type DeleteModelResults struct { // model_id of the deleted model. Deleted *string `json:"deleted,omitempty"` }
DeleteModelResults : Delete model results.
type DeleteSentimentModelOptions ¶ added in v2.1.0
type DeleteSentimentModelOptions struct { // ID of the model. ModelID *string `json:"-" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string }
DeleteSentimentModelOptions : The DeleteSentimentModel options.
func (*DeleteSentimentModelOptions) SetHeaders ¶ added in v2.1.0
func (options *DeleteSentimentModelOptions) SetHeaders(param map[string]string) *DeleteSentimentModelOptions
SetHeaders : Allow user to set Headers
func (*DeleteSentimentModelOptions) SetModelID ¶ added in v2.1.0
func (_options *DeleteSentimentModelOptions) SetModelID(modelID string) *DeleteSentimentModelOptions
SetModelID : Allow user to set ModelID
type DisambiguationResult ¶
type DisambiguationResult struct { // Common entity name. Name *string `json:"name,omitempty"` // Link to the corresponding DBpedia resource. DbpediaResource *string `json:"dbpedia_resource,omitempty"` // Entity subtype information. Subtype []string `json:"subtype,omitempty"` }
DisambiguationResult : Disambiguation information for the entity.
type DocumentEmotionResults ¶
type DocumentEmotionResults struct { // Emotion results for the document as a whole. Emotion *EmotionScores `json:"emotion,omitempty"` }
DocumentEmotionResults : Emotion results for the document as a whole.
type DocumentSentimentResults ¶
type DocumentSentimentResults struct { // Indicates whether the sentiment is positive, neutral, or negative. Label *string `json:"label,omitempty"` // Sentiment score from -1 (negative) to 1 (positive). Score *float64 `json:"score,omitempty"` }
DocumentSentimentResults : DocumentSentimentResults struct
type EmotionOptions ¶
type EmotionOptions struct { // Set this to `false` to hide document-level emotion results. Document *bool `json:"document,omitempty"` // Emotion results will be returned for each target string that is found in the document. Targets []string `json:"targets,omitempty"` }
EmotionOptions : Detects anger, disgust, fear, joy, or sadness that is conveyed in the content or by the context around target phrases specified in the targets parameter. You can analyze emotion for detected entities with `entities.emotion` and for keywords with `keywords.emotion`.
Supported languages: English.
type EmotionResult ¶
type EmotionResult struct { // Emotion results for the document as a whole. Document *DocumentEmotionResults `json:"document,omitempty"` // Emotion results for specified targets. Targets []TargetedEmotionResults `json:"targets,omitempty"` }
EmotionResult : The detected anger, disgust, fear, joy, or sadness that is conveyed by the content. Emotion information can be returned for detected entities, keywords, or user-specified target phrases found in the text.
type EmotionScores ¶
type EmotionScores struct { // Anger score from 0 to 1. A higher score means that the text is more likely to convey anger. Anger *float64 `json:"anger,omitempty"` // Disgust score from 0 to 1. A higher score means that the text is more likely to convey disgust. Disgust *float64 `json:"disgust,omitempty"` // Fear score from 0 to 1. A higher score means that the text is more likely to convey fear. Fear *float64 `json:"fear,omitempty"` // Joy score from 0 to 1. A higher score means that the text is more likely to convey joy. Joy *float64 `json:"joy,omitempty"` // Sadness score from 0 to 1. A higher score means that the text is more likely to convey sadness. Sadness *float64 `json:"sadness,omitempty"` }
EmotionScores : EmotionScores struct
type EntitiesOptions ¶
type EntitiesOptions struct { // Maximum number of entities to return. Limit *int64 `json:"limit,omitempty"` // Set this to `true` to return locations of entity mentions. Mentions *bool `json:"mentions,omitempty"` // Enter a [custom // model](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing) // ID to override the standard entity detection model. Model *string `json:"model,omitempty"` // Set this to `true` to return sentiment information for detected entities. Sentiment *bool `json:"sentiment,omitempty"` // Set this to `true` to analyze emotion for detected keywords. Emotion *bool `json:"emotion,omitempty"` }
EntitiesOptions : Identifies people, cities, organizations, and other entities in the content. For more information, see [Entity types and subtypes](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-entity-types).
Supported languages: English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish, Swedish. Arabic, Chinese, and Dutch are supported only through custom models.
type EntitiesResult ¶
type EntitiesResult struct { // Entity type. Type *string `json:"type,omitempty"` // The name of the entity. Text *string `json:"text,omitempty"` // Relevance score from 0 to 1. Higher values indicate greater relevance. Relevance *float64 `json:"relevance,omitempty"` // Confidence in the entity identification from 0 to 1. Higher values indicate higher confidence. In standard entities // requests, confidence is returned only for English text. All entities requests that use custom models return the // confidence score. Confidence *float64 `json:"confidence,omitempty"` // Entity mentions and locations. Mentions []EntityMention `json:"mentions,omitempty"` // How many times the entity was mentioned in the text. Count *int64 `json:"count,omitempty"` // Emotion analysis results for the entity, enabled with the `emotion` option. Emotion *EmotionScores `json:"emotion,omitempty"` // Sentiment analysis results for the entity, enabled with the `sentiment` option. Sentiment *FeatureSentimentResults `json:"sentiment,omitempty"` // Disambiguation information for the entity. Disambiguation *DisambiguationResult `json:"disambiguation,omitempty"` }
EntitiesResult : The important people, places, geopolitical entities and other types of entities in your content.
type EntityMention ¶
type EntityMention struct { // Entity mention text. Text *string `json:"text,omitempty"` // Character offsets indicating the beginning and end of the mention in the analyzed text. Location []int64 `json:"location,omitempty"` // Confidence in the entity identification from 0 to 1. Higher values indicate higher confidence. In standard entities // requests, confidence is returned only for English text. All entities requests that use custom models return the // confidence score. Confidence *float64 `json:"confidence,omitempty"` }
EntityMention : EntityMention struct
type FeatureSentimentResults ¶
type FeatureSentimentResults struct { // Sentiment score from -1 (negative) to 1 (positive). Score *float64 `json:"score,omitempty"` }
FeatureSentimentResults : FeatureSentimentResults struct
type Features ¶
type Features struct { // Returns text classifications for the content. // // Supported languages: English only. Classifications *ClassificationsOptions `json:"classifications,omitempty"` // Returns high-level concepts in the content. For example, a research paper about deep learning might return the // concept, "Artificial Intelligence" although the term is not mentioned. // // Supported languages: English, French, German, Italian, Japanese, Korean, Portuguese, Spanish. Concepts *ConceptsOptions `json:"concepts,omitempty"` // Detects anger, disgust, fear, joy, or sadness that is conveyed in the content or by the context around target // phrases specified in the targets parameter. You can analyze emotion for detected entities with `entities.emotion` // and for keywords with `keywords.emotion`. // // Supported languages: English. Emotion *EmotionOptions `json:"emotion,omitempty"` // Identifies people, cities, organizations, and other entities in the content. For more information, see [Entity types // and // subtypes](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-entity-types). // // Supported languages: English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish, Swedish. // Arabic, Chinese, and Dutch are supported only through custom models. Entities *EntitiesOptions `json:"entities,omitempty"` // Returns important keywords in the content. // // Supported languages: English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish, Swedish. Keywords *KeywordsOptions `json:"keywords,omitempty"` // Returns information from the document, including author name, title, RSS/ATOM feeds, prominent page image, and // publication date. Supports URL and HTML input types only. Metadata *MetadataOptions `json:"metadata,omitempty"` // Recognizes when two entities are related and identifies the type of relation. For example, an `awardedTo` relation // might connect the entities "Nobel Prize" and "Albert Einstein". For more information, see [Relation // types](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-relations). // // Supported languages: Arabic, English, German, Japanese, Korean, Spanish. Chinese, Dutch, French, Italian, and // Portuguese custom models are also supported. Relations *RelationsOptions `json:"relations,omitempty"` // Parses sentences into subject, action, and object form. // // Supported languages: English, German, Japanese, Korean, Spanish. SemanticRoles *SemanticRolesOptions `json:"semantic_roles,omitempty"` // Analyzes the general sentiment of your content or the sentiment toward specific target phrases. You can analyze // sentiment for detected entities with `entities.sentiment` and for keywords with `keywords.sentiment`. // // Supported languages: Arabic, English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish. Sentiment *SentimentOptions `json:"sentiment,omitempty"` // (Experimental) Returns a summary of content. // // Supported languages: English only. Summarization *SummarizationOptions `json:"summarization,omitempty"` // Returns a hierarchical taxonomy of the content. The top three categories are returned by default. // // Supported languages: Arabic, English, French, German, Italian, Japanese, Korean, Portuguese, Spanish. Categories *CategoriesOptions `json:"categories,omitempty"` // Returns tokens and sentences from the input text. Syntax *SyntaxOptions `json:"syntax,omitempty"` }
Features : Analysis features and options.
type FeaturesResultsMetadata ¶
type FeaturesResultsMetadata struct { // The authors of the document. Authors []Author `json:"authors,omitempty"` // The publication date in the format ISO 8601. PublicationDate *string `json:"publication_date,omitempty"` // The title of the document. Title *string `json:"title,omitempty"` // URL of a prominent image on the webpage. Image *string `json:"image,omitempty"` // RSS/ATOM feeds found on the webpage. Feeds []Feed `json:"feeds,omitempty"` }
FeaturesResultsMetadata : Webpage metadata, such as the author and the title of the page.
type Feed ¶
type Feed struct { // URL of the RSS or ATOM feed. Link *string `json:"link,omitempty"` }
Feed : RSS or ATOM feed found on the webpage.
type GetCategoriesModelOptions ¶ added in v2.1.0
type GetCategoriesModelOptions struct { // ID of the model. ModelID *string `json:"-" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string }
GetCategoriesModelOptions : The GetCategoriesModel options.
func (*GetCategoriesModelOptions) SetHeaders ¶ added in v2.1.0
func (options *GetCategoriesModelOptions) SetHeaders(param map[string]string) *GetCategoriesModelOptions
SetHeaders : Allow user to set Headers
func (*GetCategoriesModelOptions) SetModelID ¶ added in v2.1.0
func (_options *GetCategoriesModelOptions) SetModelID(modelID string) *GetCategoriesModelOptions
SetModelID : Allow user to set ModelID
type GetClassificationsModelOptions ¶ added in v2.1.0
type GetClassificationsModelOptions struct { // ID of the model. ModelID *string `json:"-" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string }
GetClassificationsModelOptions : The GetClassificationsModel options.
func (*GetClassificationsModelOptions) SetHeaders ¶ added in v2.1.0
func (options *GetClassificationsModelOptions) SetHeaders(param map[string]string) *GetClassificationsModelOptions
SetHeaders : Allow user to set Headers
func (*GetClassificationsModelOptions) SetModelID ¶ added in v2.1.0
func (_options *GetClassificationsModelOptions) SetModelID(modelID string) *GetClassificationsModelOptions
SetModelID : Allow user to set ModelID
type GetSentimentModelOptions ¶ added in v2.1.0
type GetSentimentModelOptions struct { // ID of the model. ModelID *string `json:"-" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string }
GetSentimentModelOptions : The GetSentimentModel options.
func (*GetSentimentModelOptions) SetHeaders ¶ added in v2.1.0
func (options *GetSentimentModelOptions) SetHeaders(param map[string]string) *GetSentimentModelOptions
SetHeaders : Allow user to set Headers
func (*GetSentimentModelOptions) SetModelID ¶ added in v2.1.0
func (_options *GetSentimentModelOptions) SetModelID(modelID string) *GetSentimentModelOptions
SetModelID : Allow user to set ModelID
type KeywordsOptions ¶
type KeywordsOptions struct { // Maximum number of keywords to return. Limit *int64 `json:"limit,omitempty"` // Set this to `true` to return sentiment information for detected keywords. Sentiment *bool `json:"sentiment,omitempty"` // Set this to `true` to analyze emotion for detected keywords. Emotion *bool `json:"emotion,omitempty"` }
KeywordsOptions : Returns important keywords in the content.
Supported languages: English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish, Swedish.
type KeywordsResult ¶
type KeywordsResult struct { // Number of times the keyword appears in the analyzed text. Count *int64 `json:"count,omitempty"` // Relevance score from 0 to 1. Higher values indicate greater relevance. Relevance *float64 `json:"relevance,omitempty"` // The keyword text. Text *string `json:"text,omitempty"` // Emotion analysis results for the keyword, enabled with the `emotion` option. Emotion *EmotionScores `json:"emotion,omitempty"` // Sentiment analysis results for the keyword, enabled with the `sentiment` option. Sentiment *FeatureSentimentResults `json:"sentiment,omitempty"` }
KeywordsResult : The important keywords in the content, organized by relevance.
type ListCategoriesModelsOptions ¶ added in v2.1.0
type ListCategoriesModelsOptions struct { // Allows users to set headers on API requests Headers map[string]string }
ListCategoriesModelsOptions : The ListCategoriesModels options.
func (*ListCategoriesModelsOptions) SetHeaders ¶ added in v2.1.0
func (options *ListCategoriesModelsOptions) SetHeaders(param map[string]string) *ListCategoriesModelsOptions
SetHeaders : Allow user to set Headers
type ListClassificationsModelsOptions ¶ added in v2.1.0
type ListClassificationsModelsOptions struct { // Allows users to set headers on API requests Headers map[string]string }
ListClassificationsModelsOptions : The ListClassificationsModels options.
func (*ListClassificationsModelsOptions) SetHeaders ¶ added in v2.1.0
func (options *ListClassificationsModelsOptions) SetHeaders(param map[string]string) *ListClassificationsModelsOptions
SetHeaders : Allow user to set Headers
type ListModelsOptions ¶
type ListModelsOptions struct { // Allows users to set headers on API requests Headers map[string]string }
ListModelsOptions : The ListModels options.
func (*ListModelsOptions) SetHeaders ¶
func (options *ListModelsOptions) SetHeaders(param map[string]string) *ListModelsOptions
SetHeaders : Allow user to set Headers
type ListModelsResults ¶
type ListModelsResults struct { // An array of available models. Models []Model `json:"models,omitempty"` }
ListModelsResults : Custom models that are available for entities and relations.
type ListSentimentModelsOptions ¶ added in v2.1.0
type ListSentimentModelsOptions struct { // Allows users to set headers on API requests Headers map[string]string }
ListSentimentModelsOptions : The ListSentimentModels options.
func (*ListSentimentModelsOptions) SetHeaders ¶ added in v2.1.0
func (options *ListSentimentModelsOptions) SetHeaders(param map[string]string) *ListSentimentModelsOptions
SetHeaders : Allow user to set Headers
type ListSentimentModelsResponse ¶ added in v2.1.0
type ListSentimentModelsResponse struct {
Models []SentimentModel `json:"models,omitempty"`
}
ListSentimentModelsResponse : ListSentimentModelsResponse struct
type MetadataOptions ¶ added in v2.1.0
type MetadataOptions struct { }
MetadataOptions : Returns information from the document, including author name, title, RSS/ATOM feeds, prominent page image, and publication date. Supports URL and HTML input types only.
type Model ¶
type Model struct { // When the status is `available`, the model is ready to use. Status *string `json:"status,omitempty"` // Unique model ID. ModelID *string `json:"model_id,omitempty"` // ISO 639-1 code that indicates the language of the model. Language *string `json:"language,omitempty"` // Model description. Description *string `json:"description,omitempty"` // ID of the Watson Knowledge Studio workspace that deployed this model to Natural Language Understanding. WorkspaceID *string `json:"workspace_id,omitempty"` // The model version, if it was manually provided in Watson Knowledge Studio. ModelVersion *string `json:"model_version,omitempty"` // Deprecated — use `model_version`. Version *string `json:"version,omitempty"` // The description of the version, if it was manually provided in Watson Knowledge Studio. VersionDescription *string `json:"version_description,omitempty"` // A dateTime indicating when the model was created. Created *strfmt.DateTime `json:"created,omitempty"` }
Model : Model struct
type NaturalLanguageUnderstandingV1 ¶
type NaturalLanguageUnderstandingV1 struct { Service *core.BaseService // Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. The current version is // `2021-08-01`. Version *string }
NaturalLanguageUnderstandingV1 : Analyze various features of text content at scale. Provide text, raw HTML, or a public URL and IBM Watson Natural Language Understanding will give you results for the features you request. The service cleans HTML content before analysis by default, so the results can ignore most advertisements and other unwanted content.
You can create [custom models](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing) with Watson Knowledge Studio to detect custom entities and relations in Natural Language Understanding.
API Version: 1.0 See: https://cloud.ibm.com/docs/natural-language-understanding
func NewNaturalLanguageUnderstandingV1 ¶
func NewNaturalLanguageUnderstandingV1(options *NaturalLanguageUnderstandingV1Options) (service *NaturalLanguageUnderstandingV1, err error)
NewNaturalLanguageUnderstandingV1 : constructs an instance of NaturalLanguageUnderstandingV1 with passed in options.
func (*NaturalLanguageUnderstandingV1) Analyze ¶
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) Analyze(analyzeOptions *AnalyzeOptions) (result *AnalysisResults, response *core.DetailedResponse, err error)
Analyze : Analyze text Analyzes text, HTML, or a public webpage for the following features: - Categories - Classifications - Concepts - Emotion - Entities - Keywords - Metadata - Relations - Semantic roles - Sentiment - Syntax - Summarization (Experimental)
If a language for the input text is not specified with the `language` parameter, the service [automatically detects the language](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-detectable-languages).
func (*NaturalLanguageUnderstandingV1) AnalyzeWithContext ¶
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) AnalyzeWithContext(ctx context.Context, analyzeOptions *AnalyzeOptions) (result *AnalysisResults, response *core.DetailedResponse, err error)
AnalyzeWithContext is an alternate form of the Analyze method which supports a Context parameter
func (*NaturalLanguageUnderstandingV1) Clone ¶
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) Clone() *NaturalLanguageUnderstandingV1
Clone makes a copy of "naturalLanguageUnderstanding" suitable for processing requests.
func (*NaturalLanguageUnderstandingV1) CreateCategoriesModel ¶ added in v2.1.0
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) CreateCategoriesModel(createCategoriesModelOptions *CreateCategoriesModelOptions) (result *CategoriesModel, response *core.DetailedResponse, err error)
CreateCategoriesModel : Create categories model (Beta) Creates a custom categories model by uploading training data and associated metadata. The model begins the training and deploying process and is ready to use when the `status` is `available`.
func (*NaturalLanguageUnderstandingV1) CreateCategoriesModelWithContext ¶ added in v2.1.0
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) CreateCategoriesModelWithContext(ctx context.Context, createCategoriesModelOptions *CreateCategoriesModelOptions) (result *CategoriesModel, response *core.DetailedResponse, err error)
CreateCategoriesModelWithContext is an alternate form of the CreateCategoriesModel method which supports a Context parameter
func (*NaturalLanguageUnderstandingV1) CreateClassificationsModel ¶ added in v2.1.0
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) CreateClassificationsModel(createClassificationsModelOptions *CreateClassificationsModelOptions) (result *ClassificationsModel, response *core.DetailedResponse, err error)
CreateClassificationsModel : Create classifications model Creates a custom classifications model by uploading training data and associated metadata. The model begins the training and deploying process and is ready to use when the `status` is `available`.
func (*NaturalLanguageUnderstandingV1) CreateClassificationsModelWithContext ¶ added in v2.1.0
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) CreateClassificationsModelWithContext(ctx context.Context, createClassificationsModelOptions *CreateClassificationsModelOptions) (result *ClassificationsModel, response *core.DetailedResponse, err error)
CreateClassificationsModelWithContext is an alternate form of the CreateClassificationsModel method which supports a Context parameter
func (*NaturalLanguageUnderstandingV1) CreateSentimentModel ¶ added in v2.1.0
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) CreateSentimentModel(createSentimentModelOptions *CreateSentimentModelOptions) (result *SentimentModel, response *core.DetailedResponse, err error)
CreateSentimentModel : Create sentiment model (Beta) Creates a custom sentiment model by uploading training data and associated metadata. The model begins the training and deploying process and is ready to use when the `status` is `available`.
func (*NaturalLanguageUnderstandingV1) CreateSentimentModelWithContext ¶ added in v2.1.0
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) CreateSentimentModelWithContext(ctx context.Context, createSentimentModelOptions *CreateSentimentModelOptions) (result *SentimentModel, response *core.DetailedResponse, err error)
CreateSentimentModelWithContext is an alternate form of the CreateSentimentModel method which supports a Context parameter
func (*NaturalLanguageUnderstandingV1) DeleteCategoriesModel ¶ added in v2.1.0
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) DeleteCategoriesModel(deleteCategoriesModelOptions *DeleteCategoriesModelOptions) (result *DeleteModelResults, response *core.DetailedResponse, err error)
DeleteCategoriesModel : Delete categories model (Beta) Un-deploys the custom categories model with the given model ID and deletes all associated customer data, including any training data or binary artifacts.
func (*NaturalLanguageUnderstandingV1) DeleteCategoriesModelWithContext ¶ added in v2.1.0
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) DeleteCategoriesModelWithContext(ctx context.Context, deleteCategoriesModelOptions *DeleteCategoriesModelOptions) (result *DeleteModelResults, response *core.DetailedResponse, err error)
DeleteCategoriesModelWithContext is an alternate form of the DeleteCategoriesModel method which supports a Context parameter
func (*NaturalLanguageUnderstandingV1) DeleteClassificationsModel ¶ added in v2.1.0
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) DeleteClassificationsModel(deleteClassificationsModelOptions *DeleteClassificationsModelOptions) (result *DeleteModelResults, response *core.DetailedResponse, err error)
DeleteClassificationsModel : Delete classifications model Un-deploys the custom classifications model with the given model ID and deletes all associated customer data, including any training data or binary artifacts.
func (*NaturalLanguageUnderstandingV1) DeleteClassificationsModelWithContext ¶ added in v2.1.0
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) DeleteClassificationsModelWithContext(ctx context.Context, deleteClassificationsModelOptions *DeleteClassificationsModelOptions) (result *DeleteModelResults, response *core.DetailedResponse, err error)
DeleteClassificationsModelWithContext is an alternate form of the DeleteClassificationsModel method which supports a Context parameter
func (*NaturalLanguageUnderstandingV1) DeleteModel ¶
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) DeleteModel(deleteModelOptions *DeleteModelOptions) (result *DeleteModelResults, response *core.DetailedResponse, err error)
DeleteModel : Delete model Deletes a custom model.
func (*NaturalLanguageUnderstandingV1) DeleteModelWithContext ¶
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) DeleteModelWithContext(ctx context.Context, deleteModelOptions *DeleteModelOptions) (result *DeleteModelResults, response *core.DetailedResponse, err error)
DeleteModelWithContext is an alternate form of the DeleteModel method which supports a Context parameter
func (*NaturalLanguageUnderstandingV1) DeleteSentimentModel ¶ added in v2.1.0
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) DeleteSentimentModel(deleteSentimentModelOptions *DeleteSentimentModelOptions) (result *DeleteModelResults, response *core.DetailedResponse, err error)
DeleteSentimentModel : Delete sentiment model (Beta) Un-deploys the custom sentiment model with the given model ID and deletes all associated customer data, including any training data or binary artifacts.
func (*NaturalLanguageUnderstandingV1) DeleteSentimentModelWithContext ¶ added in v2.1.0
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) DeleteSentimentModelWithContext(ctx context.Context, deleteSentimentModelOptions *DeleteSentimentModelOptions) (result *DeleteModelResults, response *core.DetailedResponse, err error)
DeleteSentimentModelWithContext is an alternate form of the DeleteSentimentModel method which supports a Context parameter
func (*NaturalLanguageUnderstandingV1) DisableRetries ¶
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) DisableRetries()
DisableRetries disables automatic retries for requests invoked for this service instance.
func (*NaturalLanguageUnderstandingV1) DisableSSLVerification ¶
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) DisableSSLVerification()
DisableSSLVerification bypasses verification of the server's SSL certificate
func (*NaturalLanguageUnderstandingV1) EnableRetries ¶
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) EnableRetries(maxRetries int, maxRetryInterval time.Duration)
EnableRetries enables automatic retries for requests invoked for this service instance. If either parameter is specified as 0, then a default value is used instead.
func (*NaturalLanguageUnderstandingV1) GetCategoriesModel ¶ added in v2.1.0
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) GetCategoriesModel(getCategoriesModelOptions *GetCategoriesModelOptions) (result *CategoriesModel, response *core.DetailedResponse, err error)
GetCategoriesModel : Get categories model details (Beta) Returns the status of the categories model with the given model ID.
func (*NaturalLanguageUnderstandingV1) GetCategoriesModelWithContext ¶ added in v2.1.0
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) GetCategoriesModelWithContext(ctx context.Context, getCategoriesModelOptions *GetCategoriesModelOptions) (result *CategoriesModel, response *core.DetailedResponse, err error)
GetCategoriesModelWithContext is an alternate form of the GetCategoriesModel method which supports a Context parameter
func (*NaturalLanguageUnderstandingV1) GetClassificationsModel ¶ added in v2.1.0
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) GetClassificationsModel(getClassificationsModelOptions *GetClassificationsModelOptions) (result *ClassificationsModel, response *core.DetailedResponse, err error)
GetClassificationsModel : Get classifications model details Returns the status of the classifications model with the given model ID.
func (*NaturalLanguageUnderstandingV1) GetClassificationsModelWithContext ¶ added in v2.1.0
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) GetClassificationsModelWithContext(ctx context.Context, getClassificationsModelOptions *GetClassificationsModelOptions) (result *ClassificationsModel, response *core.DetailedResponse, err error)
GetClassificationsModelWithContext is an alternate form of the GetClassificationsModel method which supports a Context parameter
func (*NaturalLanguageUnderstandingV1) GetEnableGzipCompression ¶
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) GetEnableGzipCompression() bool
GetEnableGzipCompression returns the service's EnableGzipCompression field
func (*NaturalLanguageUnderstandingV1) GetSentimentModel ¶ added in v2.1.0
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) GetSentimentModel(getSentimentModelOptions *GetSentimentModelOptions) (result *SentimentModel, response *core.DetailedResponse, err error)
GetSentimentModel : Get sentiment model details (Beta) Returns the status of the sentiment model with the given model ID.
func (*NaturalLanguageUnderstandingV1) GetSentimentModelWithContext ¶ added in v2.1.0
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) GetSentimentModelWithContext(ctx context.Context, getSentimentModelOptions *GetSentimentModelOptions) (result *SentimentModel, response *core.DetailedResponse, err error)
GetSentimentModelWithContext is an alternate form of the GetSentimentModel method which supports a Context parameter
func (*NaturalLanguageUnderstandingV1) GetServiceURL ¶
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) GetServiceURL() string
GetServiceURL returns the service URL
func (*NaturalLanguageUnderstandingV1) ListCategoriesModels ¶ added in v2.1.0
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) ListCategoriesModels(listCategoriesModelsOptions *ListCategoriesModelsOptions) (result *CategoriesModelList, response *core.DetailedResponse, err error)
ListCategoriesModels : List categories models (Beta) Returns all custom categories models associated with this service instance.
func (*NaturalLanguageUnderstandingV1) ListCategoriesModelsWithContext ¶ added in v2.1.0
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) ListCategoriesModelsWithContext(ctx context.Context, listCategoriesModelsOptions *ListCategoriesModelsOptions) (result *CategoriesModelList, response *core.DetailedResponse, err error)
ListCategoriesModelsWithContext is an alternate form of the ListCategoriesModels method which supports a Context parameter
func (*NaturalLanguageUnderstandingV1) ListClassificationsModels ¶ added in v2.1.0
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) ListClassificationsModels(listClassificationsModelsOptions *ListClassificationsModelsOptions) (result *ClassificationsModelList, response *core.DetailedResponse, err error)
ListClassificationsModels : List classifications models Returns all custom classifications models associated with this service instance.
func (*NaturalLanguageUnderstandingV1) ListClassificationsModelsWithContext ¶ added in v2.1.0
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) ListClassificationsModelsWithContext(ctx context.Context, listClassificationsModelsOptions *ListClassificationsModelsOptions) (result *ClassificationsModelList, response *core.DetailedResponse, err error)
ListClassificationsModelsWithContext is an alternate form of the ListClassificationsModels method which supports a Context parameter
func (*NaturalLanguageUnderstandingV1) ListModels ¶
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) ListModels(listModelsOptions *ListModelsOptions) (result *ListModelsResults, response *core.DetailedResponse, err error)
ListModels : List models Lists Watson Knowledge Studio [custom entities and relations models](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing) that are deployed to your Natural Language Understanding service.
func (*NaturalLanguageUnderstandingV1) ListModelsWithContext ¶
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) ListModelsWithContext(ctx context.Context, listModelsOptions *ListModelsOptions) (result *ListModelsResults, response *core.DetailedResponse, err error)
ListModelsWithContext is an alternate form of the ListModels method which supports a Context parameter
func (*NaturalLanguageUnderstandingV1) ListSentimentModels ¶ added in v2.1.0
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) ListSentimentModels(listSentimentModelsOptions *ListSentimentModelsOptions) (result *ListSentimentModelsResponse, response *core.DetailedResponse, err error)
ListSentimentModels : List sentiment models (Beta) Returns all custom sentiment models associated with this service instance.
func (*NaturalLanguageUnderstandingV1) ListSentimentModelsWithContext ¶ added in v2.1.0
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) ListSentimentModelsWithContext(ctx context.Context, listSentimentModelsOptions *ListSentimentModelsOptions) (result *ListSentimentModelsResponse, response *core.DetailedResponse, err error)
ListSentimentModelsWithContext is an alternate form of the ListSentimentModels method which supports a Context parameter
func (*NaturalLanguageUnderstandingV1) NewAnalyzeOptions ¶
func (*NaturalLanguageUnderstandingV1) NewAnalyzeOptions(features *Features) *AnalyzeOptions
NewAnalyzeOptions : Instantiate AnalyzeOptions
func (*NaturalLanguageUnderstandingV1) NewCreateCategoriesModelOptions ¶ added in v2.1.0
func (*NaturalLanguageUnderstandingV1) NewCreateCategoriesModelOptions(language string, trainingData io.ReadCloser) *CreateCategoriesModelOptions
NewCreateCategoriesModelOptions : Instantiate CreateCategoriesModelOptions
func (*NaturalLanguageUnderstandingV1) NewCreateClassificationsModelOptions ¶ added in v2.1.0
func (*NaturalLanguageUnderstandingV1) NewCreateClassificationsModelOptions(language string, trainingData io.ReadCloser) *CreateClassificationsModelOptions
NewCreateClassificationsModelOptions : Instantiate CreateClassificationsModelOptions
func (*NaturalLanguageUnderstandingV1) NewCreateSentimentModelOptions ¶ added in v2.1.0
func (*NaturalLanguageUnderstandingV1) NewCreateSentimentModelOptions(language string, trainingData io.ReadCloser) *CreateSentimentModelOptions
NewCreateSentimentModelOptions : Instantiate CreateSentimentModelOptions
func (*NaturalLanguageUnderstandingV1) NewDeleteCategoriesModelOptions ¶ added in v2.1.0
func (*NaturalLanguageUnderstandingV1) NewDeleteCategoriesModelOptions(modelID string) *DeleteCategoriesModelOptions
NewDeleteCategoriesModelOptions : Instantiate DeleteCategoriesModelOptions
func (*NaturalLanguageUnderstandingV1) NewDeleteClassificationsModelOptions ¶ added in v2.1.0
func (*NaturalLanguageUnderstandingV1) NewDeleteClassificationsModelOptions(modelID string) *DeleteClassificationsModelOptions
NewDeleteClassificationsModelOptions : Instantiate DeleteClassificationsModelOptions
func (*NaturalLanguageUnderstandingV1) NewDeleteModelOptions ¶
func (*NaturalLanguageUnderstandingV1) NewDeleteModelOptions(modelID string) *DeleteModelOptions
NewDeleteModelOptions : Instantiate DeleteModelOptions
func (*NaturalLanguageUnderstandingV1) NewDeleteSentimentModelOptions ¶ added in v2.1.0
func (*NaturalLanguageUnderstandingV1) NewDeleteSentimentModelOptions(modelID string) *DeleteSentimentModelOptions
NewDeleteSentimentModelOptions : Instantiate DeleteSentimentModelOptions
func (*NaturalLanguageUnderstandingV1) NewGetCategoriesModelOptions ¶ added in v2.1.0
func (*NaturalLanguageUnderstandingV1) NewGetCategoriesModelOptions(modelID string) *GetCategoriesModelOptions
NewGetCategoriesModelOptions : Instantiate GetCategoriesModelOptions
func (*NaturalLanguageUnderstandingV1) NewGetClassificationsModelOptions ¶ added in v2.1.0
func (*NaturalLanguageUnderstandingV1) NewGetClassificationsModelOptions(modelID string) *GetClassificationsModelOptions
NewGetClassificationsModelOptions : Instantiate GetClassificationsModelOptions
func (*NaturalLanguageUnderstandingV1) NewGetSentimentModelOptions ¶ added in v2.1.0
func (*NaturalLanguageUnderstandingV1) NewGetSentimentModelOptions(modelID string) *GetSentimentModelOptions
NewGetSentimentModelOptions : Instantiate GetSentimentModelOptions
func (*NaturalLanguageUnderstandingV1) NewListCategoriesModelsOptions ¶ added in v2.1.0
func (*NaturalLanguageUnderstandingV1) NewListCategoriesModelsOptions() *ListCategoriesModelsOptions
NewListCategoriesModelsOptions : Instantiate ListCategoriesModelsOptions
func (*NaturalLanguageUnderstandingV1) NewListClassificationsModelsOptions ¶ added in v2.1.0
func (*NaturalLanguageUnderstandingV1) NewListClassificationsModelsOptions() *ListClassificationsModelsOptions
NewListClassificationsModelsOptions : Instantiate ListClassificationsModelsOptions
func (*NaturalLanguageUnderstandingV1) NewListModelsOptions ¶
func (*NaturalLanguageUnderstandingV1) NewListModelsOptions() *ListModelsOptions
NewListModelsOptions : Instantiate ListModelsOptions
func (*NaturalLanguageUnderstandingV1) NewListSentimentModelsOptions ¶ added in v2.1.0
func (*NaturalLanguageUnderstandingV1) NewListSentimentModelsOptions() *ListSentimentModelsOptions
NewListSentimentModelsOptions : Instantiate ListSentimentModelsOptions
func (*NaturalLanguageUnderstandingV1) NewUpdateCategoriesModelOptions ¶ added in v2.1.0
func (*NaturalLanguageUnderstandingV1) NewUpdateCategoriesModelOptions(modelID string, language string, trainingData io.ReadCloser) *UpdateCategoriesModelOptions
NewUpdateCategoriesModelOptions : Instantiate UpdateCategoriesModelOptions
func (*NaturalLanguageUnderstandingV1) NewUpdateClassificationsModelOptions ¶ added in v2.1.0
func (*NaturalLanguageUnderstandingV1) NewUpdateClassificationsModelOptions(modelID string, language string, trainingData io.ReadCloser) *UpdateClassificationsModelOptions
NewUpdateClassificationsModelOptions : Instantiate UpdateClassificationsModelOptions
func (*NaturalLanguageUnderstandingV1) NewUpdateSentimentModelOptions ¶ added in v2.1.0
func (*NaturalLanguageUnderstandingV1) NewUpdateSentimentModelOptions(modelID string, language string, trainingData io.ReadCloser) *UpdateSentimentModelOptions
NewUpdateSentimentModelOptions : Instantiate UpdateSentimentModelOptions
func (*NaturalLanguageUnderstandingV1) SetDefaultHeaders ¶
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) SetDefaultHeaders(headers http.Header)
SetDefaultHeaders sets HTTP headers to be sent in every request
func (*NaturalLanguageUnderstandingV1) SetEnableGzipCompression ¶
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) SetEnableGzipCompression(enableGzip bool)
SetEnableGzipCompression sets the service's EnableGzipCompression field
func (*NaturalLanguageUnderstandingV1) SetServiceURL ¶
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) SetServiceURL(url string) error
SetServiceURL sets the service URL
func (*NaturalLanguageUnderstandingV1) UpdateCategoriesModel ¶ added in v2.1.0
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) UpdateCategoriesModel(updateCategoriesModelOptions *UpdateCategoriesModelOptions) (result *CategoriesModel, response *core.DetailedResponse, err error)
UpdateCategoriesModel : Update categories model (Beta) Overwrites the training data associated with this custom categories model and retrains the model. The new model replaces the current deployment.
func (*NaturalLanguageUnderstandingV1) UpdateCategoriesModelWithContext ¶ added in v2.1.0
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) UpdateCategoriesModelWithContext(ctx context.Context, updateCategoriesModelOptions *UpdateCategoriesModelOptions) (result *CategoriesModel, response *core.DetailedResponse, err error)
UpdateCategoriesModelWithContext is an alternate form of the UpdateCategoriesModel method which supports a Context parameter
func (*NaturalLanguageUnderstandingV1) UpdateClassificationsModel ¶ added in v2.1.0
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) UpdateClassificationsModel(updateClassificationsModelOptions *UpdateClassificationsModelOptions) (result *ClassificationsModel, response *core.DetailedResponse, err error)
UpdateClassificationsModel : Update classifications model Overwrites the training data associated with this custom classifications model and retrains the model. The new model replaces the current deployment.
func (*NaturalLanguageUnderstandingV1) UpdateClassificationsModelWithContext ¶ added in v2.1.0
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) UpdateClassificationsModelWithContext(ctx context.Context, updateClassificationsModelOptions *UpdateClassificationsModelOptions) (result *ClassificationsModel, response *core.DetailedResponse, err error)
UpdateClassificationsModelWithContext is an alternate form of the UpdateClassificationsModel method which supports a Context parameter
func (*NaturalLanguageUnderstandingV1) UpdateSentimentModel ¶ added in v2.1.0
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) UpdateSentimentModel(updateSentimentModelOptions *UpdateSentimentModelOptions) (result *SentimentModel, response *core.DetailedResponse, err error)
UpdateSentimentModel : Update sentiment model (Beta) Overwrites the training data associated with this custom sentiment model and retrains the model. The new model replaces the current deployment.
func (*NaturalLanguageUnderstandingV1) UpdateSentimentModelWithContext ¶ added in v2.1.0
func (naturalLanguageUnderstanding *NaturalLanguageUnderstandingV1) UpdateSentimentModelWithContext(ctx context.Context, updateSentimentModelOptions *UpdateSentimentModelOptions) (result *SentimentModel, response *core.DetailedResponse, err error)
UpdateSentimentModelWithContext is an alternate form of the UpdateSentimentModel method which supports a Context parameter
type NaturalLanguageUnderstandingV1Options ¶
type NaturalLanguageUnderstandingV1Options struct { ServiceName string URL string Authenticator core.Authenticator // Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. The current version is // `2021-08-01`. Version *string `validate:"required"` }
NaturalLanguageUnderstandingV1Options : Service options
type Notice ¶ added in v2.1.0
type Notice struct { // Describes deficiencies or inconsistencies in training data. Message *string `json:"message,omitempty"` }
Notice : A list of messages describing model training issues when model status is `error`.
type RelationArgument ¶
type RelationArgument struct { // An array of extracted entities. Entities []RelationEntity `json:"entities,omitempty"` // Character offsets indicating the beginning and end of the mention in the analyzed text. Location []int64 `json:"location,omitempty"` // Text that corresponds to the argument. Text *string `json:"text,omitempty"` }
RelationArgument : RelationArgument struct
type RelationEntity ¶
type RelationEntity struct { // Text that corresponds to the entity. Text *string `json:"text,omitempty"` // Entity type. Type *string `json:"type,omitempty"` }
RelationEntity : An entity that corresponds with an argument in a relation.
type RelationsOptions ¶
type RelationsOptions struct { // Enter a [custom // model](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing) // ID to override the default model. Model *string `json:"model,omitempty"` }
RelationsOptions : Recognizes when two entities are related and identifies the type of relation. For example, an `awardedTo` relation might connect the entities "Nobel Prize" and "Albert Einstein". For more information, see [Relation types](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-relations).
Supported languages: Arabic, English, German, Japanese, Korean, Spanish. Chinese, Dutch, French, Italian, and Portuguese custom models are also supported.
type RelationsResult ¶
type RelationsResult struct { // Confidence score for the relation. Higher values indicate greater confidence. Score *float64 `json:"score,omitempty"` // The sentence that contains the relation. Sentence *string `json:"sentence,omitempty"` // The type of the relation. Type *string `json:"type,omitempty"` // Entity mentions that are involved in the relation. Arguments []RelationArgument `json:"arguments,omitempty"` }
RelationsResult : The relations between entities found in the content.
type SemanticRolesEntity ¶
type SemanticRolesEntity struct { // Entity type. Type *string `json:"type,omitempty"` // The entity text. Text *string `json:"text,omitempty"` }
SemanticRolesEntity : SemanticRolesEntity struct
type SemanticRolesKeyword ¶
type SemanticRolesKeyword struct { // The keyword text. Text *string `json:"text,omitempty"` }
SemanticRolesKeyword : SemanticRolesKeyword struct
type SemanticRolesOptions ¶
type SemanticRolesOptions struct { // Maximum number of semantic_roles results to return. Limit *int64 `json:"limit,omitempty"` // Set this to `true` to return keyword information for subjects and objects. Keywords *bool `json:"keywords,omitempty"` // Set this to `true` to return entity information for subjects and objects. Entities *bool `json:"entities,omitempty"` }
SemanticRolesOptions : Parses sentences into subject, action, and object form.
Supported languages: English, German, Japanese, Korean, Spanish.
type SemanticRolesResult ¶
type SemanticRolesResult struct { // Sentence from the source that contains the subject, action, and object. Sentence *string `json:"sentence,omitempty"` // The extracted subject from the sentence. Subject *SemanticRolesResultSubject `json:"subject,omitempty"` // The extracted action from the sentence. Action *SemanticRolesResultAction `json:"action,omitempty"` // The extracted object from the sentence. Object *SemanticRolesResultObject `json:"object,omitempty"` }
SemanticRolesResult : The object containing the actions and the objects the actions act upon.
type SemanticRolesResultAction ¶
type SemanticRolesResultAction struct { // Analyzed text that corresponds to the action. Text *string `json:"text,omitempty"` // normalized version of the action. Normalized *string `json:"normalized,omitempty"` Verb *SemanticRolesVerb `json:"verb,omitempty"` }
SemanticRolesResultAction : The extracted action from the sentence.
type SemanticRolesResultObject ¶
type SemanticRolesResultObject struct { // Object text. Text *string `json:"text,omitempty"` // An array of extracted keywords. Keywords []SemanticRolesKeyword `json:"keywords,omitempty"` }
SemanticRolesResultObject : The extracted object from the sentence.
type SemanticRolesResultSubject ¶
type SemanticRolesResultSubject struct { // Text that corresponds to the subject role. Text *string `json:"text,omitempty"` // An array of extracted entities. Entities []SemanticRolesEntity `json:"entities,omitempty"` // An array of extracted keywords. Keywords []SemanticRolesKeyword `json:"keywords,omitempty"` }
SemanticRolesResultSubject : The extracted subject from the sentence.
type SemanticRolesVerb ¶
type SemanticRolesVerb struct { // The keyword text. Text *string `json:"text,omitempty"` // Verb tense. Tense *string `json:"tense,omitempty"` }
SemanticRolesVerb : SemanticRolesVerb struct
type SentenceResult ¶
type SentenceResult struct { // The sentence. Text *string `json:"text,omitempty"` // Character offsets indicating the beginning and end of the sentence in the analyzed text. Location []int64 `json:"location,omitempty"` }
SentenceResult : SentenceResult struct
type SentimentModel ¶ added in v2.1.0
type SentimentModel struct { // The service features that are supported by the custom model. Features []string `json:"features,omitempty"` // When the status is `available`, the model is ready to use. Status *string `json:"status,omitempty"` // Unique model ID. ModelID *string `json:"model_id,omitempty"` // dateTime indicating when the model was created. Created *strfmt.DateTime `json:"created,omitempty"` // dateTime of last successful model training. LastTrained *strfmt.DateTime `json:"last_trained,omitempty"` // dateTime of last successful model deployment. LastDeployed *strfmt.DateTime `json:"last_deployed,omitempty"` // A name for the model. Name *string `json:"name,omitempty"` // An optional map of metadata key-value pairs to store with this model. UserMetadata map[string]interface{} `json:"user_metadata,omitempty"` // The 2-letter language code of this model. Language *string `json:"language,omitempty"` // An optional description of the model. Description *string `json:"description,omitempty"` // An optional version string. ModelVersion *string `json:"model_version,omitempty"` Notices []Notice `json:"notices,omitempty"` // ID of the Watson Knowledge Studio workspace that deployed this model to Natural Language Understanding. WorkspaceID *string `json:"workspace_id,omitempty"` // The description of the version. VersionDescription *string `json:"version_description,omitempty"` }
SentimentModel : SentimentModel struct
type SentimentOptions ¶
type SentimentOptions struct { // Set this to `false` to hide document-level sentiment results. Document *bool `json:"document,omitempty"` // Sentiment results will be returned for each target string that is found in the document. Targets []string `json:"targets,omitempty"` // (Beta) Enter a [custom // model](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing) // ID to override the standard sentiment model for all sentiment analysis operations in the request, including targeted // sentiment for entities and keywords. Model *string `json:"model,omitempty"` }
SentimentOptions : Analyzes the general sentiment of your content or the sentiment toward specific target phrases. You can analyze sentiment for detected entities with `entities.sentiment` and for keywords with `keywords.sentiment`.
Supported languages: Arabic, English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish.
type SentimentResult ¶
type SentimentResult struct { // The document level sentiment. Document *DocumentSentimentResults `json:"document,omitempty"` // The targeted sentiment to analyze. Targets []TargetedSentimentResults `json:"targets,omitempty"` }
SentimentResult : The sentiment of the content.
type SummarizationOptions ¶ added in v2.1.0
type SummarizationOptions struct { // Maximum number of summary sentences to return. Limit *int64 `json:"limit,omitempty"` }
SummarizationOptions : (Experimental) Returns a summary of content.
Supported languages: English only.
type SyntaxOptions ¶
type SyntaxOptions struct { // Tokenization options. Tokens *SyntaxOptionsTokens `json:"tokens,omitempty"` // Set this to `true` to return sentence information. Sentences *bool `json:"sentences,omitempty"` }
SyntaxOptions : Returns tokens and sentences from the input text.
type SyntaxOptionsTokens ¶
type SyntaxOptionsTokens struct { // Set this to `true` to return the lemma for each token. Lemma *bool `json:"lemma,omitempty"` // Set this to `true` to return the part of speech for each token. PartOfSpeech *bool `json:"part_of_speech,omitempty"` }
SyntaxOptionsTokens : Tokenization options.
type SyntaxResult ¶
type SyntaxResult struct { Tokens []TokenResult `json:"tokens,omitempty"` Sentences []SentenceResult `json:"sentences,omitempty"` }
SyntaxResult : Tokens and sentences returned from syntax analysis.
type TargetedEmotionResults ¶
type TargetedEmotionResults struct { // Targeted text. Text *string `json:"text,omitempty"` // The emotion results for the target. Emotion *EmotionScores `json:"emotion,omitempty"` }
TargetedEmotionResults : Emotion results for a specified target.
type TargetedSentimentResults ¶
type TargetedSentimentResults struct { // Targeted text. Text *string `json:"text,omitempty"` // Sentiment score from -1 (negative) to 1 (positive). Score *float64 `json:"score,omitempty"` }
TargetedSentimentResults : TargetedSentimentResults struct
type TokenResult ¶
type TokenResult struct { // The token as it appears in the analyzed text. Text *string `json:"text,omitempty"` // The part of speech of the token. For more information about the values, see [Universal Dependencies POS // tags](https://universaldependencies.org/u/pos/). PartOfSpeech *string `json:"part_of_speech,omitempty"` // Character offsets indicating the beginning and end of the token in the analyzed text. Location []int64 `json:"location,omitempty"` // The [lemma](https://wikipedia.org/wiki/Lemma_%28morphology%29) of the token. Lemma *string `json:"lemma,omitempty"` }
TokenResult : TokenResult struct
type UpdateCategoriesModelOptions ¶ added in v2.1.0
type UpdateCategoriesModelOptions struct { // ID of the model. ModelID *string `json:"-" validate:"required,ne="` // The 2-letter language code of this model. Language *string `json:"-" validate:"required"` // Training data in JSON format. For more information, see [Categories training data // requirements](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-categories##categories-training-data-requirements). TrainingData io.ReadCloser `json:"-" validate:"required"` // The content type of trainingData. TrainingDataContentType *string `json:"-"` // An optional name for the model. Name *string `json:"-"` // An optional map of metadata key-value pairs to store with this model. UserMetadata map[string]interface{} `json:"-"` // An optional description of the model. Description *string `json:"-"` // An optional version string. ModelVersion *string `json:"-"` // ID of the Watson Knowledge Studio workspace that deployed this model to Natural Language Understanding. WorkspaceID *string `json:"-"` // The description of the version. VersionDescription *string `json:"-"` // Allows users to set headers on API requests Headers map[string]string }
UpdateCategoriesModelOptions : The UpdateCategoriesModel options.
func (*UpdateCategoriesModelOptions) SetDescription ¶ added in v2.1.0
func (_options *UpdateCategoriesModelOptions) SetDescription(description string) *UpdateCategoriesModelOptions
SetDescription : Allow user to set Description
func (*UpdateCategoriesModelOptions) SetHeaders ¶ added in v2.1.0
func (options *UpdateCategoriesModelOptions) SetHeaders(param map[string]string) *UpdateCategoriesModelOptions
SetHeaders : Allow user to set Headers
func (*UpdateCategoriesModelOptions) SetLanguage ¶ added in v2.1.0
func (_options *UpdateCategoriesModelOptions) SetLanguage(language string) *UpdateCategoriesModelOptions
SetLanguage : Allow user to set Language
func (*UpdateCategoriesModelOptions) SetModelID ¶ added in v2.1.0
func (_options *UpdateCategoriesModelOptions) SetModelID(modelID string) *UpdateCategoriesModelOptions
SetModelID : Allow user to set ModelID
func (*UpdateCategoriesModelOptions) SetModelVersion ¶ added in v2.1.0
func (_options *UpdateCategoriesModelOptions) SetModelVersion(modelVersion string) *UpdateCategoriesModelOptions
SetModelVersion : Allow user to set ModelVersion
func (*UpdateCategoriesModelOptions) SetName ¶ added in v2.1.0
func (_options *UpdateCategoriesModelOptions) SetName(name string) *UpdateCategoriesModelOptions
SetName : Allow user to set Name
func (*UpdateCategoriesModelOptions) SetTrainingData ¶ added in v2.1.0
func (_options *UpdateCategoriesModelOptions) SetTrainingData(trainingData io.ReadCloser) *UpdateCategoriesModelOptions
SetTrainingData : Allow user to set TrainingData
func (*UpdateCategoriesModelOptions) SetTrainingDataContentType ¶ added in v2.1.0
func (_options *UpdateCategoriesModelOptions) SetTrainingDataContentType(trainingDataContentType string) *UpdateCategoriesModelOptions
SetTrainingDataContentType : Allow user to set TrainingDataContentType
func (*UpdateCategoriesModelOptions) SetUserMetadata ¶ added in v2.1.0
func (_options *UpdateCategoriesModelOptions) SetUserMetadata(userMetadata map[string]interface{}) *UpdateCategoriesModelOptions
SetUserMetadata : Allow user to set UserMetadata
func (*UpdateCategoriesModelOptions) SetVersionDescription ¶ added in v2.1.0
func (_options *UpdateCategoriesModelOptions) SetVersionDescription(versionDescription string) *UpdateCategoriesModelOptions
SetVersionDescription : Allow user to set VersionDescription
func (*UpdateCategoriesModelOptions) SetWorkspaceID ¶ added in v2.1.0
func (_options *UpdateCategoriesModelOptions) SetWorkspaceID(workspaceID string) *UpdateCategoriesModelOptions
SetWorkspaceID : Allow user to set WorkspaceID
type UpdateClassificationsModelOptions ¶ added in v2.1.0
type UpdateClassificationsModelOptions struct { // ID of the model. ModelID *string `json:"-" validate:"required,ne="` // The 2-letter language code of this model. Language *string `json:"-" validate:"required"` // Training data in JSON format. For more information, see [Classifications training data // requirements](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-classifications#classification-training-data-requirements). TrainingData io.ReadCloser `json:"-" validate:"required"` // The content type of trainingData. TrainingDataContentType *string `json:"-"` // An optional name for the model. Name *string `json:"-"` // An optional map of metadata key-value pairs to store with this model. UserMetadata map[string]interface{} `json:"-"` // An optional description of the model. Description *string `json:"-"` // An optional version string. ModelVersion *string `json:"-"` // ID of the Watson Knowledge Studio workspace that deployed this model to Natural Language Understanding. WorkspaceID *string `json:"-"` // The description of the version. VersionDescription *string `json:"-"` // Allows users to set headers on API requests Headers map[string]string }
UpdateClassificationsModelOptions : The UpdateClassificationsModel options.
func (*UpdateClassificationsModelOptions) SetDescription ¶ added in v2.1.0
func (_options *UpdateClassificationsModelOptions) SetDescription(description string) *UpdateClassificationsModelOptions
SetDescription : Allow user to set Description
func (*UpdateClassificationsModelOptions) SetHeaders ¶ added in v2.1.0
func (options *UpdateClassificationsModelOptions) SetHeaders(param map[string]string) *UpdateClassificationsModelOptions
SetHeaders : Allow user to set Headers
func (*UpdateClassificationsModelOptions) SetLanguage ¶ added in v2.1.0
func (_options *UpdateClassificationsModelOptions) SetLanguage(language string) *UpdateClassificationsModelOptions
SetLanguage : Allow user to set Language
func (*UpdateClassificationsModelOptions) SetModelID ¶ added in v2.1.0
func (_options *UpdateClassificationsModelOptions) SetModelID(modelID string) *UpdateClassificationsModelOptions
SetModelID : Allow user to set ModelID
func (*UpdateClassificationsModelOptions) SetModelVersion ¶ added in v2.1.0
func (_options *UpdateClassificationsModelOptions) SetModelVersion(modelVersion string) *UpdateClassificationsModelOptions
SetModelVersion : Allow user to set ModelVersion
func (*UpdateClassificationsModelOptions) SetName ¶ added in v2.1.0
func (_options *UpdateClassificationsModelOptions) SetName(name string) *UpdateClassificationsModelOptions
SetName : Allow user to set Name
func (*UpdateClassificationsModelOptions) SetTrainingData ¶ added in v2.1.0
func (_options *UpdateClassificationsModelOptions) SetTrainingData(trainingData io.ReadCloser) *UpdateClassificationsModelOptions
SetTrainingData : Allow user to set TrainingData
func (*UpdateClassificationsModelOptions) SetTrainingDataContentType ¶ added in v2.1.0
func (_options *UpdateClassificationsModelOptions) SetTrainingDataContentType(trainingDataContentType string) *UpdateClassificationsModelOptions
SetTrainingDataContentType : Allow user to set TrainingDataContentType
func (*UpdateClassificationsModelOptions) SetUserMetadata ¶ added in v2.1.0
func (_options *UpdateClassificationsModelOptions) SetUserMetadata(userMetadata map[string]interface{}) *UpdateClassificationsModelOptions
SetUserMetadata : Allow user to set UserMetadata
func (*UpdateClassificationsModelOptions) SetVersionDescription ¶ added in v2.1.0
func (_options *UpdateClassificationsModelOptions) SetVersionDescription(versionDescription string) *UpdateClassificationsModelOptions
SetVersionDescription : Allow user to set VersionDescription
func (*UpdateClassificationsModelOptions) SetWorkspaceID ¶ added in v2.1.0
func (_options *UpdateClassificationsModelOptions) SetWorkspaceID(workspaceID string) *UpdateClassificationsModelOptions
SetWorkspaceID : Allow user to set WorkspaceID
type UpdateSentimentModelOptions ¶ added in v2.1.0
type UpdateSentimentModelOptions struct { // ID of the model. ModelID *string `json:"-" validate:"required,ne="` // The 2-letter language code of this model. Language *string `json:"-" validate:"required"` // Training data in CSV format. For more information, see [Sentiment training data // requirements](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-custom-sentiment#sentiment-training-data-requirements). TrainingData io.ReadCloser `json:"-" validate:"required"` // An optional name for the model. Name *string `json:"-"` // An optional map of metadata key-value pairs to store with this model. UserMetadata map[string]interface{} `json:"-"` // An optional description of the model. Description *string `json:"-"` // An optional version string. ModelVersion *string `json:"-"` // ID of the Watson Knowledge Studio workspace that deployed this model to Natural Language Understanding. WorkspaceID *string `json:"-"` // The description of the version. VersionDescription *string `json:"-"` // Allows users to set headers on API requests Headers map[string]string }
UpdateSentimentModelOptions : The UpdateSentimentModel options.
func (*UpdateSentimentModelOptions) SetDescription ¶ added in v2.1.0
func (_options *UpdateSentimentModelOptions) SetDescription(description string) *UpdateSentimentModelOptions
SetDescription : Allow user to set Description
func (*UpdateSentimentModelOptions) SetHeaders ¶ added in v2.1.0
func (options *UpdateSentimentModelOptions) SetHeaders(param map[string]string) *UpdateSentimentModelOptions
SetHeaders : Allow user to set Headers
func (*UpdateSentimentModelOptions) SetLanguage ¶ added in v2.1.0
func (_options *UpdateSentimentModelOptions) SetLanguage(language string) *UpdateSentimentModelOptions
SetLanguage : Allow user to set Language
func (*UpdateSentimentModelOptions) SetModelID ¶ added in v2.1.0
func (_options *UpdateSentimentModelOptions) SetModelID(modelID string) *UpdateSentimentModelOptions
SetModelID : Allow user to set ModelID
func (*UpdateSentimentModelOptions) SetModelVersion ¶ added in v2.1.0
func (_options *UpdateSentimentModelOptions) SetModelVersion(modelVersion string) *UpdateSentimentModelOptions
SetModelVersion : Allow user to set ModelVersion
func (*UpdateSentimentModelOptions) SetName ¶ added in v2.1.0
func (_options *UpdateSentimentModelOptions) SetName(name string) *UpdateSentimentModelOptions
SetName : Allow user to set Name
func (*UpdateSentimentModelOptions) SetTrainingData ¶ added in v2.1.0
func (_options *UpdateSentimentModelOptions) SetTrainingData(trainingData io.ReadCloser) *UpdateSentimentModelOptions
SetTrainingData : Allow user to set TrainingData
func (*UpdateSentimentModelOptions) SetUserMetadata ¶ added in v2.1.0
func (_options *UpdateSentimentModelOptions) SetUserMetadata(userMetadata map[string]interface{}) *UpdateSentimentModelOptions
SetUserMetadata : Allow user to set UserMetadata
func (*UpdateSentimentModelOptions) SetVersionDescription ¶ added in v2.1.0
func (_options *UpdateSentimentModelOptions) SetVersionDescription(versionDescription string) *UpdateSentimentModelOptions
SetVersionDescription : Allow user to set VersionDescription
func (*UpdateSentimentModelOptions) SetWorkspaceID ¶ added in v2.1.0
func (_options *UpdateSentimentModelOptions) SetWorkspaceID(workspaceID string) *UpdateSentimentModelOptions
SetWorkspaceID : Allow user to set WorkspaceID