From rhetorical structures to document structure: shallow pragmatic analysis for document engineering