You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ctakes.apache.org by Piyush Agarwal <pi...@auronia.io> on 2019/05/09 12:43:14 UTC

Question on how to configure bsv dictionary usage with fast lookup

Hi,
I want to use the default dictionary provided with fast lookup, but also want to add few additional terms in the bsv file
How do I configure the fast dictionary lookup to do so?
Regards,

Piyush Agarwal
Chief Research Officer
Auronia




Re: Question on how to configure bsv dictionary usage with fast lookup

Posted by Piyush Agarwal <pi...@auronia.io>.
Also ,
Will this change then only use custom file or it will be in addition to the
sno_rx?
Piyush


On Thu, 9 May 2019, 19:55 Steve Evans, <st...@duke.edu> wrote:

> This is what we did:
>
>
>
> Created and populated a terms file called psychterms.bsv
>
>
>
> Put it in
>
> resources\org\apache\ctakes\dictionary\lookup\fast\duke\bsv\symptoms8.bsv
>
>
>
> updated file
> resources\org\apache\ctakes\dictionary\lookup\fast\sno_rx_16ab.xml by
> adding:
>
>
>
> This to dictionaries:
>
>    <dictionary>
>
>          <name>CustomPsychCuiRareWord</name>
>
>
> <implementationName>org.apache.ctakes.dictionary.lookup2.dictionary.BsvRareWordDictionary</implementationName>
>
>         <properties>
>
>             <property key="bsvPath"
> value="org/apache/ctakes/dictionary/lookup/fast/duke/bsv/symptoms8.bsv"/>
>
>          </properties>
>
>    </dictionary>
>
>
>
> This to concept factories:
>
> <conceptFactory>
>
> <name>CustomPsychCuiConcept</name>
>
>
> <implementationName>org.apache.ctakes.dictionary.lookup2.concept.BsvConceptFactory</implementationName>
>
>                <properties>
>
>                                 <property key="bsvPath"
> value="org/apache/ctakes/dictionary/lookup/fast/duke/bsv/symptoms8.bsv"/>
>
>                </properties>
>
> </conceptFactory>
>
>
>
> This to dictionearyConceptPairs:
>
> <dictionaryConceptPair>
>
>         <name>CustomPsychTermsPair</name>
>
>         <dictionaryName>CustomPsychCuiRareWord</dictionaryName>
>
>         <conceptFactoryName>CustomPsychCuiConcept</conceptFactoryName>
>
> </dictionaryConceptPair>
>
>
>
> And change this property from
>
>                <property key="codingScheme" value="sno_rx_16ab"/>
>
> To
>
>                <property key="codingScheme" value="custom"/>
>
>
>
> Hope this helps,
>
>
>
> Steve
>
>
>
>
>
>
>
>
>
> *From:* Piyush Agarwal <pi...@auronia.io>
> *Sent:* Thursday, May 9, 2019 8:43 AM
> *To:* user@ctakes.apache.org
> *Subject:* Question on how to configure bsv dictionary usage with fast
> lookup
>
>
>
> Hi,
>
> I want to use the default dictionary provided with fast lookup, but also
> want to add few additional terms in the bsv file
>
> How do I configure the fast dictionary lookup to do so?
>
> Regards,
>
>
>
> Piyush Agarwal
>
> Chief Research Officer
>
> Auronia
>
>
>
>
>
>
>

Re: Question on how to configure bsv dictionary usage with fast lookup

Posted by Piyush Agarwal <pi...@auronia.io>.
Thanks Steve

Piyush Agarwal
Chief Research Officer
Auronia



> On 09-May-2019, at 8:11 PM, Steve Evans <st...@duke.edu> wrote:
> 
> Piyush,
>  
> Ours was shipped (or, at least I thought it was) with a  dictionaries entry which looks like this:
>  
> <dictionaries>
>    <dictionary>
>       <name>sno_rx_16abTerms</name>
>       <implementationName>org.apache.ctakes.dictionary.lookup2.dictionary.UmlsJdbcRareWordDictionary</implementationName>
>       <properties>
> <!-- urls for hsqldb memory connections must be file types in hsql 1.8.
> These file urls must be either absolute path or relative to current working directory.
> They cannot be based upon the classpath.
> Though JdbcConnectionFactory will attempt to "find" a db based upon the parent dir of the url
> for the sake of ide ease-of-use, the user should be aware of these hsql limitations.
> -->
>          <property key="jdbcDriver" value="org.hsqldb.jdbcDriver"/>
>          <property key="jdbcUrl" value="jdbc:hsqldb:file:resources/org/apache/ctakes/dictionary/lookup/fast/sno_rx_16ab/sno_rx_16ab"/>
>          <property key="jdbcUser" value="sa"/>
>          <property key="jdbcPass" value=""/>
>          <property key="rareWordTable" value="cui_terms"/>
>          <property key="umlsUrl" value="https://uts-ws.nlm.nih.gov/restful/isValidUMLSUser <https://uts-ws.nlm.nih.gov/restful/isValidUMLSUser>"/>
>          <property key="umlsVendor" value="NLM-6515182895"/>
>          <property key="umlsUser" value="evans036"/>
>          <property key="umlsPass" value="xxxxxxxxx"/>
>       </properties>
>    </dictionary>
> </dictionaries>
>  
> I don’t recall adding that sno_rx_16abTerms dictionary, but I guess I might be mistaken
>  
> So we have two dictionaries defined: one for the UMLS lookups & the other for our custom terms. When configured like this, you get snomed, rxnorm and you own terms intermixed in the output.
>  
> Hope this helps,
>  
> Steve
>  
>  
> From: Piyush Agarwal <pi...@auronia.io> 
> Sent: Thursday, May 9, 2019 10:29 AM
> To: user@ctakes.apache.org
> Subject: Re: Question on how to configure bsv dictionary usage with fast lookup
>  
> Thank you for the reply Steve. Aani don't see any dictionaries tag, I just go ahead and create one ?
> Regards
>  
> On Thu, 9 May 2019, 19:55 Steve Evans, <stephen.evans@duke.edu <ma...@duke.edu>> wrote:
> This is what we did:
>  
> Created and populated a terms file called psychterms.bsv
>  
> Put it in
> resources\org\apache\ctakes\dictionary\lookup\fast\duke\bsv\symptoms8.bsv
>  
> updated file resources\org\apache\ctakes\dictionary\lookup\fast\sno_rx_16ab.xml by adding:
>  
> This to dictionaries:
>    <dictionary>
>          <name>CustomPsychCuiRareWord</name>
>          <implementationName>org.apache.ctakes.dictionary.lookup2.dictionary.BsvRareWordDictionary</implementationName>
>         <properties>
>             <property key="bsvPath" value="org/apache/ctakes/dictionary/lookup/fast/duke/bsv/symptoms8.bsv"/>
>          </properties>
>    </dictionary>
>  
> This to concept factories:
> <conceptFactory>
> <name>CustomPsychCuiConcept</name>
>         <implementationName>org.apache.ctakes.dictionary.lookup2.concept.BsvConceptFactory</implementationName>
>                <properties>
>                                 <property key="bsvPath" value="org/apache/ctakes/dictionary/lookup/fast/duke/bsv/symptoms8.bsv"/>
>                </properties>
> </conceptFactory>
>  
> This to dictionearyConceptPairs:
> <dictionaryConceptPair>
>         <name>CustomPsychTermsPair</name>
>         <dictionaryName>CustomPsychCuiRareWord</dictionaryName>
>         <conceptFactoryName>CustomPsychCuiConcept</conceptFactoryName>
> </dictionaryConceptPair>
>  
> And change this property from
>                <property key="codingScheme" value="sno_rx_16ab"/>
> To
>                <property key="codingScheme" value="custom"/>
>  
> Hope this helps,
>  
> Steve
>  
>  
>  
>  
> From: Piyush Agarwal <piyush@auronia.io <ma...@auronia.io>> 
> Sent: Thursday, May 9, 2019 8:43 AM
> To: user@ctakes.apache.org <ma...@ctakes.apache.org>
> Subject: Question on how to configure bsv dictionary usage with fast lookup
>  
> Hi,
> I want to use the default dictionary provided with fast lookup, but also want to add few additional terms in the bsv file
> How do I configure the fast dictionary lookup to do so?
> Regards,
>  
> Piyush Agarwal
> Chief Research Officer
> Auronia


Re: Question on how to configure bsv dictionary usage with fast lookup

Posted by Piyush Agarwal <pi...@auronia.io>.
Hi Steve,
Thank you so much. I have got it to work.
Regards,
Piyush Agarwal
Chief Research Officer
Auronia



> On 09-May-2019, at 8:11 PM, Steve Evans <st...@duke.edu> wrote:
> 
> Piyush,
>  
> Ours was shipped (or, at least I thought it was) with a  dictionaries entry which looks like this:
>  
> <dictionaries>
>    <dictionary>
>       <name>sno_rx_16abTerms</name>
>       <implementationName>org.apache.ctakes.dictionary.lookup2.dictionary.UmlsJdbcRareWordDictionary</implementationName>
>       <properties>
> <!-- urls for hsqldb memory connections must be file types in hsql 1.8.
> These file urls must be either absolute path or relative to current working directory.
> They cannot be based upon the classpath.
> Though JdbcConnectionFactory will attempt to "find" a db based upon the parent dir of the url
> for the sake of ide ease-of-use, the user should be aware of these hsql limitations.
> -->
>          <property key="jdbcDriver" value="org.hsqldb.jdbcDriver"/>
>          <property key="jdbcUrl" value="jdbc:hsqldb:file:resources/org/apache/ctakes/dictionary/lookup/fast/sno_rx_16ab/sno_rx_16ab"/>
>          <property key="jdbcUser" value="sa"/>
>          <property key="jdbcPass" value=""/>
>          <property key="rareWordTable" value="cui_terms"/>
>          <property key="umlsUrl" value="https://uts-ws.nlm.nih.gov/restful/isValidUMLSUser <https://uts-ws.nlm.nih.gov/restful/isValidUMLSUser>"/>
>          <property key="umlsVendor" value="NLM-6515182895"/>
>          <property key="umlsUser" value="evans036"/>
>          <property key="umlsPass" value="xxxxxxxxx"/>
>       </properties>
>    </dictionary>
> </dictionaries>
>  
> I don’t recall adding that sno_rx_16abTerms dictionary, but I guess I might be mistaken
>  
> So we have two dictionaries defined: one for the UMLS lookups & the other for our custom terms. When configured like this, you get snomed, rxnorm and you own terms intermixed in the output.
>  
> Hope this helps,
>  
> Steve
>  
>  
> From: Piyush Agarwal <pi...@auronia.io> 
> Sent: Thursday, May 9, 2019 10:29 AM
> To: user@ctakes.apache.org
> Subject: Re: Question on how to configure bsv dictionary usage with fast lookup
>  
> Thank you for the reply Steve. Aani don't see any dictionaries tag, I just go ahead and create one ?
> Regards
>  
> On Thu, 9 May 2019, 19:55 Steve Evans, <stephen.evans@duke.edu <ma...@duke.edu>> wrote:
> This is what we did:
>  
> Created and populated a terms file called psychterms.bsv
>  
> Put it in
> resources\org\apache\ctakes\dictionary\lookup\fast\duke\bsv\symptoms8.bsv
>  
> updated file resources\org\apache\ctakes\dictionary\lookup\fast\sno_rx_16ab.xml by adding:
>  
> This to dictionaries:
>    <dictionary>
>          <name>CustomPsychCuiRareWord</name>
>          <implementationName>org.apache.ctakes.dictionary.lookup2.dictionary.BsvRareWordDictionary</implementationName>
>         <properties>
>             <property key="bsvPath" value="org/apache/ctakes/dictionary/lookup/fast/duke/bsv/symptoms8.bsv"/>
>          </properties>
>    </dictionary>
>  
> This to concept factories:
> <conceptFactory>
> <name>CustomPsychCuiConcept</name>
>         <implementationName>org.apache.ctakes.dictionary.lookup2.concept.BsvConceptFactory</implementationName>
>                <properties>
>                                 <property key="bsvPath" value="org/apache/ctakes/dictionary/lookup/fast/duke/bsv/symptoms8.bsv"/>
>                </properties>
> </conceptFactory>
>  
> This to dictionearyConceptPairs:
> <dictionaryConceptPair>
>         <name>CustomPsychTermsPair</name>
>         <dictionaryName>CustomPsychCuiRareWord</dictionaryName>
>         <conceptFactoryName>CustomPsychCuiConcept</conceptFactoryName>
> </dictionaryConceptPair>
>  
> And change this property from
>                <property key="codingScheme" value="sno_rx_16ab"/>
> To
>                <property key="codingScheme" value="custom"/>
>  
> Hope this helps,
>  
> Steve
>  
>  
>  
>  
> From: Piyush Agarwal <piyush@auronia.io <ma...@auronia.io>> 
> Sent: Thursday, May 9, 2019 8:43 AM
> To: user@ctakes.apache.org <ma...@ctakes.apache.org>
> Subject: Question on how to configure bsv dictionary usage with fast lookup
>  
> Hi,
> I want to use the default dictionary provided with fast lookup, but also want to add few additional terms in the bsv file
> How do I configure the fast dictionary lookup to do so?
> Regards,
>  
> Piyush Agarwal
> Chief Research Officer
> Auronia


RE: Question on how to configure bsv dictionary usage with fast lookup

Posted by Steve Evans <st...@duke.edu>.
Piyush,

Ours was shipped (or, at least I thought it was) with a  dictionaries entry which looks like this:

<dictionaries>
   <dictionary>
      <name>sno_rx_16abTerms</name>
      <implementationName>org.apache.ctakes.dictionary.lookup2.dictionary.UmlsJdbcRareWordDictionary</implementationName>
      <properties>
<!-- urls for hsqldb memory connections must be file types in hsql 1.8.
These file urls must be either absolute path or relative to current working directory.
They cannot be based upon the classpath.
Though JdbcConnectionFactory will attempt to "find" a db based upon the parent dir of the url
for the sake of ide ease-of-use, the user should be aware of these hsql limitations.
-->
         <property key="jdbcDriver" value="org.hsqldb.jdbcDriver"/>
         <property key="jdbcUrl" value="jdbc:hsqldb:file:resources/org/apache/ctakes/dictionary/lookup/fast/sno_rx_16ab/sno_rx_16ab"/>
         <property key="jdbcUser" value="sa"/>
         <property key="jdbcPass" value=""/>
         <property key="rareWordTable" value="cui_terms"/>
         <property key="umlsUrl" value="https://uts-ws.nlm.nih.gov/restful/isValidUMLSUser"/>
         <property key="umlsVendor" value="NLM-6515182895"/>
         <property key="umlsUser" value="evans036"/>
         <property key="umlsPass" value="xxxxxxxxx"/>
      </properties>
   </dictionary>
</dictionaries>

I don’t recall adding that sno_rx_16abTerms dictionary, but I guess I might be mistaken

So we have two dictionaries defined: one for the UMLS lookups & the other for our custom terms. When configured like this, you get snomed, rxnorm and you own terms intermixed in the output.

Hope this helps,

Steve


From: Piyush Agarwal <pi...@auronia.io>
Sent: Thursday, May 9, 2019 10:29 AM
To: user@ctakes.apache.org
Subject: Re: Question on how to configure bsv dictionary usage with fast lookup

Thank you for the reply Steve. Aani don't see any dictionaries tag, I just go ahead and create one ?
Regards

On Thu, 9 May 2019, 19:55 Steve Evans, <st...@duke.edu>> wrote:
This is what we did:

Created and populated a terms file called psychterms.bsv

Put it in
resources\org\apache\ctakes\dictionary\lookup\fast\duke\bsv\symptoms8.bsv

updated file resources\org\apache\ctakes\dictionary\lookup\fast\sno_rx_16ab.xml by adding:

This to dictionaries:
   <dictionary>
         <name>CustomPsychCuiRareWord</name>
         <implementationName>org.apache.ctakes.dictionary.lookup2.dictionary.BsvRareWordDictionary</implementationName>
        <properties>
            <property key="bsvPath" value="org/apache/ctakes/dictionary/lookup/fast/duke/bsv/symptoms8.bsv"/>
         </properties>
   </dictionary>

This to concept factories:
<conceptFactory>
<name>CustomPsychCuiConcept</name>
        <implementationName>org.apache.ctakes.dictionary.lookup2.concept.BsvConceptFactory</implementationName>
               <properties>
                                <property key="bsvPath" value="org/apache/ctakes/dictionary/lookup/fast/duke/bsv/symptoms8.bsv"/>
               </properties>
</conceptFactory>

This to dictionearyConceptPairs:
<dictionaryConceptPair>
        <name>CustomPsychTermsPair</name>
        <dictionaryName>CustomPsychCuiRareWord</dictionaryName>
        <conceptFactoryName>CustomPsychCuiConcept</conceptFactoryName>
</dictionaryConceptPair>

And change this property from
               <property key="codingScheme" value="sno_rx_16ab"/>
To
               <property key="codingScheme" value="custom"/>

Hope this helps,

Steve




From: Piyush Agarwal <pi...@auronia.io>>
Sent: Thursday, May 9, 2019 8:43 AM
To: user@ctakes.apache.org<ma...@ctakes.apache.org>
Subject: Question on how to configure bsv dictionary usage with fast lookup

Hi,
I want to use the default dictionary provided with fast lookup, but also want to add few additional terms in the bsv file
How do I configure the fast dictionary lookup to do so?
Regards,

Piyush Agarwal
Chief Research Officer
Auronia




Re: Question on how to configure bsv dictionary usage with fast lookup

Posted by Piyush Agarwal <pi...@auronia.io>.
Thank you for the reply Steve. Aani don't see any dictionaries tag, I just
go ahead and create one ?
Regards

On Thu, 9 May 2019, 19:55 Steve Evans, <st...@duke.edu> wrote:

> This is what we did:
>
>
>
> Created and populated a terms file called psychterms.bsv
>
>
>
> Put it in
>
> resources\org\apache\ctakes\dictionary\lookup\fast\duke\bsv\symptoms8.bsv
>
>
>
> updated file
> resources\org\apache\ctakes\dictionary\lookup\fast\sno_rx_16ab.xml by
> adding:
>
>
>
> This to dictionaries:
>
>    <dictionary>
>
>          <name>CustomPsychCuiRareWord</name>
>
>
> <implementationName>org.apache.ctakes.dictionary.lookup2.dictionary.BsvRareWordDictionary</implementationName>
>
>         <properties>
>
>             <property key="bsvPath"
> value="org/apache/ctakes/dictionary/lookup/fast/duke/bsv/symptoms8.bsv"/>
>
>          </properties>
>
>    </dictionary>
>
>
>
> This to concept factories:
>
> <conceptFactory>
>
> <name>CustomPsychCuiConcept</name>
>
>
> <implementationName>org.apache.ctakes.dictionary.lookup2.concept.BsvConceptFactory</implementationName>
>
>                <properties>
>
>                                 <property key="bsvPath"
> value="org/apache/ctakes/dictionary/lookup/fast/duke/bsv/symptoms8.bsv"/>
>
>                </properties>
>
> </conceptFactory>
>
>
>
> This to dictionearyConceptPairs:
>
> <dictionaryConceptPair>
>
>         <name>CustomPsychTermsPair</name>
>
>         <dictionaryName>CustomPsychCuiRareWord</dictionaryName>
>
>         <conceptFactoryName>CustomPsychCuiConcept</conceptFactoryName>
>
> </dictionaryConceptPair>
>
>
>
> And change this property from
>
>                <property key="codingScheme" value="sno_rx_16ab"/>
>
> To
>
>                <property key="codingScheme" value="custom"/>
>
>
>
> Hope this helps,
>
>
>
> Steve
>
>
>
>
>
>
>
>
>
> *From:* Piyush Agarwal <pi...@auronia.io>
> *Sent:* Thursday, May 9, 2019 8:43 AM
> *To:* user@ctakes.apache.org
> *Subject:* Question on how to configure bsv dictionary usage with fast
> lookup
>
>
>
> Hi,
>
> I want to use the default dictionary provided with fast lookup, but also
> want to add few additional terms in the bsv file
>
> How do I configure the fast dictionary lookup to do so?
>
> Regards,
>
>
>
> Piyush Agarwal
>
> Chief Research Officer
>
> Auronia
>
>
>
>
>
>
>

RE: Question on how to configure bsv dictionary usage with fast lookup

Posted by Steve Evans <st...@duke.edu>.
This is what we did:

Created and populated a terms file called psychterms.bsv

Put it in
resources\org\apache\ctakes\dictionary\lookup\fast\duke\bsv\symptoms8.bsv

updated file resources\org\apache\ctakes\dictionary\lookup\fast\sno_rx_16ab.xml by adding:

This to dictionaries:
   <dictionary>
         <name>CustomPsychCuiRareWord</name>
         <implementationName>org.apache.ctakes.dictionary.lookup2.dictionary.BsvRareWordDictionary</implementationName>
        <properties>
            <property key="bsvPath" value="org/apache/ctakes/dictionary/lookup/fast/duke/bsv/symptoms8.bsv"/>
         </properties>
   </dictionary>

This to concept factories:
<conceptFactory>
<name>CustomPsychCuiConcept</name>
        <implementationName>org.apache.ctakes.dictionary.lookup2.concept.BsvConceptFactory</implementationName>
               <properties>
                                <property key="bsvPath" value="org/apache/ctakes/dictionary/lookup/fast/duke/bsv/symptoms8.bsv"/>
               </properties>
</conceptFactory>

This to dictionearyConceptPairs:
<dictionaryConceptPair>
        <name>CustomPsychTermsPair</name>
        <dictionaryName>CustomPsychCuiRareWord</dictionaryName>
        <conceptFactoryName>CustomPsychCuiConcept</conceptFactoryName>
</dictionaryConceptPair>

And change this property from
               <property key="codingScheme" value="sno_rx_16ab"/>
To
               <property key="codingScheme" value="custom"/>

Hope this helps,

Steve




From: Piyush Agarwal <pi...@auronia.io>
Sent: Thursday, May 9, 2019 8:43 AM
To: user@ctakes.apache.org
Subject: Question on how to configure bsv dictionary usage with fast lookup

Hi,
I want to use the default dictionary provided with fast lookup, but also want to add few additional terms in the bsv file
How do I configure the fast dictionary lookup to do so?
Regards,

Piyush Agarwal
Chief Research Officer
Auronia