OpenFst is a library for constructing, combining, optimizing, and searching
weighted finite-state transducers (FSTs). Weighted finite-state transducers
are automata where each transition has an input label, an output label, and
a weight. The more familiar finite-state acceptor is represented as a
transducer with each transition's input and output label equal.
Finite-state acceptors are used to represent sets of strings (specifically,
regular or rational sets); finite-state transducers are used to represent
binary relations between pairs of strings (specifically, rational
transductions). The weights can be used to represent the cost of taking
a particular transition.
FSTs have key applications in speech recognition and synthesis, machine
translation, optical character recognition, pattern matching, string
processing, machine learning, information extraction and retrieval
among others. Often a weighted transducer is used to represent a
probabilistic model (e.g., an n-gram model, pronunciation model). FSTs can
be optimized by determinization and minimization, models can be applied to
hypothesis sets (also represented as automata) or cascaded by finite-state
composition, and the best results can be selected by shortest-path algorithms.
math/openfst-vosk: fix build with clang and libc++ 19
With clang and libc++ 19 math/openfst-vosk fails to compile, with errors
similar to:
./../include/fst/fst.h:704:15: error: no viable overloaded '='
704 | isymbols_ = impl.isymbols_ ? impl.isymbols_->Copy() : nullptr;
| ~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/v1/__memory/unique_ptr.h:231:67: note: candidate function not
viable: no known conversion from 'SymbolTable *' to 'unique_ptr<SymbolTable>'
for 1st argument
231 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr&
operator=(unique_ptr&& __u) _NOEXCEPT {
| ^
~~~~~~~~~~~~~~~~
/usr/include/c++/v1/__memory/unique_ptr.h:241:67: note: candidate template
ignored: could not match 'unique_ptr<_Up, _Ep>' against 'SymbolTable *'
241 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr&
operator=(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT {
| ^
/usr/include/c++/v1/__memory/unique_ptr.h:263:67: note: candidate function not
viable: no known conversion from 'SymbolTable *' to 'nullptr_t' (aka
'std::nullptr_t') for 1st argument
(Only the first 15 lines of the commit message are shown above )