#include "paddle/fluid/feed/pybind/expand_api.h" #include #include #include #include #include #include #include #include #include #include #include "paddle/fluid/feed/src/common/dict_plugin.h" namespace py = pybind11; namespace paddle { namespace pybind { using paddle::framework::DictPluginManager; using paddle::framework::FeasignCacheDict; void BindExpandDictPlugin(py::module *m); void BindExpandApi(py::module *m) { BindExpandDictPlugin(m); } void BindExpandDictPlugin(py::module *m) { py::class_(*m, "FeasignCacheDict") .def(py::init<>()) .def(py::init()) .def("load", &FeasignCacheDict::Load); py::class_(*m, "DictPluginManager") .def(py::init<>()) .def_static("instance", &DictPluginManager::Instance) .def("load_dict", &DictPluginManager::LoadDict) .def("create_dict", &DictPluginManager::CreateDict); } } // namespace pybind } // namespace paddle