Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

creating list of trigrams from word

706747Jun 14 2009 — edited Jun 14 2009
Hi all,
i have a table

create table mydoc (doc_id number primary key not null, doc clob);

table created.

begin
ctx_ddl.create_preference('mylex', 'basic_lexer');
ctx_ddl.set_attribute('mylex', 'index_stems', 'english');
end
/

pl/sql procedure successfully completed.

begin
ctx_ddl.create_preference('myword', 'basic_wordlist');
ctx_ddl.set_attribute('myword', 'substring_index', 'true');
/

pl/sql procedure successfully completed.

create index myindex on mydoc(doc)
indextype is ctxsys.context
parameters ('lexer mylex wordlist myword')
/

index created.

i need to create a table consists of list words, root words and trigrams from each root words.
for example : (i'm sorry i dont know to format a table, i list the trigram separated by comma)

root word trigrams
====== =====
analyze ana, nal, aly, lyz, yze
connect con, onn, nne, nec, ect


to create list words and their root words, the answers from Barbara in
3540372
are very helpful.
but i've no any idea to create the trigrams. and what is the simplest and most efficient methode to get it.
so by some reverse query user can easily know (for example) what are the trigrams for doc_id=1, or which documents that contain trigrams 'onn', etc.
for additional information, my my_doc table is about 15,000 record and 100-10.000 lines for each document.

any help and suggestion greatly appreciated.
thanks in advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 12 2009
Added on Jun 14 2009
1 comment
2,991 views