This paper describes a fast and effective component grouping algorithm for some layout analysis problems of textual document images. Based on an empiricalfunction, it discovers neighborhood relations at the component level. Time-consuming algorithms that operate globally among components may obtain significant pe$ormarzce boost from the localization information that this grouping algorithm provides. Some of the applications using this grouping function are also demonstrated.