A finite-state transducer (FST) is a finite-state machine with two memory tapes, following the terminology for Turing machines: an input tape and an output tape. This contrasts with an ordinary finite-state automaton, which has a single tape. An FST is a type of finite-state automaton (FSA) that maps between two sets of symbols. An FST is more general than an FSA.
An FSA defines a formal language by defining a set of accepted strings, while an FST defines relations between sets of strings. An FST will read a set of strings on the input tape and generates a set of relations on the output tape. An FST can be thought of as a translator or relater between strings in a set. In morphological parsing, an example would be inputting a string of letters into the FST, the FST would then output a string of morphemes.
FSTs are used in a variety of applications, including:
Natural language processing: FSTs are used in natural language processing for tasks such as morphological analysis, part-of-speech tagging, and named entity recognition.
Speech recognition: FSTs are used in speech recognition for tasks such as acoustic modeling and decoding.
Machine translation: FSTs are used in machine translation for tasks such as lexical translation and grammar conversion.
Compilers: FSTs are used in compilers for tasks such as lexical analysis and syntax analysis.
FSTs are a powerful tool for modeling and manipulating strings. They are used in a variety of applications, including natural language processing, speech recognition, machine translation, and compilers.
A finite state transducer (FST) is a tuple
⟨Q
, I
, δ
, q0
, F
, O
, η⟩
, where:
Q
is a finite set of states. Each state represents a possible configuration of the FST.
I
is a finite input alphabet. Each symbol in the input alphabet represents a possible input that the FST can read.
δ
is the transition function. It maps a state and an input symbol to a new state.
q0
is the initial state. This is the state that the FST starts in when it is first activated.
F
is the set of final states. A state is a final state if it represents a valid output.
O
is the output alphabet. Each symbol in the output alphabet represents a possible output that the FST can produce.
η
is the output function. It maps a state and an input symbol to a sequence of output symbols.
The rule that all of these variables follow is that they must be finite. This means that there can only be a finite number of states, input symbols, final states, and output symbols. This is because an FST is a finite-state machine, which is a machine that can only be in a finite number of states at any given time.
Remark
the condition for acceptance remains the same as in acceptors
the translation is performed only on accepted strings
Build a complete FST accepting the following language
over the alphabet A={0,1}
. L={x∈A∗∣ the number of 0′s is even}
The FST outputs the string obtained by removing every odd occurrence of 0 and doubling every occurrence of 1. Examples of inputs recognised by L and their respective outputs:
Build complete FSAs over the languages given below:
A={w,t,a,l,k,e,d}
that accepts only the verb ”walked” or ”talked”. The FST will translate the input verb to present form ex: walked to walk.
A={a,b}
that accepts only strings ending with the letter b. The FST will translate the input string where every second symbol a in the input is erased.
A={0,1}
that accepts strings that are binary representation of integers divisible by 2. The FST will translate the input string into result of division by 2.
A={0,1}
that accepts strings that are binary representation of integers divisible by 3. The FST will translate the input string into result of division by 3.
Suppose M1=(Q1,A,δ1,q01,F1)
and M2=(Q2,A,δ2,q02,F2)
are finite state automata accepting L1
and L2
, respectively. LetM
be the complete FSA M=(Q,A,δ,q0,F)
, where:
Q=Q1×Q2q0=(q01,q02)
the transition function δ
is defined by the formula
δ((q,p),a)=(δ1(q,a),δ2(p,a))
for every q∈Q1
, every p∈Q2
, and every a∈A
. And the set of the final states is defined as:
F={(q,p)∣q∈F1∧p∈F2}M
accepts the language L1∩L2
.
Suppose M1=(Q1,A,δ1,q01,F1)
and M2=(Q2,A,δ2,q02,F2)
are finite state automata accepting L1
and L2
, respectively. LetM
be the complete FSA M=(Q,A,δ,q0,F)
, where:
Q=Q1×Q2q0=(q01,q02)
the transition function δ
is defined by the formula
δ((q,p),a)=(δ1(q,a),δ2(p,a))
for every q∈Q1
, every p∈Q2
, and every a∈A
. And the set of the final states is defined as:
F={(q,p)∣q∈F1∨p∈F2}M
accepts the language L1∪L2
.
Suppose M1=(Q1,A,δ1,q01,F1)
and M2=(Q2,A,δ2,q02,F2)
are finite state automata accepting L1
and L2
, respectively. LetM
be the complete FSA M=(Q,A,δ,q0,F)
, where:
Q=Q1×Q2q0=(q01,q02)
the transition function δ
is defined by the formula
δ((q,p),a)=(δ1(q,a),δ2(p,a))
for every q∈Q1
, every p∈Q2
, and every a∈A
. And the set of the final states is defined as:
F={(q,p)∣q∈F1∧p∈/F2}M
accepts the language L1∖L2
.
Suppose M1=(Q1,A,δ1,q01,F1)
and M2=(Q2,A,δ2,q02,F2)
are finite state automata accepting L1
and L2
, respectively. LetM
be the complete FSA M=(Q,A,δ,q0,F)
, where: