response

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adm

type Adm struct {
	ID   string `json:"id"`
	Form string `json:"form"`
}

type Affinity

type Affinity struct {
	Form string `json:"form"`
	ID   string `json:"id"`
}

type Analysis

type Analysis struct {
	Origin                string    `json:"origin"`
	VarietyDictionary     string    `json:"variety_dictionary"`
	Tag                   string    `json:"tag"`
	Lemma                 string    `json:"lemma"`
	OriginalForm          string    `json:"original_form"`
	TagInfo               string    `json:"tag_info"`
	VarietyDictionaryInfo string    `json:"variety_dictionary_info"`
	CheckInfo             string    `json:"check_info"`
	Remission             string    `json:"remission"`
	SenseIDList           []SenseID `json:"sense_id_list"`
}

type Category

type Category struct {
	Code              string `json:"code"`
	Label             string `json:"label"`
	AbsoluteRelevance string `json:"abs_relevance"`
	Relevance         string `json:"relevance"`
	Popolarity        string `json:"popolarity"`
	TermList          []Term `json:"term_list,omitempty"`
}

type Cluster

type Cluster struct {
	Title        string            `json:"title"`
	Size         int               `json:"size"` // Uh, this is not a string as in the docs
	Score        string            `json:"score"`
	DocumentList map[string]string `json:"document_list"` // Uh, this is not a list!
}

type Complement

type Complement struct {
	Form string `json:"form"`
	Type string `json:"type"`
}

type Concept

type Concept struct {
	Form          string     `json:"form"`
	OfficialForm  string     `json:"official_form"`
	Dictionary    string     `json:"dictionary"`
	ID            string     `json:"id"`
	Sementity     Sementity  `json:"sementity"`
	SemgeoList    []Semgeo   `json:"semgeo_list"`
	SemldList     []string   `json:"semld_list"`
	SemreferList  []string   `json:"semrefer_list"`
	SemthemeList  []Semtheme `json:"semtheme_list"`
	StandardList  []Standard `json:"standard_list"`
	VariantList   []Variant  `json:"variant_list"`
	Relevance     string     `json:"relevance"`
	SubentityList []string   `json:"subentity_list"`
}

type Continent

type Continent struct {
	ID   string `json:"id"`
	Form string `json:"form"`
}

type CorporateReputation

type CorporateReputation struct {
	Status     StatusIntValues `json:"status"` // Uh, this is not the standard status!
	Time       float64         `json:"time"`
	DeepTime   float64         `json:"deep_time"`
	EntityList []Entity        `json:"entity_list"`
}

func (*CorporateReputation) Decode

func (c *CorporateReputation) Decode(body io.ReadCloser) error

type Country

type Country struct {
	Form         string     `json:"form"`
	ID           string     `json:"id"`
	StandardList []Standard `json:"standard_list"`
}

type DeepCategorization

type DeepCategorization struct {
	Response
	CategoryList []Category `json:"category_list,omitempty"`
}

func (*DeepCategorization) Decode

func (d *DeepCategorization) Decode(body io.ReadCloser) error

type DocumentStructure

type DocumentStructure struct {
	Response
	Title        string     `json:"title"`
	HeadingList  []string   `json:"heading_list"`
	AbstractList []string   `json:"abstract_list"`
	EmailsInfo   EmailsInfo `json:"emails_info"`
}

func (*DocumentStructure) Decode

func (d *DocumentStructure) Decode(body io.ReadCloser) error

type EmailsInfo

type EmailsInfo struct {
	From    string   `json:"from"`
	To      []string `json:"to"`
	Cc      []string `json:"cc"`
	Subject []string `json:"subject"`
}

type Entity

type Entity struct {
	Form          string     `json:"form"`
	OfficialForm  string     `json:"official_form"`
	Dictionary    string     `json:"dictionary"`
	ID            string     `json:"id"`
	Sementity     Sementity  `json:"sementity"`
	SemgeoList    []Semgeo   `json:"semgeo_list"`
	SemldList     []string   `json:"semld_list"`
	SemreferList  []Semref   `json:"semrefer_list"`
	SemthemeList  []SemTheme `json:"semtheme_list"`
	StandardList  []Standard `json:"standard_list"`
	VariantList   []Variant  `json:"variant_list"`
	Relevance     string     `json:"relevance"`
	SubentityList []Entity   `json:"subentity_list"`
}

type GlobalSentiment

type GlobalSentiment struct {
	Model        string `json:"model"`
	ScoreTag     string `json:"score_tag"`
	Agreement    string `json:"agreement"`
	Subjectivity string `json:"subjectivity"`
	Confidence   string `json:"confidence"`
	Irony        string `json:"irony"`
}

type Irony

type Irony string
const (
	IronyIrony    Irony = "IRONIC"
	IronyNonIrony Irony = "NONIRONIC"
)

type Language

type Language struct {
	Language  string  `json:"language"`
	Name      string  `json:"name"`
	Relevance float64 `json:"relevance"`
	ISO6391   string  `json:"iso-639-1"`
	ISO6392   string  `json:"iso-639-2"`
	ISO6393   string  `json:"iso-639-3"`
	ISO6395   string  `json:"iso-639-5"`
	DeepTime  string  `json:"deep_time"`
	Time      string  `json:"time"`
}

type LanguageIdentification

type LanguageIdentification struct {
	Status       StatusIntValues `json:"status"` // Uh, this is not a standard status!
	LanguageList []Language      `json:"language_list"`
}

func (*LanguageIdentification) Decode

func (l *LanguageIdentification) Decode(body io.ReadCloser) error

type MoneyExpression

type MoneyExpression struct {
	Form         string `json:"form"`
	AmountForm   string `json:"amount_form"`
	NumericValue string `json:"numeric_value"`
	Currency     string `json:"currency"`
	Inip         string `json:"inip"`
	Endp         string `json:"endp"`
}

type Offset

type Offset struct {
	Endp string `json:"endp"`
	Inip string `json:"inip"`
}

type Organization

type Organization struct {
	Form string `json:"form"`
	ID   string `json:"id"`
}

type OtherExpression

type OtherExpression struct {
	Form string `json:"form"`
	Type string `json:"type"`
	Inip string `json:"inip"`
	Endp string `json:"endp"`
}

type Parser

type Parser struct {
	Response
	TokenList       []Token         `json:"token_list"`
	GlobalSentiment GlobalSentiment `json:"global_sentiment"`
}

func (*Parser) Decode

func (p *Parser) Decode(body io.ReadCloser) error

type PolarityTerm

type PolarityTerm struct {
	Text                   string               `json:"text"`
	Inip                   string               `json:"inip"`
	Endp                   string               `json:"endp"`
	TagStack               string               `json:"tag_stack"`
	Confidence             string               `json:"confidence"`
	ScoreTag               ScoreTag             `json:"score_tag"`
	SentimentedEntityList  []SentimentedEntity  `json:"sentimented_entity_list,omitempty"`
	SentimentedConceptList []SentimentedConcept `json:"sentimented_concept_list,omitempty"`
}

type Quotation

type Quotation struct {
	Form string `json:"form"`
	Who  string `json:"who"`
	Verb string `json:"verb"`
	Inip string `json:"inip"`
	Endp string `json:"endp"`
}

type Relation

type Relation struct {
	Form           string       `json:"form"`
	Inip           string       `json:"inip"`
	Endp           string       `json:"endp"`
	Subject        Subject      `json:"subject"`
	Verb           Verb         `json:"verb"`
	ComplementList []Complement `json:"complement_list"`
	Degree         string       `json:"degree"`
}

type Response

type Response struct {
	Status Status `json:"status"`
}

type ScoreTag

type ScoreTag string
const (
	ScoreTagStrongPositive ScoreTag = "P+"
	ScoreTagPositive       ScoreTag = "P"
	ScoreTagNeutral        ScoreTag = "NEU"
	ScoreTagNegative       ScoreTag = "N"
	ScoreTagStrongNegative ScoreTag = "N+"
	ScoreTagNone           ScoreTag = "NONE"
)

type Segment

type Segment struct {
	Text                   string               `json:"text"`
	SegmentType            SegmentType          `json:"segment_type"`
	Inip                   string               `json:"inip"`
	Endp                   string               `json:"endp"`
	Confidence             string               `json:"confidence"`
	ScoreTag               ScoreTag             `json:"score_tag"`
	Agreement              SentimentAgreement   `json:"agreement"`
	PolarityTermList       []PolarityTerm       `json:"polarity_term_list,omitempty"`
	SegmentList            []Segment            `json:"segment_list,omitempty"`
	SentimentedConceptList []SentimentedConcept `json:"sentimented_concept_list,omitempty"`
}

type SegmentType

type SegmentType string
const (
	SegmentTypeMain      SegmentType = "main"
	SegmentTypeSecondary SegmentType = "secondary"
)

type SemTheme

type SemTheme struct {
	ID   string `json:"id"`
	Type string `json:"type"`
}

type Sementity

type Sementity struct {
	Class      string `json:"class"`
	Fiction    string `json:"fiction"`
	ID         string `json:"id"`
	Type       string `json:"type"`
	Confidence string `json:"confidence"`
}

type Semgeo

type Semgeo struct {
	Continent Continent `json:"continent,omitempty"`
	Country   Country   `json:"country,omitempty"`
	Adm2      Adm       `json:"adm2,omitempty"`
	Adm1      Adm       `json:"adm1,omitempty"`
	Adm3      Adm       `json:"adm3,omitempty"`
}

type Semref

type Semref struct {
	Organization Organization `json:"organization"`
	Affinity     Affinity     `json:"affinity"`
}

type Semtheme

type Semtheme struct {
	ID   string `json:"id"`
	Type string `json:"type"`
}

type Sense

type Sense struct {
	ID           string `json:"id"`
	Info         string `json:"info"`
	Form         string `json:"form"`
	OfficialForm string `json:"official_form"`
}

type SenseID

type SenseID struct {
	SenseID string `json:"sense_id"`
}

type Sentence

type Sentence struct {
	Text                   string               `json:"text"`
	Inip                   string               `json:"inip"`
	Endp                   string               `json:"endp"`
	Bop                    string               `json:"bop"`
	Confidence             string               `json:"confidence"`
	ScoreTag               ScoreTag             `json:"score_tag"`
	Agreement              SentimentAgreement   `json:"agreement"`
	SegmentList            []Segment            `json:"segment_list"`
	SentimentedEntityList  []SentimentedEntity  `json:"sentimented_entity_list"`
	SentimentedConceptList []SentimentedConcept `json:"sentimented_concept_list"`
}

type Sentiment

type Sentiment struct {
	Response
	Model                  string               `json:"model"`
	ScoreTag               ScoreTag             `json:"score_tag"`
	Agreement              SentimentAgreement   `json:"agreement"`
	Subjectivity           Subjectivity         `json:"subjectivity"`
	Confidence             string               `json:"confidence"`
	Irony                  Irony                `json:"irony"`
	SentenceList           []Sentence           `json:"sentence_list"`
	SentimentedEntityList  []SentimentedEntity  `json:"sentimented_entity_list"`
	SentimentedConceptList []SentimentedConcept `json:"sentimented_concept_list"`
}

func (*Sentiment) Decode

func (s *Sentiment) Decode(body io.ReadCloser) error

type SentimentAgreement

type SentimentAgreement string
const (
	Agreement    SentimentAgreement = "AGREEMENT"
	Disagreement SentimentAgreement = "DISAGREEMENT"
)

type SentimentedConcept

type SentimentedConcept struct {
	Form     string   `json:"form"`
	ID       string   `json:"id"`
	Variant  string   `json:"variant"`
	Inip     string   `json:"inip"`
	Endp     string   `json:"endp"`
	Type     string   `json:"type"`
	ScoreTag ScoreTag `json:"score_tag"`
}

type SentimentedEntity

type SentimentedEntity struct {
	Form     string   `json:"form"`
	ID       string   `json:"id"`
	Variant  string   `json:"variant"`
	Inip     string   `json:"inip"`
	Endp     string   `json:"endp"`
	Type     string   `json:"type"`
	ScoreTag ScoreTag `json:"score_tag"`
}

type Standard

type Standard struct {
	ID    string `json:"id"`
	Value string `json:"value"`
}

type Status

type Status struct {
	Code             string `json:"code"`
	Msg              string `json:"msg"`
	Credits          string `json:"credits"`
	RemainingCredits string `json:"remaining_credits"`
}

func (*Status) Error

func (s *Status) Error() error

func (*Status) IsSuccess

func (s *Status) IsSuccess() bool

type StatusIntValues

type StatusIntValues struct {
	Code             int    `json:"code"`
	Msg              string `json:"msg"`
	Credits          int    `json:"credits"`
	RemainingCredits int    `json:"remaining_credits"`
}

Uh!

func (*StatusIntValues) Error

func (s *StatusIntValues) Error() error

func (*StatusIntValues) IsSuccess

func (s *StatusIntValues) IsSuccess() bool

type Style

type Style struct {
	IsBold       string `json:"is_bold"`
	IsItalics    string `json:"is_italics"`
	IsUnderlined string `json:"is_underlined"`
	IsTitle      string `json:"is_title"`
}

type Subject

type Subject struct {
	Form        string   `json:"form"`
	LemmaList   []string `json:"lemma_list"`
	SenseIDList []string `json:"sense_id_list"`
}

type Subjectivity

type Subjectivity string
const (
	SubjectivitySubjective Subjectivity = "SUBJECTIVE"
	SubjectivityObjective  Subjectivity = "OBJECTIVE"
)

type Summarization

type Summarization struct {
	Response
	Summary string `json:"summary"`
}

func (*Summarization) Decode

func (s *Summarization) Decode(body io.ReadCloser) error

type SyntacticTreeRelation

type SyntacticTreeRelation struct {
	ID   string `json:"id"`
	Type string `json:"type"`
}

type Term

type Term struct {
	AbsoluteRelevance string   `json:"abs_relevance"`
	Form              string   `json:"form"`
	OffsetList        []Offset `json:"offset_list,omitempty"`
}

type TextClassification

type TextClassification struct {
	Response
	CategoryList []Category `json:"category_list"`
}

func (*TextClassification) Decode

func (t *TextClassification) Decode(body io.ReadCloser) error

type TextClustering

type TextClustering struct {
	Response
	ClusterList []Cluster `json:"cluster_list"`
}

func (*TextClustering) Decode

func (t *TextClustering) Decode(body io.ReadCloser) error

type TimeExpression

type TimeExpression struct {
	Form           string `json:"form"`
	NormalizedForm string `json:"normalized_form"`
	ActualTime     string `json:"actual_time"`
	Precision      string `json:"precision"`
	Inip           string `json:"inip"`
	Endp           string `json:"endp"`
}

type Token

type Token struct {
	Type                      string                  `json:"type"`
	Form                      string                  `json:"form"`
	NormalizedForm            string                  `json:"normalized_form"`
	ID                        string                  `json:"id"`
	Inip                      string                  `json:"inip"`
	Endp                      string                  `json:"endp"`
	Style                     Style                   `json:"style"`
	Separation                string                  `json:"separation"`
	QuoteLevel                string                  `json:"quote_level"`
	AffectedByNegotiation     string                  `json:"affected_by_negotiation"`
	Head                      string                  `json:"head"`
	SyntacticTreeRelationList []SyntacticTreeRelation `json:"syntactic_tree_relation_list"`
	AnalysisList              []Analysis              `json:"analysis_list"`
	SenseList                 []Sense                 `json:"sense_list"`
	Sentiment                 TokenSentiment          `json:"sentiment"`
	TopicList                 TopicsExtraction        `json:"topic_list"` // Uh, this is not a list!
	TokenList                 []Token                 `json:"token_list"`
}

type TokenInheritedSentiment

type TokenInheritedSentiment struct {
	RelationList []Relation `json:"relation_list"`
	ScoreTag     string     `json:"score_tag"`
}

type TokenSelfSentiment

type TokenSelfSentiment struct {
	Text       string `json:"text"`
	Inip       string `json:"inip"`
	Endp       string `json:"endp"`
	TagStack   string `json:"tag_stack"`
	Confidence string `json:"confidence"`
	ScoreTag   string `json:"score_tag"`
}

type TokenSentiment

type TokenSentiment struct {
	SelfSentiment      TokenSelfSentiment      `json:"self_sentiment"`
	InheritedSentiment TokenInheritedSentiment `json:"inherited_sentiment"`
}

type TopicsExtraction

type TopicsExtraction struct {
	Response
	EntityList          []Entity          `json:"entity_list"`
	ConceptList         []Concept         `json:"concept_list"`
	TimeExpressionList  []TimeExpression  `json:"time_expression_list"`
	MoneyExpressionList []MoneyExpression `json:"money_expression_list"`
	// QuantityExpressionList []QuantityExpression `json:"quantity_expression_list"` beta -> disabled
	OtherExpressionList []OtherExpression `json:"other_expression_list"`
	QuotationList       []Quotation       `json:"quotation_list"`
	RelationList        []Relation        `json:"relation_list"`
}

func (*TopicsExtraction) Decode

func (t *TopicsExtraction) Decode(body io.ReadCloser) error

type Variant

type Variant struct {
	Form string `json:"form"`
	Inip string `json:"inip"`
	Endp string `json:"endp"`
}

type Verb

type Verb struct {
	Form              string   `json:"form"`
	LemmaList         []string `json:"lemma_list"`
	SenseIDList       []string `json:"sense_id_list"`
	SemanticLemmaList []string `json:"semantic_lemma_list"`
}

Jump to

Keyboard shortcuts

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