The linearizer interprets the pattern ordering constraints and assembles the words of the sentence into a linear string. In addition, the linearizer deals with punctuation and capitalization. The general algorithm followed by the linearizer is:
The linearizer also deals with inserting sequences of punctuation signs, insertion of spaces between words and the ``liaison'' article ``an'' as in ``an interesting case'' or ``an RPS''. The following rules are implemented:
,, -> , ,. . ,; ; ,: : ,! ! ,? ?
., ., .. . .; .; .: .: .! .! .? .?
;, ; ;. . ;; ; ;: : ;! ! ;? ?
:, : :. : :; : :: : :! ! :? ?
!, !, !. !, !; !; !: !: !! ! !? !?
?, ?, ?. ? ?; ? ?: ? ?! ? ?? ?