request

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntityExtraction

type EntityExtraction struct {
	// The following three parameters are mutually exclusive
	Text          string   `json:"text,omitempty" validate:"-"`
	HTML          string   `json:"html,omitempty" validate:"-"`
	HTMLFragment  string   `json:"html_fragment,omitempty" validate:"-"`
	Lang          *string  `json:"lang,omitempty" validate:"omitempty,oneof=de en es fr it pt ru auto"`
	TopEntities   *int     `json:"top_entities,omitempty" validate:"omitempty, gte=0"`
	MinConfidence *float64 `json:"min_confidence,omitempty" validate:"omitempty, gte=0.0, lte=1.0"`
	MinLength     *int     `json:"min_length,omitempty" validate:"omitempty, gte=2"`
	SocialHashtag *bool    `json:"social.hashtag,omitempty" validate:"-"`
	SocialMention *bool    `json:"social.mention,omitempty" validate:"-"`
	Include       *string  `json:"include,omitempty" validate:"-"`
	ExtraTypes    *string  `json:"extra_types,omitempty" validate:"-"`
	Country       *string  `` /* 150-byte string literal not displayed */
	Epsilon       *float64 `json:"epsilon,omitempty" validate:"omitempty, gte=0.0, lte=0.5"`
}

func (*EntityExtraction) ToPostForm

func (e *EntityExtraction) ToPostForm() *postform.PostForm

func (*EntityExtraction) Validate

func (e *EntityExtraction) Validate() error

type LanguageDetection

type LanguageDetection struct {
	// The following three parameters are mutually exclusive
	Text         string `json:"text,omitempty" validate:"-"`
	HTML         string `json:"html,omitempty" validate:"-"`
	HTMLFragment string `json:"html_fragment,omitempty" validate:"-"`
	Clean        *bool  `json:"clean,omitempty" validate:"-"`
}

func (*LanguageDetection) ToPostForm

func (l *LanguageDetection) ToPostForm() *postform.PostForm

func (*LanguageDetection) Validate

func (l *LanguageDetection) Validate() error

type SentimentAnalysis

type SentimentAnalysis struct {
	// The following three parameters are mutually exclusive
	Text         string  `json:"text,omitempty" validate:"-"`
	HTML         string  `json:"html,omitempty" validate:"-"`
	HTMLFragment string  `json:"html_fragment,omitempty" validate:"-"`
	Lang         *string `json:"lang,omitempty" validate:"omitempty,oneof=it en auto"`
}

func (*SentimentAnalysis) ToPostForm

func (s *SentimentAnalysis) ToPostForm() *postform.PostForm

func (*SentimentAnalysis) Validate

func (s *SentimentAnalysis) Validate() error

type Social

type Social struct {
	Hashtag *bool `json:"hashtag,omitempty" validate:"-"`
	Mention *bool `json:"mention,omitempty" validate:"-"`
}

type TextSimilarity

type TextSimilarity struct {
	// The following three parameters are mutually exclusive
	Text1         string `json:"text1,omitempty" validate:"-"`
	HTML1         string `json:"html1,omitempty" validate:"-"`
	HTMLFragment1 string `json:"html_fragment1,omitempty" validate:"-"`
	// The following three parameters are mutually exclusive
	Text2         string  `json:"text2,omitempty" validate:"-"`
	HTML2         string  `json:"html2,omitempty" validate:"-"`
	HTMLFragment2 string  `json:"html_fragment2,omitempty" validate:"-"`
	Lang          *string `json:"lang,omitempty" validate:"omitempty,oneof=de en es fr it pt ru auto"`
	Bow           *string `json:"bow,omitempty" validate:"omitempty,oneof=always one_empty both_empty never"`
}

func (*TextSimilarity) ToPostForm

func (t *TextSimilarity) ToPostForm() *postform.PostForm

func (*TextSimilarity) Validate

func (t *TextSimilarity) Validate() error

type WikiSearch

type WikiSearch struct {
	// The following three parameters are mutually exclusive
	Text    string  `json:"text" validate:"-"`
	Lang    string  `json:"lang" validate:"oneof=de en es fr it pt ru"`
	Limit   *int    `json:"limit" validate:"omitempty,gte=1 lte=50"`
	Offset  *int    `json:"offset" validate:"omitempty,gte=0"`
	Query   *string `json:"query" validate:"omitempty,oneof=full prefix"`
	Include *string `json:"include" validate:"-"`
}

func (*WikiSearch) ToPostForm

func (w *WikiSearch) ToPostForm() *postform.PostForm

func (*WikiSearch) Validate

func (w *WikiSearch) Validate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL