Hi All,
We have wrote a custom annotation to identify the pharma company names,
integrated it with cTAKES and it works fairly well with CVD. But when I tried
integrating the same in my extended web application that uses
https://github.com/healthnlp/examples/tree/master/ctakes-temporal-demo as
base, I face few issues.
1) We have defined certain mandatory parameter for the annotator. The JAVA
code and XML config for passing the parameters is as follows:
public static final String PARAM_JDBC_DRIVER = "JdbcDriver";
public static final String PARAM_JDBC_URL = "JdbcUrl";
public static final String PARAM_JDBC_USER = "JdbcUser";
public static final String PARAM_JDBC_PASS = "JdbcPass";
@ConfigurationParameter(name = PARAM_JDBC_DRIVER, mandatory = false,
description = "JDBC Driver")
private String jdbcDriver;
@ConfigurationParameter(name = PARAM_JDBC_URL, mandatory = false, description =
"JDBC URL")
private String jdbcUrl;
@ConfigurationParameter(name = PARAM_JDBC_USER, mandatory = false, description
= "JDBC User")
private String jdbcUser ;
@ConfigurationParameter(name = PARAM_JDBC_PASS, mandatory = false, description
= "JDBC Pass")
private String jdbcPass;
<configurationParameters>
<configurationParameter>
<name>JdbcDriver</name>
<description>JdbcDriver</description>
<type>String</type>
<multiValued>false</multiValued>
<mandatory>false</mandatory>
</configurationParameter>
<configurationParameter>
<name>JdbcUrl</name>
<description>JdbcUrl</description>
<type>String</type>
<multiValued>false</multiValued>
<mandatory>false</mandatory>
</configurationParameter>
<configurationParameter>
<name>JdbcUser</name>
<description>JdbcUser</description>
<type>String</type>
<multiValued>false</multiValued>
<mandatory>false</mandatory>
</configurationParameter>
<configurationParameter>
<name>JdbcPass</name>
<description>JdbcPass</description>
<type>String</type>
<multiValued>false</multiValued>
<mandatory>false</mandatory>
</configurationParameter>
</configurationParameters>
<configurationParameterSettings>
<nameValuePair>
<name>JdbcDriver</name>
<value>
<string>com.mysql.jdbc.Driver</string>
</value>
</nameValuePair>
<nameValuePair>
<name>JdbcUrl</name>
<value>
<string>jdbc:mysql://127.0.0.1:3306/umls?useUnicode=true&characterEncoding=utf8&useSSL=false</string>
</value>
</nameValuePair>
<nameValuePair>
<name>JdbcUser</name>
<value>
<string>root</string>
</value>
</nameValuePair>
<nameValuePair>
<name>JdbcPass</name>
<value>
<string>admin123</string>
</value>
</nameValuePair>
</configurationParameterSettings>
If I change the mandate attribute from 'false' to 'true', while trying to use
this annotator, I get an error stating that the mandatory parameter is not
passed. I'm not sure what other configuration is required to make this work and
pass mandatory values. Any help on this?
2) Currently in the 'initialize' method of the annotator, I'm loading few
metadata resources using the following code,
InputStream inputStream = annotCtx.getResourceAsStream(fileName);
But when this line is executed, it gives a following warning message in the
console,
"13-Oct-2017 15:54:50.141 WARNING [localhost-startStop-1]
org.apache.uima.impl.ChildUimaContext_impl.getResourceAsStream The unmanaged
resource ORG.txt was accessed.This feature is deprecated, and support may be
removed in future versions."
Could someone throw some light on how to resolve this warning and loaded the
resource in a best way?
Regards,
Gandhi
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed. If
you are not the named addressee you should not disseminate, distribute or copy
this e-mail. Please notify the sender or system manager by email immediately if
you have received this e-mail by mistake and delete this e-mail from your
system. If you are not the intended recipient you are notified that disclosing,
copying, distributing or taking any action in reliance on the contents of this
information is strictly prohibited and against the law.