Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) AddExtension(ctx context.Context, extension *models.C11yExtension) error
- func (c *Client) IsStopWord(ctx context.Context, word string) (bool, error)
- func (c *Client) IsWordPresent(ctx context.Context, word string) (bool, error)
- func (c *Client) MetaInfo() (map[string]interface{}, error)
- func (c *Client) MultiNearestWordsByVector(ctx context.Context, vectors [][]float32, k, n int) ([]*txt2vecmodels.NearestNeighbors, error)
- func (c *Client) MultiVectorForWord(ctx context.Context, words []string) ([][]float32, error)
- func (c *Client) NearestWordsByVector(ctx context.Context, vector []float32, n int, k int) ([]string, []float32, error)
- func (c *Client) SafeGetSimilarWordsWithCertainty(ctx context.Context, word string, certainty float32) ([]string, error)
- func (c *Client) SchemaSearch(ctx context.Context, params traverser.SearchParams) (traverser.SearchResults, error)
- func (c *Client) VectorForCorpi(ctx context.Context, corpi []string, overridesMap map[string]string) ([]float32, []txt2vecmodels.InterpretationSource, error)
- func (c *Client) VectorForWord(ctx context.Context, word string) ([]float32, error)
- func (c *Client) VectorOnlyForCorpi(ctx context.Context, corpi []string, overrides map[string]string) ([]float32, error)
- func (c *Client) WaitForStartupAndValidateVersion(startupCtx context.Context, requiredMinimumVersion string, ...) error
Constants ¶
View Source
const ModelUncontactable = "module uncontactable"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client establishes a gRPC connection to a remote contextionary service
func NewClient ¶
func NewClient(uri string, logger logrus.FieldLogger) (*Client, error)
NewClient from gRPC discovery url to connect to a remote contextionary service
func (*Client) AddExtension ¶
func (*Client) IsStopWord ¶
IsStopWord returns true if the given word is a stopword, errors on connection errors
func (*Client) IsWordPresent ¶
IsWordPresent returns true if the given word is a stopword, errors on connection errors
func (*Client) MultiNearestWordsByVector ¶
func (c *Client) MultiNearestWordsByVector(ctx context.Context, vectors [][]float32, k, n int) ([]*txt2vecmodels.NearestNeighbors, error)
func (*Client) MultiVectorForWord ¶
func (*Client) NearestWordsByVector ¶
func (*Client) SafeGetSimilarWordsWithCertainty ¶
func (c *Client) SafeGetSimilarWordsWithCertainty(ctx context.Context, word string, certainty float32) ([]string, error)
SafeGetSimilarWordsWithCertainty will always return a list words - unless there is a network error
func (*Client) SchemaSearch ¶
func (c *Client) SchemaSearch(ctx context.Context, params traverser.SearchParams) (traverser.SearchResults, error)
SchemaSearch for related classes and properties TODO: is this still used?
func (*Client) VectorForCorpi ¶
func (c *Client) VectorForCorpi(ctx context.Context, corpi []string, overridesMap map[string]string) ([]float32, []txt2vecmodels.InterpretationSource, error)
func (*Client) VectorForWord ¶
func (*Client) VectorOnlyForCorpi ¶
Click to show internal directories.
Click to hide internal directories.