You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ctakes.apache.org by Vicky Chawda <vi...@praxify.com> on 2016/06/28 05:40:46 UTC

CTakes APIs

Is there any API or REST interface is available for CTakes.?
Regards,

*Vicky Chawda.*
*Software Engineer,*
*Praxify Technologies, Inc.*
Icon Tower, Main Road, Baner, Pune-411045.
[image: https://www.praxify.com/] <https://www.praxify.com/>

Re: CTakes APIs

Posted by "Abramowitsch, Peter" <pa...@hearst.com>.
I created one in about 15 minutes using SparkJava.  Basically you look at
the code in the ClinicalPipeline package that gives you the workflow to
create a pipeline, assign incoming text to a newly created Jcas, and then
run the pipeline, finally calling a Json or XmlSerializer on the populated
CAS object.  

Exposing that as a webservice can be as little as this.

import static spark.Spark.post;
public static void main(String[] args) {
	spark.Spark.port(8080);
	Main n = new Main();
	try {
		n.createPipeline();
	} catch (UIMAException | IOException | SAXException | URISyntaxException
e) {
		e.printStackTrace();
	}
	post("/ctakeparse", (request, response) -> n.mymethod(request, response));
	}

Ok I admit there are a few more lines of code.  Maybe a couple of hundred.


Note that you can build the pipeline once (where a lot of heavy lifting
happens), and then use it repeatedly, just resetting the Jcas object
between invocations of the webservice.

- Peter



On 6/27/16, 10:53 PM, "Mattmann, Chris A (3980)"
<ch...@jpl.nasa.gov> wrote:

>Hi Vicky,
>
>
>
>We expose cTAKES as a REST API in Apache Tika, have a look at:
>
>
>
>https://urldefense.proofpoint.com/v2/url?u=http-3A__wiki.apache.org_tika_c
>TAKESParser&d=CwIGaQ&c=B73tqXN8Ec0ocRmZHMCntw&r=5LM1YwNyMUq7CWiSepCCsjTjwu
>VF4uswNF8BK5Orm10&m=1SVXxf4S1egpSNODcQrYvhw8Abzzs1JKduk_Ffv2CCg&s=X-ui3HMW
>13oQkeJirW9tClgw4HxyQa36TaItq_IWqLs&e=
>
>
>
>Best of luck! Feel free to ask questions here and/or on the Apache
>
>Tika lists.
>
>
>
>Cheers,
>
>Chris
>
>
>
>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>Chris Mattmann, Ph.D.
>
>Chief Architect
>
>Instrument Software and Science Data Systems Section (398)
>
>NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
>
>Office: 168-519, Mailstop: 168-527
>
>Email: chris.a.mattmann@nasa.gov
>
>WWW:  
>https://urldefense.proofpoint.com/v2/url?u=http-3A__sunset.usc.edu_-7Ematt
>mann_&d=CwIGaQ&c=B73tqXN8Ec0ocRmZHMCntw&r=5LM1YwNyMUq7CWiSepCCsjTjwuVF4usw
>NF8BK5Orm10&m=1SVXxf4S1egpSNODcQrYvhw8Abzzs1JKduk_Ffv2CCg&s=eT-uqWdrrKMxLl
>FhKD9wMeop_lAnmHJqfifncYEwVkw&e=
>
>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>Director, Information Retrieval and Data Science Group (IRDS)
>
>Adjunct Associate Professor, Computer Science Department
>
>University of Southern California, Los Angeles, CA 90089 USA
>
>WWW: 
>https://urldefense.proofpoint.com/v2/url?u=http-3A__irds.usc.edu_&d=CwIGaQ
>&c=B73tqXN8Ec0ocRmZHMCntw&r=5LM1YwNyMUq7CWiSepCCsjTjwuVF4uswNF8BK5Orm10&m=
>1SVXxf4S1egpSNODcQrYvhw8Abzzs1JKduk_Ffv2CCg&s=y6v1EvIP_vH-3Hb4wbGYGAADcDzc
>2p3q7TySHdgVb3Q&e=
>
>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>On 6/27/16, 10:40 PM, "Vicky Chawda" <vi...@praxify.com> wrote:
>
>
>
>>Is there any API or REST interface is available for CTakes.?
>
>>Regards,
>
>>
>
>>*Vicky Chawda.*
>
>>*Software Engineer,*
>
>>*Praxify Technologies, Inc.*
>
>>Icon Tower, Main Road, Baner, Pune-411045.
>
>>[image: 
>>https://urldefense.proofpoint.com/v2/url?u=https-3A__www.praxify.com_&d=C
>>wIGaQ&c=B73tqXN8Ec0ocRmZHMCntw&r=5LM1YwNyMUq7CWiSepCCsjTjwuVF4uswNF8BK5Or
>>m10&m=1SVXxf4S1egpSNODcQrYvhw8Abzzs1JKduk_Ffv2CCg&s=eCVrlCS5kIJUGEDilpPZk
>>x_INH0LdSz66xKRn1e4Oyc&e= ]
>><https://urldefense.proofpoint.com/v2/url?u=https-3A__www.praxify.com_&d=
>>CwIGaQ&c=B73tqXN8Ec0ocRmZHMCntw&r=5LM1YwNyMUq7CWiSepCCsjTjwuVF4uswNF8BK5O
>>rm10&m=1SVXxf4S1egpSNODcQrYvhw8Abzzs1JKduk_Ffv2CCg&s=eCVrlCS5kIJUGEDilpPZ
>>kx_INH0LdSz66xKRn1e4Oyc&e= >
>


Re: CTakes APIs

Posted by "Mattmann, Chris A (3980)" <ch...@jpl.nasa.gov>.
Correct, Peter..

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Chris Mattmann, Ph.D.
Chief Architect
Instrument Software and Science Data Systems Section (398)
NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
Office: 168-519, Mailstop: 168-527
Email: chris.a.mattmann@nasa.gov
WWW:  http://sunset.usc.edu/~mattmann/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Director, Information Retrieval and Data Science Group (IRDS)
Adjunct Associate Professor, Computer Science Department
University of Southern California, Los Angeles, CA 90089 USA
WWW: http://irds.usc.edu/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++










On 6/27/16, 11:14 PM, "Abramowitsch, Peter" <pa...@hearst.com> wrote:

>It doesn't actually access the database,  It accesses your UMLS license.
>
>- P
>
>On 6/27/16, 11:04 PM, "Vicky Chawda" <vi...@praxify.com> wrote:
>
>>cTAKES as a REST API in Apache Tika accesses UMLS Database online, How can
>>we set it up in offline mode?
>>
>>Regards,
>>
>>*Vicky Chawda.*
>>*Software Engineer,*
>>*Praxify Technologies, Inc.*
>>Icon Tower, Main Road, Baner, Pune-411045.
>>[image: 
>>https://urldefense.proofpoint.com/v2/url?u=https-3A__www.praxify.com_&d=Cw
>>IBaQ&c=B73tqXN8Ec0ocRmZHMCntw&r=5LM1YwNyMUq7CWiSepCCsjTjwuVF4uswNF8BK5Orm1
>>0&m=Hf9_f7eW7xPZLQqoiDNsBT1b43RJoZ_H7gGjAL6wuHg&s=jhon9jYxwW0ldIV6BQsPXHk5
>>wd851jUtKEP1ZImh3Ys&e= ]
>><https://urldefense.proofpoint.com/v2/url?u=https-3A__www.praxify.com_&d=C
>>wIBaQ&c=B73tqXN8Ec0ocRmZHMCntw&r=5LM1YwNyMUq7CWiSepCCsjTjwuVF4uswNF8BK5Orm
>>10&m=Hf9_f7eW7xPZLQqoiDNsBT1b43RJoZ_H7gGjAL6wuHg&s=jhon9jYxwW0ldIV6BQsPXHk
>>5wd851jUtKEP1ZImh3Ys&e= >
>>
>>On Tue, Jun 28, 2016 at 11:23 AM, Mattmann, Chris A (3980) <
>>chris.a.mattmann@jpl.nasa.gov> wrote:
>>
>>> Hi Vicky,
>>>
>>> We expose cTAKES as a REST API in Apache Tika, have a look at:
>>>
>>> 
>>>https://urldefense.proofpoint.com/v2/url?u=http-3A__wiki.apache.org_tika_
>>>cTAKESParser&d=CwIBaQ&c=B73tqXN8Ec0ocRmZHMCntw&r=5LM1YwNyMUq7CWiSepCCsjTj
>>>wuVF4uswNF8BK5Orm10&m=Hf9_f7eW7xPZLQqoiDNsBT1b43RJoZ_H7gGjAL6wuHg&s=gPrDV
>>>u8poGeMH7i4opBz5Gsp101RPtKonAzpk0JIH9Q&e=
>>>
>>> Best of luck! Feel free to ask questions here and/or on the Apache
>>> Tika lists.
>>>
>>> Cheers,
>>> Chris
>>>
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>> Chris Mattmann, Ph.D.
>>> Chief Architect
>>> Instrument Software and Science Data Systems Section (398)
>>> NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
>>> Office: 168-519, Mailstop: 168-527
>>> Email: chris.a.mattmann@nasa.gov
>>> WWW:  
>>>https://urldefense.proofpoint.com/v2/url?u=http-3A__sunset.usc.edu_-7Emat
>>>tmann_&d=CwIBaQ&c=B73tqXN8Ec0ocRmZHMCntw&r=5LM1YwNyMUq7CWiSepCCsjTjwuVF4u
>>>swNF8BK5Orm10&m=Hf9_f7eW7xPZLQqoiDNsBT1b43RJoZ_H7gGjAL6wuHg&s=7bLpKU62I4F
>>>_bUspqRIoeIBXPWQrni56l6DXQFpRIsI&e=
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>> Director, Information Retrieval and Data Science Group (IRDS)
>>> Adjunct Associate Professor, Computer Science Department
>>> University of Southern California, Los Angeles, CA 90089 USA
>>> WWW: 
>>>https://urldefense.proofpoint.com/v2/url?u=http-3A__irds.usc.edu_&d=CwIBa
>>>Q&c=B73tqXN8Ec0ocRmZHMCntw&r=5LM1YwNyMUq7CWiSepCCsjTjwuVF4uswNF8BK5Orm10&
>>>m=Hf9_f7eW7xPZLQqoiDNsBT1b43RJoZ_H7gGjAL6wuHg&s=R5hgy_mEIfrZmrKCwVfg7OvZI
>>>GYxAANZncfOftTf2lI&e=
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On 6/27/16, 10:40 PM, "Vicky Chawda" <vi...@praxify.com> wrote:
>>>
>>> >Is there any API or REST interface is available for CTakes.?
>>> >Regards,
>>> >
>>> >*Vicky Chawda.*
>>> >*Software Engineer,*
>>> >*Praxify Technologies, Inc.*
>>> >Icon Tower, Main Road, Baner, Pune-411045.
>>> >[image: 
>>>https://urldefense.proofpoint.com/v2/url?u=https-3A__www.praxify.com_&d=C
>>>wIBaQ&c=B73tqXN8Ec0ocRmZHMCntw&r=5LM1YwNyMUq7CWiSepCCsjTjwuVF4uswNF8BK5Or
>>>m10&m=Hf9_f7eW7xPZLQqoiDNsBT1b43RJoZ_H7gGjAL6wuHg&s=jhon9jYxwW0ldIV6BQsPX
>>>Hk5wd851jUtKEP1ZImh3Ys&e= ]
>>><https://urldefense.proofpoint.com/v2/url?u=https-3A__www.praxify.com_&d=
>>>CwIBaQ&c=B73tqXN8Ec0ocRmZHMCntw&r=5LM1YwNyMUq7CWiSepCCsjTjwuVF4uswNF8BK5O
>>>rm10&m=Hf9_f7eW7xPZLQqoiDNsBT1b43RJoZ_H7gGjAL6wuHg&s=jhon9jYxwW0ldIV6BQsP
>>>XHk5wd851jUtKEP1ZImh3Ys&e= >
>>>
>

Re: CTakes APIs

Posted by "Abramowitsch, Peter" <pa...@hearst.com>.
It doesn't actually access the database,  It accesses your UMLS license.

- P

On 6/27/16, 11:04 PM, "Vicky Chawda" <vi...@praxify.com> wrote:

>cTAKES as a REST API in Apache Tika accesses UMLS Database online, How can
>we set it up in offline mode?
>
>Regards,
>
>*Vicky Chawda.*
>*Software Engineer,*
>*Praxify Technologies, Inc.*
>Icon Tower, Main Road, Baner, Pune-411045.
>[image: 
>https://urldefense.proofpoint.com/v2/url?u=https-3A__www.praxify.com_&d=Cw
>IBaQ&c=B73tqXN8Ec0ocRmZHMCntw&r=5LM1YwNyMUq7CWiSepCCsjTjwuVF4uswNF8BK5Orm1
>0&m=Hf9_f7eW7xPZLQqoiDNsBT1b43RJoZ_H7gGjAL6wuHg&s=jhon9jYxwW0ldIV6BQsPXHk5
>wd851jUtKEP1ZImh3Ys&e= ]
><https://urldefense.proofpoint.com/v2/url?u=https-3A__www.praxify.com_&d=C
>wIBaQ&c=B73tqXN8Ec0ocRmZHMCntw&r=5LM1YwNyMUq7CWiSepCCsjTjwuVF4uswNF8BK5Orm
>10&m=Hf9_f7eW7xPZLQqoiDNsBT1b43RJoZ_H7gGjAL6wuHg&s=jhon9jYxwW0ldIV6BQsPXHk
>5wd851jUtKEP1ZImh3Ys&e= >
>
>On Tue, Jun 28, 2016 at 11:23 AM, Mattmann, Chris A (3980) <
>chris.a.mattmann@jpl.nasa.gov> wrote:
>
>> Hi Vicky,
>>
>> We expose cTAKES as a REST API in Apache Tika, have a look at:
>>
>> 
>>https://urldefense.proofpoint.com/v2/url?u=http-3A__wiki.apache.org_tika_
>>cTAKESParser&d=CwIBaQ&c=B73tqXN8Ec0ocRmZHMCntw&r=5LM1YwNyMUq7CWiSepCCsjTj
>>wuVF4uswNF8BK5Orm10&m=Hf9_f7eW7xPZLQqoiDNsBT1b43RJoZ_H7gGjAL6wuHg&s=gPrDV
>>u8poGeMH7i4opBz5Gsp101RPtKonAzpk0JIH9Q&e=
>>
>> Best of luck! Feel free to ask questions here and/or on the Apache
>> Tika lists.
>>
>> Cheers,
>> Chris
>>
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>> Chris Mattmann, Ph.D.
>> Chief Architect
>> Instrument Software and Science Data Systems Section (398)
>> NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
>> Office: 168-519, Mailstop: 168-527
>> Email: chris.a.mattmann@nasa.gov
>> WWW:  
>>https://urldefense.proofpoint.com/v2/url?u=http-3A__sunset.usc.edu_-7Emat
>>tmann_&d=CwIBaQ&c=B73tqXN8Ec0ocRmZHMCntw&r=5LM1YwNyMUq7CWiSepCCsjTjwuVF4u
>>swNF8BK5Orm10&m=Hf9_f7eW7xPZLQqoiDNsBT1b43RJoZ_H7gGjAL6wuHg&s=7bLpKU62I4F
>>_bUspqRIoeIBXPWQrni56l6DXQFpRIsI&e=
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>> Director, Information Retrieval and Data Science Group (IRDS)
>> Adjunct Associate Professor, Computer Science Department
>> University of Southern California, Los Angeles, CA 90089 USA
>> WWW: 
>>https://urldefense.proofpoint.com/v2/url?u=http-3A__irds.usc.edu_&d=CwIBa
>>Q&c=B73tqXN8Ec0ocRmZHMCntw&r=5LM1YwNyMUq7CWiSepCCsjTjwuVF4uswNF8BK5Orm10&
>>m=Hf9_f7eW7xPZLQqoiDNsBT1b43RJoZ_H7gGjAL6wuHg&s=R5hgy_mEIfrZmrKCwVfg7OvZI
>>GYxAANZncfOftTf2lI&e=
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On 6/27/16, 10:40 PM, "Vicky Chawda" <vi...@praxify.com> wrote:
>>
>> >Is there any API or REST interface is available for CTakes.?
>> >Regards,
>> >
>> >*Vicky Chawda.*
>> >*Software Engineer,*
>> >*Praxify Technologies, Inc.*
>> >Icon Tower, Main Road, Baner, Pune-411045.
>> >[image: 
>>https://urldefense.proofpoint.com/v2/url?u=https-3A__www.praxify.com_&d=C
>>wIBaQ&c=B73tqXN8Ec0ocRmZHMCntw&r=5LM1YwNyMUq7CWiSepCCsjTjwuVF4uswNF8BK5Or
>>m10&m=Hf9_f7eW7xPZLQqoiDNsBT1b43RJoZ_H7gGjAL6wuHg&s=jhon9jYxwW0ldIV6BQsPX
>>Hk5wd851jUtKEP1ZImh3Ys&e= ]
>><https://urldefense.proofpoint.com/v2/url?u=https-3A__www.praxify.com_&d=
>>CwIBaQ&c=B73tqXN8Ec0ocRmZHMCntw&r=5LM1YwNyMUq7CWiSepCCsjTjwuVF4uswNF8BK5O
>>rm10&m=Hf9_f7eW7xPZLQqoiDNsBT1b43RJoZ_H7gGjAL6wuHg&s=jhon9jYxwW0ldIV6BQsP
>>XHk5wd851jUtKEP1ZImh3Ys&e= >
>>


Re: CTakes APIs

Posted by Vicky Chawda <vi...@praxify.com>.
cTAKES as a REST API in Apache Tika accesses UMLS Database online, How can
we set it up in offline mode?

Regards,

*Vicky Chawda.*
*Software Engineer,*
*Praxify Technologies, Inc.*
Icon Tower, Main Road, Baner, Pune-411045.
[image: https://www.praxify.com/] <https://www.praxify.com/>

On Tue, Jun 28, 2016 at 11:23 AM, Mattmann, Chris A (3980) <
chris.a.mattmann@jpl.nasa.gov> wrote:

> Hi Vicky,
>
> We expose cTAKES as a REST API in Apache Tika, have a look at:
>
> http://wiki.apache.org/tika/cTAKESParser
>
> Best of luck! Feel free to ask questions here and/or on the Apache
> Tika lists.
>
> Cheers,
> Chris
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Chris Mattmann, Ph.D.
> Chief Architect
> Instrument Software and Science Data Systems Section (398)
> NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
> Office: 168-519, Mailstop: 168-527
> Email: chris.a.mattmann@nasa.gov
> WWW:  http://sunset.usc.edu/~mattmann/
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Director, Information Retrieval and Data Science Group (IRDS)
> Adjunct Associate Professor, Computer Science Department
> University of Southern California, Los Angeles, CA 90089 USA
> WWW: http://irds.usc.edu/
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>
>
>
>
>
>
>
>
>
> On 6/27/16, 10:40 PM, "Vicky Chawda" <vi...@praxify.com> wrote:
>
> >Is there any API or REST interface is available for CTakes.?
> >Regards,
> >
> >*Vicky Chawda.*
> >*Software Engineer,*
> >*Praxify Technologies, Inc.*
> >Icon Tower, Main Road, Baner, Pune-411045.
> >[image: https://www.praxify.com/] <https://www.praxify.com/>
>

Re: CTakes APIs

Posted by "Mattmann, Chris A (3980)" <ch...@jpl.nasa.gov>.
Hi Vicky,

We expose cTAKES as a REST API in Apache Tika, have a look at:

http://wiki.apache.org/tika/cTAKESParser

Best of luck! Feel free to ask questions here and/or on the Apache
Tika lists.

Cheers,
Chris

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Chris Mattmann, Ph.D.
Chief Architect
Instrument Software and Science Data Systems Section (398)
NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
Office: 168-519, Mailstop: 168-527
Email: chris.a.mattmann@nasa.gov
WWW:  http://sunset.usc.edu/~mattmann/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Director, Information Retrieval and Data Science Group (IRDS)
Adjunct Associate Professor, Computer Science Department
University of Southern California, Los Angeles, CA 90089 USA
WWW: http://irds.usc.edu/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++










On 6/27/16, 10:40 PM, "Vicky Chawda" <vi...@praxify.com> wrote:

>Is there any API or REST interface is available for CTakes.?
>Regards,
>
>*Vicky Chawda.*
>*Software Engineer,*
>*Praxify Technologies, Inc.*
>Icon Tower, Main Road, Baner, Pune-411045.
>[image: https://www.praxify.com/] <https://www.praxify.com/>