Open Athospd opened 1 year ago
void Dictionary_addEntry_0(Dictionary& dict, const std::string& entry, int idx)
void Dictionary_addEntry_1(Dictionary& dict, const std::string& entry)
py::class_<Dictionary>(m, "Dictionary")
m.def("create_word_dict", &createWordDict, "lexicon"_a);
m.def("load_words", &loadWords, "filename"_a, "max_words"_a = -1);
m.def("pack_replabels", &packReplabels, "tokens"_a, "dict"_a, "max_reps"_a);
m.def("unpack_replabels", &unpackReplabels, "tokens"_a, "dict"_a, "max_reps"_a);
class PyLM
void LexiconDecoder_decodeStep(LexiconDecoder& decoder, uintptr_t emissions, int T, int N)
std::vector<DecodeResult> LexiconDecoder_decode(LexiconDecoder& decoder, uintptr_t emissions, int T, int N)
void LexiconFreeDecoder_decodeStep(LexiconFreeDecoder& decoder, uintptr_t emissions, int T, int N)
std::vector<DecodeResult> LexiconFreeDecoder_decode(LexiconFreeDecoder& decoder, uintptr_t emissions, int T, int N)
void LexiconSeq2SeqDecoder_decodeStep(LexiconSeq2SeqDecoder& decoder, uintptr_t emissions, int T, int N)
void LexiconFreeSeq2SeqDecoder_decodeStep(LexiconFreeSeq2SeqDecoder& decoder, uintptr_t emissions, int T, int N)
EmittingModelStatePtr createEmittingModelState(py::object obj)
py::object getObjFromEmittingModelState(EmittingModelStatePtr state)
py::enum_<SmearingMode>(m, "SmearingMode")
py::class_<TrieNode, TrieNodePtr>(m, "TrieNode")
py::class_<Trie, TriePtr>(m, "Trie")
py::class_<LM, LMPtr, PyLM>(m, "LM")
py::class_<LMState, LMStatePtr>(m, "LMState")
py::class_<ZeroLM, ZeroLMPtr, LM>(m, "ZeroLM")
py::enum_<CriterionType>(m, "CriterionType")
py::class_<LexiconDecoderOptions>(m, "LexiconDecoderOptions")
py::class_<LexiconFreeDecoderOptions>(m, "LexiconFreeDecoderOptions")
py::class_<DecodeResult>(m, "DecodeResult")
py::class_<LexiconDecoder>(m, "LexiconDecoder")
py::class_<LexiconFreeDecoder>(m, "LexiconFreeDecoder")
py::class_<LexiconSeq2SeqDecoderOptions>(m, "LexiconSeq2SeqDecoderOptions")
py::class_<LexiconFreeSeq2SeqDecoderOptions>(m, "LexiconFreeSeq2SeqDecoderOptions")
py::class_<LexiconSeq2SeqDecoder>(m, "LexiconSeq2SeqDecoder")
py::class_<EmittingModelStatePtr>(m, "EmittingModelState")
m.def("create_emitting_model_state", &createEmittingModelState);
m.def("get_obj_from_emitting_model_state", &getObjFromEmittingModelState)
py::bind_vector<std::vector<EmittingModelStatePtr>>(m, "VectorEmittingModelState")
py::implicitly_convertible<py::list, std::vector<EmittingModelStatePtr>>()
py::class_<LexiconFreeSeq2SeqDecoder>(m, "LexiconFreeSeq2SeqDecoder")
py::class_<KenLM, KenLMPtr, LM>(m, "KenLM")
'https://github.com/pytorch/audio/blob/main/torchaudio/models/decoder/_ctc_decoder.py'
from flashlight.lib.text.decoder import (
)
from flashlight.lib.text.dictionary import (
src\flashlight\lib\text
void Dictionary_addEntry_0(Dictionary& dict, const std::string& entry, int idx)
void Dictionary_addEntry_1(Dictionary& dict, const std::string& entry)
py::class_<Dictionary>(m, "Dictionary")
m.def("create_word_dict", &createWordDict, "lexicon"_a);
m.def("load_words", &loadWords, "filename"_a, "max_words"_a = -1);
m.def("pack_replabels", &packReplabels, "tokens"_a, "dict"_a, "max_reps"_a);
m.def("unpack_replabels", &unpackReplabels, "tokens"_a, "dict"_a, "max_reps"_a);
class PyLM
void LexiconDecoder_decodeStep(LexiconDecoder& decoder, uintptr_t emissions, int T, int N)
std::vector<DecodeResult> LexiconDecoder_decode(LexiconDecoder& decoder, uintptr_t emissions, int T, int N)
void LexiconFreeDecoder_decodeStep(LexiconFreeDecoder& decoder, uintptr_t emissions, int T, int N)
std::vector<DecodeResult> LexiconFreeDecoder_decode(LexiconFreeDecoder& decoder, uintptr_t emissions, int T, int N)
void LexiconSeq2SeqDecoder_decodeStep(LexiconSeq2SeqDecoder& decoder, uintptr_t emissions, int T, int N)
void LexiconFreeSeq2SeqDecoder_decodeStep(LexiconFreeSeq2SeqDecoder& decoder, uintptr_t emissions, int T, int N)
EmittingModelStatePtr createEmittingModelState(py::object obj)
py::object getObjFromEmittingModelState(EmittingModelStatePtr state)
py::enum_<SmearingMode>(m, "SmearingMode")
py::class_<TrieNode, TrieNodePtr>(m, "TrieNode")
py::class_<Trie, TriePtr>(m, "Trie")
py::class_<LM, LMPtr, PyLM>(m, "LM")
py::class_<LMState, LMStatePtr>(m, "LMState")
py::class_<ZeroLM, ZeroLMPtr, LM>(m, "ZeroLM")
py::enum_<CriterionType>(m, "CriterionType")
py::class_<LexiconDecoderOptions>(m, "LexiconDecoderOptions")
py::class_<LexiconFreeDecoderOptions>(m, "LexiconFreeDecoderOptions")
py::class_<DecodeResult>(m, "DecodeResult")
py::class_<LexiconDecoder>(m, "LexiconDecoder")
py::class_<LexiconFreeDecoder>(m, "LexiconFreeDecoder")
py::class_<LexiconSeq2SeqDecoderOptions>(m, "LexiconSeq2SeqDecoderOptions")
py::class_<LexiconFreeSeq2SeqDecoderOptions>(m, "LexiconFreeSeq2SeqDecoderOptions")
py::class_<LexiconSeq2SeqDecoder>(m, "LexiconSeq2SeqDecoder")
py::class_<EmittingModelStatePtr>(m, "EmittingModelState")
m.def("create_emitting_model_state", &createEmittingModelState);
m.def("get_obj_from_emitting_model_state", &getObjFromEmittingModelState)
py::bind_vector<std::vector<EmittingModelStatePtr>>(m, "VectorEmittingModelState")
py::implicitly_convertible<py::list, std::vector<EmittingModelStatePtr>>()
py::class_<LexiconFreeSeq2SeqDecoder>(m, "LexiconFreeSeq2SeqDecoder")
src\flashlight\lib\text\decoder
py::class_<KenLM, KenLMPtr, LM>(m, "KenLM")
from pytorch´s ctc_decoder.py
from flashlight.lib.text.decoder import (
)
from flashlight.lib.text.dictionary import (
)