Documentation
¶
Index ¶
- Variables
- func AnalyzeEntities(ctx context.Context, text string) (*languagepb.AnalyzeEntitiesResponse, error)
- func AnalyzeEntitySentiment(ctx context.Context, text string) (*languagepb.AnalyzeEntitySentimentResponse, error)
- func AnalyzeSentiment(ctx context.Context, text string) (*languagepb.AnalyzeSentimentResponse, error)
- func AnalyzeSyntax(ctx context.Context, text string) (*languagepb.AnnotateTextResponse, error)
- func ClassifyText(ctx context.Context, text string) (*languagepb.ClassifyTextResponse, error)
- func Init(apikey string) error
- func ModerateText(ctx context.Context, text string, documentType languagepb.Document_Type) (*languagepb.ModerateTextResponse, error)
- type DetailedDescription
- type EntityImage
- type KnowledgeGraphSearchResponse
- type SearchResult
- type SearchResultEntity
Constants ¶
This section is empty.
Variables ¶
View Source
var KnowledgeGraphClient *kgsearch.Service
View Source
var NLUClient *language.Client
Functions ¶
func AnalyzeEntities ¶
func AnalyzeEntities(ctx context.Context, text string) (*languagepb.AnalyzeEntitiesResponse, error)
func AnalyzeEntitySentiment ¶
func AnalyzeEntitySentiment(ctx context.Context, text string) (*languagepb.AnalyzeEntitySentimentResponse, error)
func AnalyzeSentiment ¶
func AnalyzeSentiment(ctx context.Context, text string) (*languagepb.AnalyzeSentimentResponse, error)
func AnalyzeSyntax ¶
func AnalyzeSyntax(ctx context.Context, text string) (*languagepb.AnnotateTextResponse, error)
func ClassifyText ¶
func ClassifyText(ctx context.Context, text string) (*languagepb.ClassifyTextResponse, error)
func ModerateText ¶
func ModerateText(ctx context.Context, text string, documentType languagepb.Document_Type) (*languagepb.ModerateTextResponse, error)
Types ¶
type DetailedDescription ¶
type EntityImage ¶
type KnowledgeGraphSearchResponse ¶
type KnowledgeGraphSearchResponse struct {
ItemListElement []*SearchResult `json:"itemListElement,omitempty"`
}
func SearchKnowledgeGraph ¶
func SearchKnowledgeGraph(query string) (*KnowledgeGraphSearchResponse, error)
func SearchKnowledgeGraphByIds ¶
func SearchKnowledgeGraphByIds(ids ...string) (*KnowledgeGraphSearchResponse, error)
type SearchResult ¶
type SearchResult struct { Type string `json:"@type"` Result SearchResultEntity `json:"result"` ResultScore float64 `json:"resultScore"` }
type SearchResultEntity ¶
type SearchResultEntity struct { Id string `json:"@id"` Type []string `json:"@type"` Name string `json:"name"` Image EntityImage `json:"image"` DetailedDescription DetailedDescription `json:"detailedDescription"` }
Click to show internal directories.
Click to hide internal directories.