6 #ifndef _FCITX_LIBIME_CORE_DECODER_H_ 7 #define _FCITX_LIBIME_CORE_DECODER_H_ 12 #include <string_view> 14 #include <fcitx-utils/macros.h> 15 #include <libime/core/dictionary.h> 16 #include <libime/core/languagemodel.h> 17 #include <libime/core/lattice.h> 18 #include <libime/core/libimecore_export.h> 19 #include <libime/core/segmentgraph.h> 33 constexpr
static const size_t beamSizeDefault = 20;
34 constexpr
static const size_t frameSizeDefault = 40;
41 float max = std::numeric_limits<float>::max(),
42 float min = -std::numeric_limits<float>::max(),
43 size_t beamSize = beamSizeDefault,
44 size_t frameSize = frameSizeDefault,
45 void *helper =
nullptr)
const;
50 std::string_view word, WordIndex idx,
51 SegmentGraphPath path,
const State &state,
float cost = 0,
52 std::unique_ptr<LatticeNodeData> data =
nullptr,
53 bool onlyPath =
false)
const {
54 return createLatticeNodeImpl(graph, model, word, idx, std::move(path),
55 state, cost, std::move(data), onlyPath);
59 std::string_view word, WordIndex idx, SegmentGraphPath path,
60 const State &state,
float cost, std::unique_ptr<LatticeNodeData> data,
69 std::unique_ptr<DecoderPrivate> d_ptr;
74 #endif // _FCITX_LIBIME_CORE_DECODER_H_