Oracle8i interMedia Text Reference
Release 2 (8.1.6)

Part Number A77063-01

Library

Product

Contents

Index

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

CTX_THES Package, 9 of 26


CREATE_RELATION

Creates a relation between two phrases in the thesaurus.


Note:

Oracle recommends that you use CTX_THES.CREATE_RELATION rather than CTX_THES.CREATE_PHRASE to create relations in a thesaurus.  


Only thesaurus owner and CTXSYS can invoke this procedure on a given thesaurus.

Syntax

CTX_THES.CREATE_RELATION(tname     in    varchar2,
                          phrase    in    varchar2,
                          rel       in    varchar2,
                          relphrase in    varchar2);
tname

Specify the thesaurus name

phrase

Specify the phrase to alter or create. If phrase is a disambiguated homograph, you must specify the qualifier. If phrase does not exist in the thesaurus, it is created.

rel

Specify the relation to create.The relation is from phrase to relphrase. You can specify one of the following relations:

relation  meaning  relphrase 

BT*/NT* 

Add hierarchical relation. 

Specify related phrase. The relationship is interpreted from phrase to relphrase. 

RT 

Add associative relation. 

Specify phrase to associate. 

SYN 

Add phrase to a synonym ring. 

Specify an existing phrase in the synonym ring. 

Specify language 

Add translation for a phrase. 

Specify new translation phrase.  

relphrase

Specify the related phrase. If relphrase does not exist in tname, relphrase is created. See table for rel.

Notes

The relation you specify for rel is interpreted as from phrase to relphrase. For example, consider dog with broader term animal:

dog
  BT animal

To add this relation, specify the arguments as follows:

begin
CTX_THES.CREATE_RELATION('thes','dog','BT','animal'); 
end;     


Note:

The order in which you specify arguments for CTX_THES.CREATE_RELATION is different from the order you specify them with CTX_THES. CREATE_PHRASE. 


Examples

Create relation VEHICLE NT CAR:

ctx_thes.create_relation('thes1', 'vehicle', 'NT', 'car');

Create Japanese translation for you:

ctx_thes.create_relation('thes1', 'you', 'JAPANESE:', 'kimi');

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