HFST - Helsinki Finite-State Transducer Technology API
version 3.7.1
|
Context transducers are not automata. More...
#include <HfstExceptionDefs.h>
Additional Inherited Members | |
Public Member Functions inherited from HfstException | |
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);