Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BytePairEncoding ¶
type BytePairEncoding struct {
// contains filtered or unexported fields
}
func NewBytePairEncoding ¶
func NewBytePairEncoding(pre string, vocab *Vocabulary) BytePairEncoding
type Model ¶
type TextProcessor ¶
type Vocabulary ¶
type Vocabulary struct { Values []string Types []uint32 Scores []uint32 Merges []string BOS, EOS int32 // contains filtered or unexported fields }
func (*Vocabulary) Decode ¶
func (v *Vocabulary) Decode(id int32) string
func (*Vocabulary) Encode ¶
func (v *Vocabulary) Encode(s string) int32
func (*Vocabulary) Merge ¶
func (v *Vocabulary) Merge(left, right string) int
func (*Vocabulary) SpecialVocabulary ¶
func (v *Vocabulary) SpecialVocabulary() []string
Click to show internal directories.
Click to hide internal directories.