HFST - Helsinki Finite-State Transducer Technology - C++ API
version 3.9.1
|
Context transducers are not automata. More...
#include <HfstExceptionDefs.h>
Additional Inherited Members | |
Public Member Functions inherited from HfstException | |
HFSTDLL std::string | operator() (void) const |
Get the error message. More... | |
Context transducers are not automata.
This exception is thrown by hfst::rules::replace_up(HfstTransducerPair&, HfstTransducer&, bool, StringPairSet&) when either context transducer does not have equivalent input and output symbols in all its transitions.
An example:
ImplementationType type = SFST_TYPE; // The second context transducer is HfstTransducerPair contexts(HfstTransducer("c", type), HfstTransducer("c", "d", type)); HfstTransducer mapping("a", "b", type); StringPairSet alphabet; alphabet.insert(StringPair("a", "a")); alphabet.insert(StringPair("b", "b")); alphabet.insert(StringPair("c", "c")); alphabet.insert(StringPair("d", "d")); hfst::rules::replace_up(contexts, mapping, true, alphabet);