HFST - Helsinki Finite-State Transducer Technology - C++ API  version 3.9.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
List of all members
ContextTransducersAreNotAutomataException Struct Reference

Context transducers are not automata. More...

#include <HfstExceptionDefs.h>

Inheritance diagram for ContextTransducersAreNotAutomataException:
HfstException

Additional Inherited Members

- Public Member Functions inherited from HfstException
HFSTDLL std::string operator() (void) const
 Get the error message. More...
 

Detailed Description

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);

The documentation for this struct was generated from the following file: