Oracle8i interMedia Text Migration
Release 2 (8.1.6)

Part Number A77061-01

Library

Product

Contents

Index

Go to previous page Go to beginning of chapter Go to next page

Document Presentation, 3 of 3


Obtaining List of Themes, Gists, and Theme Summaries

The following changes have been made in 8.1:

In release 8.1.6, the following additional new features apply to document services:

The following table describes list of themes, Gists, and theme summaries. Their definitions have not changed in 8.1.

Table 7-1
Output Type  Description 

List of Themes 

A list of the main concepts of a document.

You can generate list of themes where each theme is a single word or phrase or where each theme is a hierarchical list of parent themes. 

Gist 

Text in a document that best represents what the document is about as a whole.  

Theme Summary 

Text in a document that best represents a given theme in the document. 

Pre-8.1 Method

Creating Output Tables

Before you generate list of themes, theme summaries, or Gists, you must create result table to store the CTX_LING output.

To create a theme table called CTX_THEMES to store the list of themes from REQUEST_THEMES, issue the following SQL statement:

    create table ctx_themes (
        cid        number,
        pk         varchar2(64),
        theme      varchar2(2000),
        weight     number);

To create a Gist table called CTX_GIST to store the Gist or theme summaries from REQUEST_GIST, issue the following SQL statement:

    create table ctx_gist (
        cid        number,
        pk         varchar2(64),
        pov        varchar2(80),
        gist       long); 

List of Themes

Use CTX_LING.REQUEST_THEMES to generate themes.

Example
The following anynomous PL/SQL block generates a list of themes for document 
20 by calling CTX_LING.REQUEST_THEMES and then CTX_LING.SUBMIT.

declare handle number;
begin
ctx_ling.request_themes('CTXSYS.DOC_POLICY','20','CTX_THEMES');
handle := ctx_ling.submit; 
end;

Theme Summaries and Gists

Use CTX_LING.REQUEST_GIST to generate theme summaries and gists.

Example

The following anonymous PL/SQL block generates a theme summary for document 20 about the theme of insects. The theme summary is generated by calling CTX_LING.REQUEST_GIST and then CTX_LING.SUBMIT.

declare handle number;
begin
ctx_ling.request_gist('CTXSYS.DOC_POLICY','20','CTX_GIST',
                      'PARAGRAPH', 'insects');
handle := ctx_ling.submit; 
end;

Full Theme Output

You can obtain a list of themes where each element in the list is a hierarchical list of parent themes. To do so, issue the following statements:

SQL> exec ctx_ling.set_full_themes(TRUE)  
SQL> exec ctx_ling.request_themes('ctx_thidx', pk, 'ctx_themes')  
SQL> exec ctx_ling.submit(200)  

Changing Gist Size

You change the default size of Gists using the ConText Workbench administration tool.


New 8.1 Solution

The CTX_LING package is no longer supported. The Gist and theme generation procedures are in the CTX_DOC package. No need to explicitly submit document services requests, since requests are synchronous. No servers need to be running.

List of Themes

A list of themes is a list of the main concepts in a document.

Use the CTX_DOC.THEMES procedure to generate lists of themes.

See Also:

To learn about the command syntax for CTX_DOC.THEMES, see Oracle8i interMedia Text Reference

Theme Table

To create a theme table:

create table ctx_themes (query_id number, 
                         theme varchar2(2000), 
                         weight number);
Single Themes

To obtain a list of themes where each element in the list is a single theme, issue:

begin
ctx_doc.themes('newsindex',34,'CTX_THEMES',1,full_themes => FALSE);
end;
Full Themes

To obtain a list of themes where each element in the list is a hierarchical list of parent themes, issue:

begin
ctx_doc.themes('newsindex',34,'CTX_THEMES',1,full_themes => TRUE);
end;

Gist and Theme Summary

The definition of a Gist and theme summary has not changed for 8.1. A Gist is the text of a document that best represents what the document is about as a whole. A theme summary is the text of a document that best represents a single theme in the document.

In 8.1, you can specify the size of the Gist or theme summary when you call the procedure.

Use the procedure CTX_DOC.GIST to generate Gists and theme summaries.

See Also:

To learn about the command syntax for CTX_DOC.GIST, see Oracle8i interMedia Text Reference

Gist Table

To create a gist table:

create table ctx_gist (query_id  number,
                       pov       varchar2(80), 
                       gist      CLOB);
Gists

The following example returns a default sized paragraph level Gist for document 34:

begin
ctx_doc.gist('newsindex',34,'CTX_GIST',1,'PARAGRAPH', pov =>'GENERIC');
end;

The following example generates a non-default size Gist of ten paragraphs:

begin
ctx_doc.gist('newsindex',34,'CTX_GIST',1,'PARAGRAPH', pov =>'GENERIC',        
numParagraphs => 10);
end;

The following example generates a Gist whose number of paragraphs is ten percent of the total paragraphs in document:

begin 
ctx_doc.gist('newsindex',34,'CTX_GIST',1, 'PARAGRAPH', pov =>'GENERIC', 
maxPercent => 10);
end;
Theme Summary

The following example returns a theme summary on the theme of insects for document with textkey 34. The default Gist size is returned.

begin
ctx_doc.gist('newsindex',34,'CTX_GIST',1, 'PARAGRAPH', pov => 'insects');
end;

8.1.6 Features

In release 8.1.6, you can use all the theme and gist features of release 8.1.5.

In 8.1.6, the following additional new features apply to document services:


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index