The best-path algorithm searches an WFST for the optimal path leading from the start state to the final state in the sense that it has the minimum total cost.
For each line segment in the reading block, there are a pair of neighboring nodes in the input WFST connected by several arcs.
In other words, we try to combine any two or more adjacent line segments on the same line into a new line segment, and all the possible combinations are built into the input WFST. Therefore, the input WFST contains choices for not only functional class of each line segment but also segmentation positions on each line of the reading block.
In order to determine the best segmentation positions, the WFST in Figure 17 is built, which enumerates all possible combinations of the four line segments (represented as A, B, C, and D respectively in the figure).
After the input WFST is composed with the lexicon and grammar WFSTs, a best-path search is performed to find the functional class of each line segment (or combination of line segments).
After the best-path search in the composed WFST, each input symbol is decoded to recover the functional class and the number of combined line segments by the following:
The lexicon WFST describes the construction of a functional block from line segments (Figure 18).
The grammar WFST describes the construction of a reading block from functional blocks, as shown in Figure 19.
To determine the functional class of each line segment as well as the segmentation positions on each line, the input WFST is composed with the lexicon and grammar WFSTs.
This is done by taking into account the lexicon and grammar constraints of the signature block through the use of weighted finite-state transducers (WFST).
To deal with the oversegmentation problem, a language-directed segmentation approach is proposed, which incorporates the choice of not only functional classes but also segmentation positions into the input WFST. Therefore, the optimal functional classes and segmentation positions are not detected separately.
One possibility is to try different combinations of all reading blocks and select the combination that yields the lowest overall cost in the final WFST, just as we try different combinations of all line segments on the same line in the language-directed segmentation approach.