@TECHREPORT{Jaakkola99nestedtext-region, author = {Jani Jaakkola and Pekka Kilpeläinen}, title = {Nested Text-Region Algebra}, institution = {}, year = {1999} }

Share

OpenURL

Abstract

So called region algebras operating on sets of text fragments have been proposed and implemented as query languages for text documents. Text documents often comprise nested regions like lists within lists or procedures within procedures. Earlier versions of region algebra do not support querying nested regions. We address this deficiency by proposing a new, unrestricted region algebra. The new algebra allows dynamic definition of nested regions. This makes it suitable for querying without any preprocessing documents, whose hierarchical structure is indicated by embedded markup. We demonstrate that this nested region algebra can be efficiently implemented, by presenting and analyzing algorithms for its operations. Especially, we show that any fixed nested region algebra expression on text of length n can be evaluated in the worst case in time O(n 2 ), and in practice in linear time. Nested region algebra has been implemented in a publicly available Unix text search tool called sgrep. ...