A method of stochastic syntactic analysis is applied to extracting the logical structure of a printed docum e n t from. its ph,ysical layout and keywords indica& ing logical compon.ents. T h e document is parsed as a sentence consisting of text lin,es and graphic objects according to (L stochastic regular gram,mar with attributes. B y vsing stoch,astic analysis, th.e purser can retain possible results in order of their probobility, and thus, if am.biyuity occ'urs, it selects an, oytimtil result more appropriately than determ,inistic system.s. A markup system applying the m,ethod urns constructed, and 87% of the logical components of man:uals and 82% of those of technical papers are correctly marked up. T h e rate improved to 89% wh,en the secon,d candidates were considered, showing the advantage of our approach over the deterministic approuch.