Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClassConfidencePair ¶
type ClassConfidencePair struct { Class string `json:"class"` Confidence float32 `json:"confidence"` }
ClassConfidencePair is a pair of class and confidence.
type Gateway ¶
type Gateway struct {
// contains filtered or unexported fields
}
Gateway provides access to spaGO classification API.
func NewGateway ¶
func NewGateway(connection *grpc.ClientConn) *Gateway
NewGateway returns a new Gateway.
func (*Gateway) ClassifyNLI ¶
func (s *Gateway) ClassifyNLI(text, hypothesisTemplate string, possibleLabels []string, multiClass bool) (*ZeroShotClassification, error)
ClassifyNLI performs a zero-shot classification against spaGO API.
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
Worker is a single worker that performs articles vectorization.
type ZeroShotClassification ¶
type ZeroShotClassification struct {
Distribution []ClassConfidencePair `json:"distribution"`
}
ZeroShotClassification is the result of a spaGO zero-shot classification.
func (*ZeroShotClassification) Scan ¶
func (z *ZeroShotClassification) Scan(value interface{}) error
Scan implements the Scanner interface.
Click to show internal directories.
Click to hide internal directories.