model: treat 'user defined' tokens as special tokens (#11077)

This commit is contained in:
Jeffrey Morgan
2025-06-16 16:03:16 -07:00
committed by GitHub
parent a6fbfc880c
commit 9e125d884c
2 changed files with 17 additions and 1 deletions

View File

@@ -87,7 +87,7 @@ func (v *Vocabulary) Decode(id int32) string {
func (v *Vocabulary) SpecialVocabulary() []string {
v.specialOnce.Do(func() {
for i := range v.Values {
if v.Types[i] == TOKEN_TYPE_CONTROL {
if v.Types[i] == TOKEN_TYPE_CONTROL || v.Types[i] == TOKEN_TYPE_USER_DEFINED {
v.special = append(v.special, v.Values[i])
}
}