Document Presentation and Highlighting

Typically, a query application enables the user to view the documents returned by a query. The user selects a document from the hit list and then the application presents the document in some form.

With Oracle Text, you can display a document in different ways. For example, you can present documents with query terms highlighted. Highlighted query terms can be either the words of a word query or the themes of an ABOUT query in English.

You can also obtain gist (document summary) and theme information from documents with the CTX_DOC PL/SQL package.

Table 5-2 describes the different output you can obtain and which procedure to use to obtain each type.


Table 5-2 CTX_DOC Output

Output Procedure

Plain text version, no highlights

CTX_DOC.FILTER

HTML version of document, no highlights

CTX_DOC.FILTER

Highlighted document, plain text version

CTX_DOC.MARKUP

Highlighted document, HTML version

CTX_DOC.MARKUP

Highlight offset information for plain text version

CTX_DOC.HIGHLIGHT

Highlight offset information for HTML version

CTX_DOC.HIGHLIGHT

Theme summaries and gist of document.

CTX_DOC.GIST

List of themes in document.

CTX_DOC.THEMES


Figure 5-1 shows an original document to which we can apply highlighting, gisting, and theme extraction in the following sections.

Figure 5-1 Sample Document for Highlighting, Gisting, and Theme Extraction

Description of
Description of "Figure 5-1 Sample Document for Highlighting, Gisting, and Theme Extraction"