client

package
v0.2.31 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GigClient

type GigClient struct {
	ApiUrl                 string `json:"api_url" bson:"api_url"`
	ApiKey                 string `json:"api_key" bson:"api_key"`
	NerServerUrl           string `json:"ner_server_url" bson:"ner_server_url"`
	NormalizationServerUrl string `json:"normalization_url" bson:"normalization_url"`
	OcrServerUrl           string `json:"ocr_server_url" bson:"ocr_server_url"`
}
func (c *GigClient) AddEntitiesAsLinks(entity *models.Entity, linkEntities []models.Entity) error

AddEntitiesAsLinks - Add list of related entities to a given entity

func (*GigClient) AddEntityAsAttribute

func (c *GigClient) AddEntityAsAttribute(entity models.Entity, attributeName string, attributeEntity models.Entity) (models.Entity, models.Entity, error)

AddEntityAsAttribute - Add entity as an attribute to a given entity

func (c *GigClient) AddEntityAsLink(entity models.Entity, linkEntity models.Entity) (models.Entity, models.Entity, error)

AddEntityAsLink - Add entity as a link to a given entity

func (*GigClient) AppendToEntity added in v0.2.30

func (c *GigClient) AppendToEntity(appendEntity models.UpdateEntity) (models.Entity, error)

AppendToEntity - Append to entity value

func (*GigClient) CreateEntities

func (c *GigClient) CreateEntities(entities []models.Entity) ([]models.Entity, error)

CreateEntities - Create a list of new entities and save to GIG

func (*GigClient) CreateEntity

func (c *GigClient) CreateEntity(entity models.Entity) (models.Entity, error)

CreateEntity - Create a new entity and save to GIG

func (*GigClient) CreateEntityFromText

func (c *GigClient) CreateEntityFromText(textContent string, title string, categories []string, entityTitles []models.NERResult) error

CreateEntityFromText - create entity from text content

func (*GigClient) ExtractEntityNames

func (c *GigClient) ExtractEntityNames(textContent string) ([]models.NERResult, error)

ExtractEntityNames - NER extraction

func (*GigClient) GetEntity

func (c *GigClient) GetEntity(title string) (models.Entity, error)

GetEntity - get entity by title

func (*GigClient) GetEntityByAttribute added in v0.2.30

func (c *GigClient) GetEntityByAttribute(attributeName string, valueString string) (models.Entity, error)

GetEntityByAttribute - get entity by attribute

func (GigClient) GetRequest

func (c GigClient) GetRequest(uri string) (string, error)

GetRequest - get the response string for a given url

func (*GigClient) NormalizeName

func (c *GigClient) NormalizeName(title string) (string, error)

NormalizeName - normalize entity title before appending

func (*GigClient) PostRequest

func (c *GigClient) PostRequest(uri string, data interface{}) (string, error)

PostRequest - Post to an url with data

func (*GigClient) UploadFile added in v0.1.8

func (c *GigClient) UploadFile(payload models.Upload) error

UploadFile - Upload an image through API

type Response

type Response struct {
	Status  int    `json:"status"`
	Payload string `json:"payload"`
}

Jump to

Keyboard shortcuts

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