13.11.2014 Views

Introduction to Computational Linguistics

Introduction to Computational Linguistics

Introduction to Computational Linguistics

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

17. Using Finite State Transducers 63<br />

characters of the input and output strings. There is only one possibility: the transition<br />

t(0). This results in the following: we are now in state 1, and one character<br />

from both strings has been read. The conjunction of facts (i) is in state 1, (ii) has<br />

read one character from in put, (iii) has read one character from output we call<br />

a configuration. We visualize this configuration by 1, a|aa : b|bbb. The bar is<br />

placed right after the characters that have been consumed or read.<br />

Next we face a choice: either we take t(1) and consume the input a but no<br />

output letter, or we take t(2) and consume the output b but no input letter. Faced<br />

with this choice, we take the transition with the least number, so we follow t(1).<br />

The configuration is now this: 1, aa|a : b|bbb. Now face the same choice again,<br />

<strong>to</strong> do either t(1) or t(2). We decide in the same way, choosing t(1), giving 1, aaa| :<br />

b|bbb. Now, no more choice exists, and we can only proceed with t(2), giving<br />

1, aaa| : bbb|b. One last time we do t(2), and we are done. This is exactly the first<br />

of the runs. Now, backtracking can be one for any reason. In this case the reason<br />

is: we want <strong>to</strong> find another run. To do that, we go back <strong>to</strong> the last point where<br />

there was an actual choice. This was the configuration 1, aa|a : b|bbb. Here,<br />

we were able <strong>to</strong> choose between t(1) and t(2) and we chose t(1). In this case we<br />

decide differently: now we take t(2), giving 1, aa|a : bb|bb. From this moment<br />

we have again a choice, but now we fall back on our typical recipe: choose t(1)<br />

whenever possible. This gives the third run above. If again we backtrack, it is<br />

the last choice point within the run we are currently considering that we look at.<br />

Where we chose t(1) we now choose t(2), and we get this run:<br />

(167)<br />

0 a:b −→ 1 a:ε<br />

−→ 1 ε:b<br />

−→ 1 ε:b<br />

−→ 1 a:ε<br />

−→ 1 ε:b<br />

−→ 1<br />

Here is how backtracking continues <strong>to</strong> enumerate the runs:<br />

(168)<br />

0 a:b −→ 1 a:ε<br />

−→ 1 ε:b<br />

−→ 1 ε:b<br />

−→ 1 a:ε<br />

−→ 1 ε:b<br />

−→ 1<br />

0 a:b −→ 1 a:ε<br />

−→ 1 ε:b<br />

−→ 1 ε:b<br />

−→ 1 ε:b<br />

−→ 1 a:ε<br />

−→ 1<br />

0 a:b −→ 1 ε:b<br />

−→ 1 a:ε<br />

−→ 1 a:ε<br />

−→ 1 ε:b<br />

−→ 1 ε:b<br />

−→ 1<br />

0 a:b −→ 1 ε:b<br />

−→ 1 a:ε<br />

−→ 1 ε:b<br />

−→ 1 a:ε<br />

−→ 1 ε:b<br />

−→ 1<br />

0 a:b −→ 1 ε:b<br />

−→ 1 a:ε<br />

−→ 1 ε:b<br />

−→ 1 ε:b<br />

−→ 1 a:ε<br />

−→ 1<br />

0 a:b −→ 1 ε:b<br />

−→ 1 ε:b<br />

−→ 1 a:ε<br />

−→ 1 ε:b<br />

−→ 1 a:ε<br />

−→ 1<br />

0 a:b −→ 1 ε:b<br />

−→ 1 ε:b<br />

−→ 1 ε:b<br />

−→ 1 a:ε<br />

−→ 1 a:ε<br />

−→ 1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!