1 PACKAGE ctx_thes AS
2
3 type exp_rec is record (
4 xrel varchar2(12),
5 xlevel number,
6 xphrase varchar2(256)
7 );
8 type exp_tab is table of exp_rec index by binary_integer;
9
10 -- public constants
11
12 OP_RENAME constant varchar2(6) := 'RENAME';
13 OP_TRUNCATE constant varchar2(8) := 'TRUNCATE';
14 OP_PT constant varchar2(2) := 'PT';
15 OP_SN constant varchar2(2) := 'SN';
16
17 /*========================================================================*/
18 /* Thesaurus Maintenance Functions */
19 /*========================================================================*/
20
21 /*--------------------------- create_thesaurus ---------------------------*/
22 /*
23 NAME
24 create_thesaurus - create a new thesaurus
25
26 DESCRIPTION
27 This procedure creates a new thesaurus with the indicated name
28
29 ARGUMENTS
30 name -- the new thesaurus name
31 casesens -- case-sensitive
32 NOTES
33 error if the thesaurus already exists
34 Only ctxsys or user with ctxapp role can use this
35
36 RETURN
37 */
38 procedure create_thesaurus(
39 name in varchar2
40 , casesens in boolean default false
41 );
42 PRAGMA SUPPLEMENTAL_LOG_DATA(create_thesaurus, AUTO);
43
44 /*--------------------------- drop_thesaurus ---------------------------*/
45 /*
46 NAME
47 drop_thesaurus - drop a thesaurus
48
49 DESCRIPTION
50 This procedure drops an existing thesaurus with the indicated name
51
52 ARGUMENTS
53 name -- the thesaurus name
54
55 NOTES
56 error if the thesaurus already exists
57 Only ctxsys or thesaurus owner should be able to drop a thesaurus
58
59 RETURN
60 */
61 procedure drop_thesaurus(name in varchar2);
62 PRAGMA SUPPLEMENTAL_LOG_DATA(drop_thesaurus, AUTO);
63
64 /*--------------------------- alter_thesaurus ---------------------------*/
65 /* NAME
66 alter_thesaurus -- alter an existing thesaurus
67
68 DESCRIPTION
69 This procedure rename or truncate a thesaurus.
70
71 ARGUMENTS
72 tname -- thesaurus name
73 op -- alter operation, one of 'RENAME' or 'TRUNCATE'
74 operand -- argument to the alter operation
75 RENAME new thesaurus name
76 TRUNCATE null
77 NOTES
78 Only thesaurus owner and ctxsys are allowed to invoke this
79 function on a given thesaurus
80
81 RETURN
82
83 */
84 procedure alter_thesaurus(tname in varchar2,
85 op in varchar2,
86 operand in varchar2 default null);
87 PRAGMA SUPPLEMENTAL_LOG_DATA(alter_thesaurus, AUTO);
88
89 /*--------------------------- import_thesaurus ---------------------------*/
90 /* NAME
91 import_thesaurus -- imports thesaurus
92
93 DESCRIPTION
94 This procedure loads a thesaurus
95
96 ARGUMENTS
97 name -- thesaurus name
98 data -- thesaurus data
99 casesens -- 'Y' for case sensitive, 'N' for case-insensitive
100
101 NOTES
102 Only thesaurus owner and ctxsys are allowed to invoke this
103 function on a given thesaurus
104
105 RETURN
106
107 */
108 procedure import_thesaurus(name in varchar2,
109 data in clob,
110 casesens in varchar2 default 'N');
111 PRAGMA SUPPLEMENTAL_LOG_DATA(import_thesaurus, AUTO);
112
113 /*--------------------------- export_thesaurus ---------------------------*/
114 /* NAME
115 export_thesaurus -- exports thesaurus
116
117 DESCRIPTION
118 This procedure dumps thesaurus to a clob
119
120 ARGUMENTS
121 name -- thesaurus name
122 thesdump -- result lob
123 NOTES
124 Only thesaurus owner and ctxsys are allowed to invoke this
125 function on a given thesaurus
126
127 RETURN
128
129 */
130 procedure export_thesaurus (name in varchar2,
131 thesdump in out nocopy clob);
132
133 /*--------------------------- create_phrase -----------------------------*/
134 /*
135 NAME
136 create_phrase -- add a phrase to a thesaurus
137
138 DESCRIPTION
139 This procedure adds a phrase to the thesaurus
140
141 ARGUMENTS
142 tname -- thesaurus name
143 phrase -- phrase to add
144 rel -- DEPRECATED
145 relname -- DEPRECATED
146
147 NOTES
148 no error if the information already exists.
149 Only ctxsys or user with ctxapp role can use this
150
151 REL and RELNAME arguments are deprecated -- use create_relation
152 instead.
153
154 RETURN
155 */
156 procedure create_phrase(tname in varchar2,
157 phrase in varchar2,
158 rel in varchar2 default null,
159 relname in varchar2 default null);
160 PRAGMA SUPPLEMENTAL_LOG_DATA(create_phrase, AUTO);
161
162 /*--------------------------- drop_phrase -----------------------------*/
163 /*
164 NAME
165 drop_phrase -- drop a phrase from a thesaurus
166
167 DESCRIPTION
168 This procedure drops a phrase from the thesaurus
169
170 ARGUMENTS
171 tname -- thesaurus name
172 phrase -- phrase to drop
173
174 NOTES
175 BT* / NT* relations are patched around the dropped phrase
176
177 RETURN
178 */
179 procedure drop_phrase(tname in varchar2,
180 phrase in varchar2);
181 PRAGMA SUPPLEMENTAL_LOG_DATA(drop_phrase, AUTO);
182
183 /*--------------------------- alter_phrase -----------------------------*/
184 /*
185 NAME
186 alter_phrase -- alter an existing phrase in a thesaurus
187
188 DESCRIPTION
189 This procedure alters a phrase in a thesaurus.
190
191 ARGUMENTS
192 tname -- thesaurus name
193 phrase -- phrase to alter
194 op -- alter operation. should be one of 'RENAME', 'PT' ,'SN'
195 operand -- argument to the alter operation
196 PT null
197 RENAME new phrase name
198 SN new scope note
199
200 NOTES
201 Only ctxsys or thesaurus owner can alter a phrase
202
203 RETURN
204 */
205 procedure alter_phrase(tname in varchar2,
206 phrase in varchar2,
207 op in varchar2,
208 operand in varchar2 default null);
209 PRAGMA SUPPLEMENTAL_LOG_DATA(alter_phrase, AUTO);
210
211 /*--------------------------- create_relation -----------------------------*/
212 /*
213 NAME
214 create_relation -- create a relation
215
216 DESCRIPTION
217 This procedure creates a relation between two phrases
218
219 ARGUMENTS
220 tname -- thesaurus name
221 phrase -- the filing phrase
222 rel -- relation to create
223 relphrase -- the related phrase
224
225 NOTES
226 Only ctxsys or thesaurus owner can create a relation
227
228 if either phrase or relphrase do not exist, they are created
229 as part of this call.
230
231 phrase is the filing phrase and relphrase is the related phrase,
232 so a thesaurus like this:
233
234 A
235 BT B
236
237 would be translated as
238
239 create_phrase('THES', 'A');
240 create_phrase('THES', 'B');
241 create_relation('THES','A','BT','B');
242
243 RETURN
244 */
245 procedure create_relation(tname in varchar2,
246 phrase in varchar2,
247 rel in varchar2,
248 relphrase in varchar2);
249 PRAGMA SUPPLEMENTAL_LOG_DATA(create_relation, AUTO);
250
251 /*--------------------------- drop_relation -----------------------------*/
252 /*
253 NAME
254 drop_relation -- drop a relation
255
256 DESCRIPTION
257 This procedure drops a relation between two phrases
258
259 ARGUMENTS
260 tname -- thesaurus name
261 phrase -- the filing phrase
262 rel -- relation to drop
263 relphrase -- the related phrase
264
265 NOTES
266 Only ctxsys or thesaurus owner can drop a relation
267 phrase is the filing phrase and relphrase is the related phrase,
268 so a relation like this:
269
270 A
271 BT B
272
273 would be dropped as
274
275 drop_relation('THES','A','BT','B');
276
277 this is symmetric with create_relation
278
279 RETURN
280 */
281 procedure drop_relation(tname in varchar2,
282 phrase in varchar2,
283 rel in varchar2,
284 relphrase in varchar2 default null);
285 PRAGMA SUPPLEMENTAL_LOG_DATA(drop_relation, AUTO);
286
287 /*-------------------------- create_translation -----------------------------*/
288 /*
289 NAME
290 create_translation -- create a translation
291
292 DESCRIPTION
293 This procedure creates a new translation for a phrase
294
295 ARGUMENTS
296 tname -- thesaurus name
297 phrase -- phrase in the thesaurus to which to add a translation
298 language -- language of the translation
299 translation -- translated term
300
301 NOTES
302 Only ctxsys or thesaurus owner can create a relation.
303
304 Phrase must already exist in the thesarus, or an error is raised.
305
306 If a translation for this phrase for this language already exists,
307 this new translation is added without removing that original
308 translation, so long as that original translation is not the same.
309
310 RETURN
311 */
312 procedure create_translation(tname in varchar2,
313 phrase in varchar2,
314 language in varchar2,
315 translation in varchar2);
316 PRAGMA SUPPLEMENTAL_LOG_DATA(create_translation, AUTO);
317
318 /*-------------------------- drop_translation -----------------------------*/
319 /*
320 NAME
321 drop_translation -- drop a translation
322
323 DESCRIPTION
324 This procedure drops one or more translations for a phrase
325
326 ARGUMENTS
327 tname -- thesaurus name
328 phrase -- phrase in the thesaurus to which to add a translation
329 language -- language of the translation
330 translation -- translated term
331
332 NOTES
333 Only ctxsys or thesaurus owner can drop a relation.
334
335 Phrase must already exist in the thesarus, or an error is raised.
336
337 Language is optional. If not specified, translation must also be
338 not specified, and all translations in all languages for the
339 phrase are removed. An error is raised if the phrase has no
340 translation.
341
342 RETURN
343 */
344 procedure drop_translation(tname in varchar2,
345 phrase in varchar2,
346 language in varchar2 default null,
347 translation in varchar2 default null);
348 PRAGMA SUPPLEMENTAL_LOG_DATA(drop_translation, AUTO);
349
350 /*-------------------------- update_translation -----------------------------*/
351 /*
352 NAME
353 update_translation -- update a translation
354
355 DESCRIPTION
356 This procedure updates an existing translation
357
358 ARGUMENTS
359 tname -- thesaurus name
360 phrase -- phrase in the thesaurus to which to add a translation
361 language -- language of the translation
362 translation -- translated term
363 new_translation -- new form of translated term
364
365 NOTES
366 Only ctxsys or thesaurus owner can update a relation.
367
368 Phrase must already exist in the thesarus, or an error is raised.
369
370 Translation can be passed in as NULL if there is only on translation
371 for the specified language for this error. An error will be raised
372 if there is more than one translation for the term in the specified
373 language
374
375 The translation must already exist, or an error is raised.
376
377 RETURN
378 */
379 procedure update_translation(tname in varchar2,
380 phrase in varchar2,
381 language in varchar2,
382 translation in varchar2,
383 new_translation in varchar2);
387 /* Expansion Functions */
384 PRAGMA SUPPLEMENTAL_LOG_DATA(update_translation, AUTO);
385
386 /*========================================================================*/
388 /*========================================================================*/
389
390 /*---------------------------- output_style --------------------------------*/
391 /*
392 NAME
393 output_style
394
395 DESCRIPTION
396 set the output style for the expansion functions
397
398 ARGUMENTS
399 showlevel -- show level in bt/nt expansions
400 showqualify -- show phrase qualifiers
401 showpt -- show preferred terms with *
402 showid -- show phrase ids
403
404 NOTES
405 level is a number then a colon at the start of the phrase
406 pt is an asterisk then a colon at the start of the phrase
407 id is a colon, then the id at the end of the phrase
408 qualify is in parens after a space at the end of the phrase
409 but before id
410
411 example:
412
413 preferred term
414 |
415 | phrase
416 | |
417 | | qualifier
418 | | |
419 | | | phraseid
420 | | | |
421 V V V V
422 {*:TURKEY (BIRD):1234}
423
424 RETURN
425 */
426 PROCEDURE output_style (
427 showlevel in boolean default false
428 , showqualify in boolean default false
429 , showpt in boolean default false
430 , showid in boolean default false
431 );
432
433 /*-------------------------------- syn ------------------------------------*/
434 /*
435 NAME
436 syn -- find synonyms of a term
437
438 DESCRIPTION
439 This procedure finds all synonyms of a term, and returns a string
440 like this: {syn1},{syn2},{syn3} ...
441
442 ARGUMENTS
443 restab -- result table (for pl/sql table version)
444 phrase -- phrase
445 tname -- thesaurus name (if not specified, system default thes used)
446
447 RETURN
448 see description
449 */
450 function syn(phrase in varchar2,
451 tname in varchar2 default 'DEFAULT') return varchar2;
452
453 procedure syn(restab in out NOCOPY exp_tab,
454 phrase in varchar2,
455 tname in varchar2 default 'DEFAULT');
456
457 /*-------------------------------- pt ------------------------------------*/
458 /*
459 NAME
460 pt -- find preferred term
461
462 ARGUMENTS
463 restab -- result table (for pl/sql table version)
464 phrase -- phrase
465 tname -- thesaurus name (if not specified, system default used)
466 RETURN
467 expansion
468
469 */
470 function pt(phrase in varchar2,
471 tname in varchar2 default 'DEFAULT') return varchar2;
472
473 procedure pt(restab in out NOCOPY exp_tab,
474 phrase in varchar2,
475 tname in varchar2 default 'DEFAULT');
476
477 /*-------------------------------- tt ------------------------------------*/
478 /*
479 NAME
480 tt -- find top term
481
482 ARGUMENTS
483 restab -- result table (for pl/sql table version)
484 phrase -- phrase
485 tname -- thesaurus name (if not specified, system default used)
486 RETURN
487 expansion
488
489 */
490 function tt(phrase in varchar2,
491 tname in varchar2 default 'DEFAULT') return varchar2;
492
493 procedure tt(restab in out NOCOPY exp_tab,
494 phrase in varchar2,
495 tname in varchar2 default 'DEFAULT');
496
497 /*-------------------------------- rt ------------------------------------*/
498 /*
499 NAME
500 rt -- find related term
501
502 ARGUMENTS
503 restab -- result table (for pl/sql table version)
504 phrase -- phrase
505 tname -- thesaurus name (if not specified, system default used)
506 RETURN
507 expansion
508
509 */
510 function rt(phrase in varchar2,
511 tname in varchar2 default 'DEFAULT') return varchar2;
512
513 procedure rt(restab in out NOCOPY exp_tab,
514 phrase in varchar2,
515 tname in varchar2 default 'DEFAULT');
516
517 /*-------------------------------- bt ------------------------------------*/
518 /*
519 NAME
520 bt -- find broader terms of a phrase
521
522 DESCRIPTION
523 This procedure finds all broader terms of a term, and returns a string
524 like this: {bt1},{bt2},{bt3} ...
525
526 ARGUMENTS
527 restab -- result table (for pl/sql table version)
528 phrase -- phrase
529 lvl -- how many levels up (i.e. 2 means get the broader terms of
530 the broader terms of the phrase)
531 tname -- thesaurus name (if not specified, system default thes used)
532
533 NOTES
534 RETURN
535 see description
536 */
537 function bt( phrase in varchar2,
538 lvl in number default 1,
542 phrase in varchar2,
539 tname in varchar2 default 'DEFAULT') return varchar2;
540
541 procedure bt(restab in out NOCOPY exp_tab,
543 lvl in number default 1,
544 tname in varchar2 default 'DEFAULT');
545
546 /*-------------------------------- btp ------------------------------------*/
547 /*
548 NAME
549 btp -- find broader terms (partative) of a phrase
550
551 DESCRIPTION
552 This procedure finds all broader terms of a term, and returns a string
553 like this: {bt1},{bt2},{bt3} ...
554
555 ARGUMENTS
556 restab -- result table (for pl/sql table version)
557 phrase -- phrase
558 lvl -- how many levels up (i.e. 2 means get the broader terms of
559 the broader terms of the phrase)
560 tname -- thesaurus name (if not specified, system default thes used)
561
562 NOTES
563 RETURN
564 see description
565 */
566 function btp( phrase in varchar2,
567 lvl in number default 1,
568 tname in varchar2 default 'DEFAULT') return varchar2;
569
570 procedure btp(restab in out NOCOPY exp_tab,
571 phrase in varchar2,
572 lvl in number default 1,
573 tname in varchar2 default 'DEFAULT');
574
575 /*-------------------------------- bti ------------------------------------*/
576 /*
577 NAME
578 bti -- find broader terms (instance) of a phrase
579
580 DESCRIPTION
581 This procedure finds all broader terms of a term, and returns a string
582 like this: {bt1},{bt2},{bt3} ...
583
584 ARGUMENTS
585 restab -- result table (for pl/sql table version)
586 phrase -- phrase
587 lvl -- how many levels up (i.e. 2 means get the broader terms of
588 the broader terms of the phrase)
589 tname -- thesaurus name (if not specified, system default thes used)
590
591 NOTES
592 RETURN
593 see description
594 */
595 function bti( phrase in varchar2,
596 lvl in number default 1,
597 tname in varchar2 default 'DEFAULT') return varchar2;
598
599 procedure bti(restab in out NOCOPY exp_tab,
600 phrase in varchar2,
601 lvl in number default 1,
602 tname in varchar2 default 'DEFAULT');
603
604 /*-------------------------------- btg ------------------------------------*/
605 /*
606 NAME
607 btg -- find broader terms (generic) of a phrase
608
609 DESCRIPTION
610 This procedure finds all broader terms of a term, and returns a string
611 like this: {bt1},{bt2},{bt3} ...
612
613 ARGUMENTS
614 restab -- result table (for pl/sql table version)
615 phrase -- phrase
616 lvl -- how many levels up (i.e. 2 means get the broader terms of
617 the broader terms of the phrase)
618 tname -- thesaurus name (if not specified, system default thes used)
619
620 NOTES
621 RETURN
622 see description
623 */
624 function btg( phrase in varchar2,
625 lvl in number default 1,
626 tname in varchar2 default 'DEFAULT') return varchar2;
627
628 procedure btg(restab in out NOCOPY exp_tab,
629 phrase in varchar2,
630 lvl in number default 1,
631 tname in varchar2 default 'DEFAULT');
632
633 /*-------------------------------- nt ------------------------------------*/
634 /*
635 NAME
636 nt -- find narrower terms of a phrase
637
638 DESCRIPTION
639 This procedure finds all narrower terms of a term, and returns a string
640 like this: {nt1},{nt2},{nt3} ...
641
642 ARGUMENTS
643 restab -- result table (for pl/sql table version)
644 phrase -- phrase
645 lvl -- how many levels down (i.e. 2 means get the narrower terms of
646 the narrower terms of the phrase)
647 tname -- thesaurus name (if not specified, system default thes used)
648
649 NOTES
650 RETURN
651 see description
652 */
653 function nt(phrase in varchar2,
654 lvl in number default 1,
655 tname in varchar2 default 'DEFAULT') return varchar2;
656
657 procedure nt(restab in out NOCOPY exp_tab,
658 phrase in varchar2,
659 lvl in number default 1,
660 tname in varchar2 default 'DEFAULT');
661
662 /*-------------------------------- ntp ------------------------------------*/
663 /*
664 NAME
665 ntp -- find narrower terms (partative) of a phrase
666
667 DESCRIPTION
668 This procedure finds all narrower terms of a term, and returns a string
669 like this: {nt1},{nt2},{nt3} ...
670
671 ARGUMENTS
672 restab -- result table (for pl/sql table version)
673 phrase -- phrase
674 lvl -- how many levels down (i.e. 2 means get the narrower terms of
675 the narrower terms of the phrase)
676 tname -- thesaurus name (if not specified, system default thes used)
677
681 */
678 NOTES
679 RETURN
680 see description
682 function ntp(phrase in varchar2,
683 lvl in number default 1,
684 tname in varchar2 default 'DEFAULT') return varchar2;
685
686 procedure ntp(restab in out NOCOPY exp_tab,
687 phrase in varchar2,
688 lvl in number default 1,
689 tname in varchar2 default 'DEFAULT');
690
691 /*-------------------------------- nti ------------------------------------*/
692 /*
693 NAME
694 nti -- find narrower terms (instance) of a phrase
695
696 DESCRIPTION
697 This procedure finds all narrower terms of a term, and returns a string
698 like this: {nt1},{nt2},{nt3} ...
699
700 ARGUMENTS
701 restab -- result table (for pl/sql table version)
702 phrase -- phrase
703 lvl -- how many levels down (i.e. 2 means get the narrower terms of
704 the narrower terms of the phrase)
705 tname -- thesaurus name (if not specified, system default thes used)
706
707 NOTES
708 RETURN
709 see description
710 */
711 function nti(phrase in varchar2,
712 lvl in number default 1,
713 tname in varchar2 default 'DEFAULT') return varchar2;
714
715 procedure nti(restab in out NOCOPY exp_tab,
716 phrase in varchar2,
717 lvl in number default 1,
718 tname in varchar2 default 'DEFAULT');
719
720 /*-------------------------------- ntg ------------------------------------*/
721 /*
722 NAME
723 ntg -- find narrower terms (generic) of a phrase
724
725 DESCRIPTION
726 This procedure finds all narrower terms of a term, and returns a string
727 like this: {nt1},{nt2},{nt3} ...
728
729 ARGUMENTS
730 restab -- result table (for pl/sql table version)
731 phrase -- phrase
732 lvl -- how many levels down (i.e. 2 means get the narrower terms of
733 the narrower terms of the phrase)
734 tname -- thesaurus name (if not specified, system default thes used)
735
736 NOTES
737 RETURN
738 see description
739 */
740 function ntg(phrase in varchar2,
741 lvl in number default 1,
742 tname in varchar2 default 'DEFAULT') return varchar2;
743
744 procedure ntg(restab in out NOCOPY exp_tab,
745 phrase in varchar2,
746 lvl in number default 1,
747 tname in varchar2 default 'DEFAULT');
748
749 /*-------------------------------- tr ------------------------------------*/
750 /*
751 NAME
752 TR -- find foreign language equivalent
753
754 DESCRIPTION
755 This procedure finds all foreign terms of a term, and returns a string
756 like this: {ft1},{ft2},{ft3} ...
757
758 ARGUMENTS
759 restab -- result table (for pl/sql table version)
760 phrase -- phrase
761 lang -- language
762 tname -- thesaurus name (if not specified, system default thes used)
763
764 NOTES
765 RETURN
766 see description
767 */
768 function tr(phrase in varchar2,
769 lang in varchar2 default null,
770 tname in varchar2 default 'DEFAULT') return varchar2;
771
772 procedure tr(restab in out NOCOPY exp_tab,
773 phrase in varchar2,
774 lang in varchar2 default null,
775 tname in varchar2 default 'DEFAULT');
776
777 /*-------------------------------- trsyn ----------------------------------*/
778 /*
779 NAME
780 TRSYN -- find foreign language equivalent plus its synonyms and their
781 foreign language equivalent
782
783 DESCRIPTION
784 This procedure finds all foreign terms of a term and its synonyms and
785 foreign terms of its synonyms
786 synonym, and returns a string
787 like this: {ft1},{ft2},{ft3} ...
788
789 ARGUMENTS
790 restab -- result table (for pl/sql table version)
791 phrase -- phrase
792 lang -- language
793 tname -- thesaurus name (if not specified, system default thes used)
794
795 NOTES
796 RETURN
797 see description
798 */
799 function trsyn(phrase in varchar2,
800 lang in varchar2 default null,
801 tname in varchar2 default 'DEFAULT') return varchar2;
802
803 procedure trsyn(restab in out NOCOPY exp_tab,
804 phrase in varchar2,
805 lang in varchar2 default null,
806 tname in varchar2 default 'DEFAULT');
807
808 /*---------------------------------- sn -----------------------------------*/
809 /*
810 NAME
811 SN -- get scope note of phrase
812
813 DESCRIPTION
814 This procedure finds the scope note of the phrase
815
816 ARGUMENTS
817 phrase -- phrase
818 tname -- thesaurus name (if not specified, system default thes used)
819
820 NOTES
821 RETURN
822 see description
823 */
824 function sn(phrase in varchar2,
825 tname in varchar2 default 'DEFAULT') return varchar2;
826
827 /*-------------------------------- thes_tt ---------------------------------*/
828 /*
829 NAME
830 THES_TT -- get thesaurus top terms
831
832 DESCRIPTION
833 This procedure finds the top terms of a thesaurus. A top term is defined
834 as any term which has a narrower term but has no broader terms. This
835 differs from TT in that TT takes in a phrase and finds the top term for
836 that phrase, but THES_TT searches the whole thesaurus and finds all
837 top terms.
838
839 ARGUMENTS
840 restab -- result table
841 phrase -- phrase
842 tname -- thesaurus name (if not specified, system default thes used)
843
844 NOTES
845 Since this function searches the whole thesaurus, it can take some
846 time on large thesauri. It is not recommend to call this often
847 for such thesauri. Instead, the application should call this once,
848 store the results in a seperate table, and use those stored results
849 instead.
850 */
851 procedure thes_tt(restab in out NOCOPY exp_tab,
852 tname in varchar2 default 'DEFAULT');
853
854 /*-------------------------- has_relation ----------------------------------*/
855 /*
856 NAME
857 HAS_RELATION - check to see if a phrase has a relation
858
859 DESCRIPTION
860 Check to see if a phrase has a relation. Valid relations
861 are 'SYN','SN','TR','RT','BT','BTG','BTP','BTI','NT', 'NTG','NTP',
862 'NTI', or 'ANY'(meaning any of the above).
863
864 ARGUMENTS
865 phrase -- phrase
866 rel -- a list of relations separated by commas
867 tname -- thesaurus name
868
869 NOTES
870 RETURN
871 TRUE or FALSE
872 */
873 function has_relation(
874 phrase in varchar2,
875 rel in varchar2,
876 tname in varchar2 default 'DEFAULT'
877 ) return boolean;
878
879 end ctx_thes;