rau.vocab

class rau.vocab.Vocabulary

Bases: object

class rau.vocab.VocabularyBuilder

Bases: Generic[V]

catchall(token)
Return type:

TypeVar(V)

content(tokens)
Return type:

TypeVar(V)

reserved(tokens)
Return type:

TypeVar(V)

rau.vocab.build_to_int_vocabulary(func)
Return type:

ToIntVocabulary

class rau.vocab.ToIntVocabulary

Bases: Vocabulary

has_catchall()
Return type:

bool

to_int(token)
Return type:

int

class rau.vocab.ToIntVocabularyBuilder

Bases: VocabularyBuilder[ToIntVocabulary]

catchall(token)
Return type:

ToIntVocabulary

content(tokens)
Return type:

ToIntVocabulary

reserved(tokens)
Return type:

ToIntVocabulary

rau.vocab.build_to_string_vocabulary(func)
Return type:

ToStringVocabulary

class rau.vocab.ToStringVocabulary

Bases: Vocabulary

__init__(reserved_names)
to_string(index)
Return type:

str

class rau.vocab.ToStringVocabularyBuilder

Bases: VocabularyBuilder[ToStringVocabulary]

catchall(token)
Return type:

ToStringVocabulary

content(tokens)
Return type:

ToStringVocabulary

reserved(tokens)
Return type:

ToStringVocabulary