How to get the narrower terms of a category in the supplied knowledgebase?

I want to add more medical terms for cardiovascular disorders to the supplied knowledge base of Oracle Text for better theme extraction. (Oracle 10g release 2, Oracle Text version 10.2.0.1.0 )
Based on the "English Knowledge Base Category Hierarchy" documented at http://www.oracle.com/technology/products/text/index.html , I think I want to add more diseases names to "science and technology->life sciences->health and medicine->medical problems->cardiovascular disorders".
Before doing that, I hope I can see the existing narrower terms under "cardiovascular disorders". I tried ctx_query.hfeedback() following the example in Oracle Text reference.
But, I got the following error messages where I tried to print out content in the result table at the end:
SQL> CREATE TABLE text (
2 id NUMBER primary key,
3 text VARCHAR2(4000)
4 );
Table created.
SQL> insert into text values (1,'This is about cardiovascular disorders. Cardiovascular disorders terms will be extended');
1 row created.
SQL> exec ctx_ddl.set_attribute('mylex','index_themes','YES');
PL/SQL procedure successfully completed.
SQL> exec ctx_ddl.set_attribute('mylex','index_text','YES');
PL/SQL procedure successfully completed.
SQL> create index idx_text on text(text)
2 indextype is ctxsys.context
3 parameters('lexer mylex');
Index created.
SQL> set serveroutput on
SQL> declare
2 the_themes ctx_doc.theme_tab;
3 begin
4 ctx_doc.themes('idx_text','1',the_themes);
5 for i in 1..the_themes.count loop
6 dbms_output.put_line(the_themes(i).theme||':'||the_themes(i).weight);
7 end loop;
8 end;
9 /
cardiovascular disorders:87
extensions:51
PL/SQL procedure successfully completed.
SQL> CREATE TABLE restab (
2 feedback_id VARCHAR2(30),
3 id NUMBER,
4 parent_id NUMBER,
5 operation VARCHAR2(30),
6 options VARCHAR2(30),
7 object_name VARCHAR2(80),
8 position NUMBER,
9 bt_feedback ctxsys.ctx_feedback_type,
10 rt_feedback ctxsys.ctx_feedback_type,
11 nt_feedback ctxsys.ctx_feedback_type
12 ) NESTED TABLE bt_feedback STORE AS res_bt
13 NESTED TABLE rt_feedback STORE AS res_rt
14 NESTED TABLE nt_feedback STORE AS res_nt;
Table created.
SQL> BEGIN
2 ctx_query.hfeedback (index_name => 'idx_text',
3 text_query => 'blood disorders',
4 feedback_table => 'restab',
5 sharelevel => 0,
6 feedback_id => 'query1'
7 );
8 END;
9 /
PL/SQL procedure successfully completed.
SQL> DECLARE
2 i NUMBER;
3 BEGIN
4 FOR frec IN (
5 SELECT object_name, nt_feedback
6 FROM restab
7 WHERE feedback_id = 'query1' AND object_name IS NOT NULL
8 ) LOOP
9
10 dbms_output.put_line('Narrower term feedback for ' || frec.object_name
||
11 ':');
12 i := frec.nt_feedback.FIRST;
13 WHILE i IS NOT NULL LOOP
14 dbms_output.put_line(frec.nt_feedback(i).text);
15 i := frec.nt_feedback.NEXT(i);
16 END LOOP;
17
18 END LOOP;
19 END;
20 /
DECLARE
ERROR at line 1:
ORA-06531: Reference to uninitialized collection
ORA-06512: at line 12
any thought?
Thanks in advance,
-Haijun

You can avoid the error by wrapping an if .. end if around the problem section, like so:
IF frec.nt_feedback IS NOT NULL THEN
i := frec.nt_feedback.FIRST;
WHILE i IS NOT NULL LOOP
dbms_output.put_line(frec.nt_feedback(i).text);
i := frec.nt_feedback.NEXT(i);
END LOOP;
END IF;
However, the reason that you are getting the error is because the nt_feedback is empty. You can see this by simply:
select * from restab;
The reason is that ctx_query.hfeedback is intended for finding narrower terms within your index that match narrower terms within your knowledge base. Since there is only one row in your table, there are no narrow terms to be found.
To find narrower terms in your knowledge base, all you need is:
SELECT CTX_THES.NT ('your_broad_term_goes_here') FROM DUAL;
You may need to run the query as CTXSYS and specify the thesaurus name, if it is not part of the default thesaurus. You can also specify the level of narrower terms. A medthes must be purchased and loaded separately. I don't have a complete medthes, so the following is just a brief example, having loaded just a few terms:
CTXSYS@orcl_11g> SELECT CTX_THES.NT ('health and medicine', 10, 'MEDTHES') from dual;
CTX_THES.NT('HEALTHANDMEDICINE',10,'MEDTHES')
{health and medicine}|{Anesthesia and Analgesia}|{Anti-Allergic and Respiratory
System Agents}|{Anti-Inflamammatory Agents, Antirheumatic Agents, and Inflamatio
n Mediators}|{Antineoplastic and Immunosuppressive Agents}
CTXSYS@orcl_11g>

Similar Messages

  • How to get the current node element by its value?

    e.g,:
    wdContext.current<b>Deal</b>Element().setAttributeValue("<i>deal_id</i>","<i>aaaaaaa</i>");
    above code can get the result i wanna.
    but now i wanna in terms of its node'name to  set attribute vaue of itself. in other words,i have no idea about how to get the current node element by its name"<b>Deal</b>".

    Hi Wing,
    The answer is there in your question itself.
    wdContext.currentDealElement()
    will give you the current node element by its name"Deal" or you could use
    wdContext.nodeDeal().getCurrentElement()
    or you could use
    wdContext.nodeDeal().getElementAt(wdContext.nodeDeal().getLeadSelection())
    Regards,
    Sudeep

  • How to get the previous state of my data after issuing coomit method

    How to get the previous state of some date after issuing commit method in entity bean (It should not use any offline storage )

    >
    Is there any way to get the state apart from using
    offline storage ?As I said the caller keeps a copy in memory.
    Naturally if it is no longer in memory then that is a problem.
    >
    and also what do you mean by auditlog?
    You keep track of every change to the database by keeping the old data. There are three ways:
    1. Each table has a version number/delete flag for each record. A record is never updated nor deleted. Instead a new record is created with a new version number and with the new data.
    2. Each table has a duplicate table which has all of the same columns. When the first table is modified the old data is moved to the duplicate table.
    3. A single table is used which has columns for 'table', 'field', 'data' and 'activity' (update, delete). When a change is made in any table then this table is updated. This is generally of limited useability due to the difficulty in recovering the data.
    All of the above can have a user id, timestamp, and/or additional information which is relevant to the data being changed.
    Note that ALL of this is persisted storage.
    I am not sure what this really has to do with "offline storage" unless you are using that term to refer to backed up data which is not readily available.

  • How To Get Around iCloud Terms

    How To Get Around iCloud Terms & Conditions Error After iOS 7 Upgrade
    It is being widely reported that some users are experiencing errors with iCloud after upgrading to iOS 7.  The issue has to do with the iCloud Terms & Conditions which were changed with the new version of iOS.  After upgrading, users are prompted to accept the new iCloud Terms & Conditions but when they attempt to do so they get a “Unable to connect to server” error.  This then disables iCloud on their device

    Hi nene
               in case of invoice without PO, The payment term will be selected from the vendor master data (in View : payment terms transaction in XK03).
    Check payment term in  master data is exist or not.
    the data is in the table LFB1 : Field ZTERM
    Regards
    Wiboon

  • How to get the older software on my iPhone 4

    How to get the older software on my iPhone 4 my software is 4.3.2 and I need to get the older software it is very important to me

    Downgrading the iOS is not support and Terms of Use of this forum prohibit discussing it.  You'll need to go elsewhere.

  • How to get the Double-sided print in SMARTFORM?

    Hi Folks,
    Can u  explain me , how to get the Double-sided print ?
    I create two pages : Page 1 and Page 2.
    Page 1 contains Main Window and some text data in it.....
    Page 2 contains  a secondary window with some TERMS & CONDITIONs data.
    Print Mode Settings:
    Page 1     Print Mode : D
    Page 2     Print Mode : Space
    I maintained all the above in my Smartform ,
    but i couldn't get my second page at all  and Double-sided print also....
    Is there any settings missing or any to be maintained ?
    GIve me a Solution....

    HI Surender,
    Check this one
    http://www.sdn.sap.com/irj/sdn/printing?rid=/library/uuid/90edfc78-dfc9-2b10-dcbe-d4612972ceb9&overridelayout=true
    Regards
    Ram

  • How to get the highest grade?

    Hello! How u get the highest occurence grade? lets say if Mr A score 85 for his test, u get an 'A'. Mr 'B' score 95, he also get an 'A'. And lastly, Mr C score '25' which is 'F'. So i have to get out 'A' as it is the highest occurence grade. But no matter what I try, I just can't get it right. Hopefully, someone here can help..

    Hopefully he will come back.
    You folks who answered him performed a dis-service.
    Its not up to you to decide "how" a person is to
    learn java, just answer the question, instead the kid
    got a dressing down.
    If you answer his question, there are only 2 outcomes
    possible:
    1.he will make an effort to understand the code, he
    will learn.
    2.he will simply copy the code, not learn & will fail
    his mid-term
    He should be treated like an adult, he knows the
    consequences if he doesnt make the attempt to
    undertand the answer... he will fail his course. Kid,
    post your email address... i will give you as much
    help as i can, its up to you what u do with it. k? I
    would like to help u. hi and very sorrrrrrrrrrrrrrrrrrrrrrrrrrrrrry for bieng rude but the thing was that the prob was very easy and seemed to be of the type of a homework ...... on the other hand i should be appreciated atleast i gave the idea of a solution . and i persnally dont think that anymore spoonfeeding should be done to a person learning java
    moreover that person should learn to think big coz its all a game of big ideas

  • Hi how I get the refund from the unauthorised in app purchase? I just bought the phone n had yr staff do the personal setup n end up I had been charged for the in apps purchased

    Hi how I get the refund from the unauthorised in app purchase? I just bought the phone at yr store few days ago n had yr staff do the personal setup n end up I had been charged for the in apps purchased. Pls help.

    yr store few days ago n had yr staff do the personal setup n end up I had been charged for the in apps purchased. Pls help.
    NOT at mine or anyone else's  here
    This is a User to User technical support community .There is no-one from Apple here and Apple neither read nor respond here
    Did you not work that out when you agreed to the terms of use of this community when joining today

  • How to get the Oracle license#

    Hello,
    Is it possible to get the Oracle(10g) license# from the already installed DB.
    We are using Oracle 10g licensed version.
    pls, let me know How to get the license# information?
    thanks
    Edited by: Zerandib on Dec 10, 2008 9:16 AM

    Zerandib,
    Please check this link
    Oracle License verstion; PIN number
    and oracle install doesn't require any license# or part# or code# to unlock. What you have is licensing agreement with Oracle on some terms (best known to your licensing/purcharing/IT dept) how your company will be using Oracle? But if your intent is to learn and educate yourself, you can download and install oracle for free. Once again Oracle software doesn't require any license or code# to install but an agreement for its Usage.
    Regards

  • My Itunes account is on my dad's user. I downloaded Itunes on my user, and I am wondering how to get the apps I downloaded on my dad's user, on mine? Sorry if the question is confusing.

    Our computer has users that you click to log on. My itunes thingy is on my Dad's and I downloaded Itunes on my user, and i am wondering how to get the apps I downloaded on my  dad's itunes, to mine. Thanks for any help.

    iPads sync to 1 computer only.
    All media and apps are tied to the Apple ID that purchased them.
    Without your relatives ID and password, you cannot update any of the Apps.
    I am pretty certain he is also violating Apples terms of service by giving you the apps.

  • DOES ANYONE KNOW HOW TO GET THE DOWNLOAD MAC OSX 10.7.0 BECAUSE NO MATTER HOW MUCH I TRY I CANT FIND IT

    DOES ANYONE KNOW HOW TO GET THE DOWNLOAD MAC OSX 10.7.0 BECAUSE NO MATTER HOW MUCH I TRY I CANT FIND IT

    AS mentioned, you need 10.6.8 & the App Store first, it's not available any other way, & 10.7 instead of 10.8 requires a call to Apple...
    Snow Leopard/10.6.x Requirements...
    General requirements
       * Mac computer with an Intel processor
        * 1GB of memory (I say 4GB at least, more if you can afford it)
        * 5GB of available disk space (I say 30GB at least)
        * DVD drive for installation
        * Some features require a compatible Internet service provider; fees may apply.
        * Some features require Apple’s MobileMe service; fees and terms apply.
    Which apps work with Mac OS X 10.6?...
    http://snowleopard.wikidot.com/
    It's been pulled from the online store & Apple Stores, so you have to call Apple to buy it, last I heard.
    Buy Snow Leopard > http://store.apple.com/us/product/MC573/mac-os-x-106-snow-leopard
    Call Apple Sales...in the US: 1-800-MY-APPLE. Or Support... 1-800-275-2273
    Other countries...
    http://support.apple.com/kb/HE57

  • Help!!! How to get the recovery time of transient response of a power supply with Labview basic package without analysis option?

    How to get the recovery time of transient response of a power supply with Labview basic package without analysis option? Does anyone have any idea or some similar function SUBVIs?
    Recovery time of transient response is defined as the time from the beginning of the transient to the voltage point on the waveform fallen into 10percent of the overshoot. Well, the waveform is something like a pulse with a soft slope.

    I recommend plotting your data on a graph on paper. Take a look at the data, and determine what is unique about the point you are looking for. Look for how you can teach your program to look for this point.
    I have written several algorithms that do similar, one in fact being for a power supply, the other being for RPM. Neither algorithm used any advanced analysis tools. They are just a matter of determining, mathematically, when you achieve what you are looking for. Just sit down with your graph (I recommend multiple copies) and draw horizontal and vertical lines that determine when you get to the point you are looking for. You are probably going to have to reverse the array and start from the end, so think in those terms.
    If you have trouble, emai
    l me a bitmap of the graph, and what you are looking for and I will try to be of further assistance. Don't do that however; until you you have given this a few tries. Your solution should be involve a lot of logic on analog levels.
    Good luck

  • How to get the values from popup window to mainwindow

    HI all,
       I want to get the details from popup window.
          i have three input fields and one search button in my main window. when i click search button it should display popup window.whenever i click on selected row of the popup window table ,values should be visible in my main window input fields.(normal tables)
       now i am able to display popup window with values.How to get the values from popup window now.
       I can anybody explain me clearly.
    Thanks&Regards
    kranthi

    Hi Kranthi,
    Every webdynpro component has a global controller called the component controller which is visible to all other controllers within the component.So whenever you want to share some data in between 2 different views you can just make it a point to use the component controller's context for the same. For your requirement (within your popups view context) you will have have to copy the component controllers context to your view. You then will have to (programmatically) fill this context with your desired data in this popup view. You can then be able to read this context from whichever view you want. I hope that this would have made it clear for you. Am also giving you an [example|http://****************/Tutorials/WebDynproABAP/Modalbox/page1.htm] which you can go through which would give you a perfect understanding of all this. In this example the user has an input field in the main view. The user enters a customer number & presses on a pushbutton. The corresponding sales orders are then displayed in a popup window for the user. The user can then select any sales order & press on a button in the popup. These values would then get copied to the table in the main view.
    Regards,
    Uday

  • How to get the table of value field? and can we expand the technical limits

    Dear
    I have created value field in COPA with KEA6. And now, I need the table which the value fields are saved. Yet, I have tried a lot to find it and get failure? Can any guy help me? Please tell me how to get the table of a value field.
    And another question is that, can we extend the technical limits for the number of value field for ECC6.0?
    We have a note for R.4.x Please see below:
    OSS note 160892
    You can display the length of a data record using Transaction KEA0 ('Maintain Operating Concern'). After you have navigated to the 'Characteristics Screen' or to the 'Value field Screen' choose menu path 'Extras -> Technical Limits'.
    The maximum displayed here under 'Length in bytes on the DB' is the maximum length permitted by the Dictionary. The reserve required for the release upgrade must be subtracted from this value.
    To increase the allowed number of the value fields, increase the value that is assigned to field ikcge-bas_max_cnt (FORM init_ikcge_ke USING fm_subrc, approx. line 165) in Include FKCGNF20. It specifies the number of the possible value fields. The corresponding part of the source code is attached to the note as a correction.
    David Sun
    Regards!

    how to extend the limit of value numbers? please see the original question.

  • I downloaded and bought a movie from iTunes on my iPad and now want the same movie on my MacBook Pro but its not offering me to download it, it giving me the options of buying it which I already did. How I get the movie onto my MacBook?

    I downloaded and bought a movie from iTunes on my iPad and now want the same movie on my MacBook Pro but its not offering me to download it, it giving me the options of buying it which I already did. How I get the movie onto my MacBook?

    You can connect the iPad to your Mac's iTunes and do File > Devices > Transfer Purchases, that should copy it over to the Movies part of your library.
    Depending upon what country that you are in, and whether the film studio allows it, you might also be able to re-download it on your Mac via the Purchased link under Quicklinks on the right-hand side of the iTunes store home page.

  • How to get the value from a JavaScript and send the same to Java file?

    Hi.
    How to get the value from a JavaScript (this JS is called when an action invoked) and send the value from the JS to a Java file?
    Thanks and regards,
    Leslie V

    Yes, I am trying with web application.
    In the below code, a variable 'message' carries the needed info. I would like to send this 'message' variable with the 'request'.
    How to send this 'message' with and to the 'request'?
    Thanks for the help :-)
    The actual JS code is:
    function productdeselection()
    var i=0;
    var j=0;
    var deselectedproduct = new Array(5);
    var message = "Are you sure to delete Product ";
    mvi=document.forms[0].MVI;
    mei=document.forms[0].MEI;
    lpi=document.forms[0].LPI;
    if(null != mvi)
    ++i;
    if(null != mei )
    ++i;
    if(null != lpi)
    ++i;
    if(null != mvi && mvi.checked)
    deselectedproduct[++j]="MVI?";
    if(null != mei && mei.checked)
    deselectedproduct[++j]="GAP?";
    if(null != lpi && lpi.checked)
    deselectedproduct[++j]="LPI?";
    if( 0!=j)
    if(i!=j)
    for (x=0; x<deselectedproduct.length; x++)
    if(null != deselectedproduct[x])
    message =message+ "-" +deselectedproduct[x];
    alert(message);
    else
    //alert(" You cannot remove all products!");
    return false;
    return true;
    }

Maybe you are looking for

  • ALV Class Double click event

    Hi All, I have created an alv report using alv class. I have handled the double click event in that i am calling transaction using row currenlty selected. But after doing subtotalling the list and then i double click a line it is passing wrong data.

  • CAN'T FIND DRIVER FOR AT-FBUS NI-FBUS FOR WINDOWS 2000

    Trying to load software for AT-FBUS for Windows 2000. The only drivers that I can find are PCMCIA-FBUS and PCMCIA-FBUS/2. Are these the drivers for my at machine??

  • SQL Server 2012 with SP1 on Windows 8.1 Pro

    Can I install "out-of-the-box" SQL Server 2012 with Service Pack 1 Enterprise Edition or SQL Server 2012 Developer Edition on my Windows 8.1 VM? Thanks.

  • What is the best way to look after Macbook Pro Retina Display battery?

    Hello, I am a little confused on how to look after the battery in my new Macbook Pro with Retina Display. I have read lots of different things and I do not seem to get a clear answer. I feel by charging my laptop all the way, then using till 0% and d

  • CX_SHM_OUT_OF_MEMORY dump error in Solution Manager 7.1

    Hello all, We are facing an error while executing background jobs and few other operations.When i noticed in ST22, the no of dump errors are very high. All the dump errors are relating to SYSTEM_NO_SHM_MEMORY I went through SAP Note 1232973 and appli