Documentation ¶
Overview ¶
Package fakebox provides a client for accessing Fakebox services.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Analysis ¶
type Analysis struct { // Title is the response object for the title analysis. Title Title `json:"title"` // Content is the response object for the content analysis. Content Content `json:"content"` // Domain is the response object for the domain analysis. Domain Domain `json:"domain"` }
Analysis represents an analysis of title, content and domain.
type Client ¶
type Client struct { // HTTPClient is the http.Client that will be used to // make requests. HTTPClient *http.Client // contains filtered or unexported fields }
Client is an HTTP client that can make requests to the box.
type Content ¶
type Content struct { // Decision is the string representing the decision could be bias/unsure/impartial. Decision string `json:"decision,omitempty"` // Score is the numeric score of the decision is between 0.00 (bias) and 1.00 (impartial). Score float64 `json:"score,omitempty"` // Entities represents entities discovered in the text. Entities []Entity `json:"entities,omitempty"` // Keywords are the most relevant keywords extracted from the text. Keywords []Keyword `json:"keywords"` }
Content is the response object for the content analysis.
type Domain ¶
type Domain struct { // Domain is the domain extracted from the URL. Domain string `json:"domain,omitempty"` // Category is one of the listed on the API docs. Category string `json:"category,omitempty"` }
Domain is the response object for the domain analysis.
type Entity ¶
type Entity struct { // Type is a string describing the kind of entity. Type string `json:"type"` // Text is the text of the entity. Text string `json:"text"` // Start is the absolute start position of the entity (in the original text). Start int `json:"start"` // Start is the absolute end position of the entity (in the original text). End int `json:"end"` }
Entity represents an entity discovered in the text.
type Keyword ¶
type Keyword struct {
Keyword string `json:"keyword"`
}
Keyword represents a key word.
type Title ¶
type Title struct { // Decision is the string representing the decision could be bias/unsure/impartial. Decision string `json:"decision,omitempty"` // Score is the numeric score of the decision is between 0.00 (bias) and 1.00 (impartial). Score float64 `json:"score,omitempty"` // Entities represents entities discovered in the text. Entities []Entity `json:"entities,omitempty"` }
Title is the response object for the title analysis.
Click to show internal directories.
Click to hide internal directories.