Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion decoder/bpe.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func NewBpeDecoder(suffix string) *BpeDecoder {

// DefaultBpeDecoder create a new BpeDecoder with default suffix (`</w>`)
func DefaultBpeDecoder() *BpeDecoder {
return &BpeDecoder{suffix: "</w>"}
return NewBpeDecoder("</w>")
}

/*
Expand Down
7 changes: 2 additions & 5 deletions decoder/wordpiece.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,9 @@ func NewWordPieceDecoder(prefix string, cleanup bool) *WordPieceDecoder {
return d
}

// DefaultBpeDecoder create a new BpeDecoder with default suffix (`</w>`)
// DefaultWordpieceDecoder creates a new WordPieceDecoder with default prefix (`##`)
func DefaultWordpieceDecoder() *WordPieceDecoder {
return &WordPieceDecoder{
prefix: "##",
cleanup: true,
}
return NewWordPieceDecoder("##", true)
}

/*
Expand Down