Documentation ¶
Index ¶
Constants ¶
View Source
const ( MAX_UNIGRAM = 8 UNI_COUNT_WEIGHT float64 = 1.0 HAMMING_WEIGHT float64 = -1.0 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Searcher ¶
type Searcher struct {
// contains filtered or unexported fields
}
Encapsulates translation memory searcher
func NewSearcher ¶
Initialize SQL statement
func (*Searcher) Search ¶
func (searcher *Searcher) Search(ctx context.Context, query string, domain string, wdict map[string]dicttypes.Word) (*Results, error)
Searches the translation memory for approximate matches. Parameters
ctx Request context query The search query domain The domain to restrict the query to (optional) wdict The full dictionary
Retuns
A slice of approximate results
Click to show internal directories.
Click to hide internal directories.