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!

Query to list words and their root words present in a document

678347Jan 29 2009 — edited Jun 14 2009
Hi All,
I want to write a query which lists word and it s corresponding root word. Procedure wat i followed is shown below, please help in getting the correct result.


1. I created a index on text column.

2. I got 4 tables dr$idx$i, dr$idx$k, dr$idx$m, dr$idx$n.

3. Then once again i created a index on dr$idx$i table.

4. I got 4 tables dr$index$i, dr$index$k, dr$index$m, dr$index$n.

5. Then i issued the following query, i got the root words correctly for few and for the rest incorrect.
(I have modified query from one of the post answered by Barbara)

SELECT d.dr$idx$i.token_text dat, i.token_text AS root_word

FROM dr$idx$i d,
dr$index$k k,
dr$index$i i

WHERE dr$idx$i.ROWID = k.textkey

AND (k.docid between i.token_first and i.token_last)

AND i.token_type = 9

output

DAT ROOT_WORD

ASKS ASK
ASKING ASK
ASKED ASK
APPROACHES APPROACH
ANALYZES ANALYZE
ANALYZED ANALYZE
ALLOCATED ALLOCATE
ACTIVITIES ACTIVITY
ACCEPTS ACCEPT
ACCEPTING ACCEPT
ACCEPTED ACCEPT
COMFORTABLE COME
COMES COME
COMEMRCE COME
HUMILITY GO
HUGE GO
HR GO

Thanks in Advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 12 2009
Added on Jan 29 2009
7 comments
3,875 views