ctakes-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lewis John Mcgibbney <lewis.mcgibb...@gmail.com>
Subject Re: LVG Annotator
Date Thu, 03 Mar 2016 16:49:16 GMT
Hi Brandon,
Which version are you using? Trunk?
This issue presented a problem for me (and a number of others a while ago).
It was 'addressed' in CTAKES-385 [0]. The lingering issue here however
(which needs to be addressed) is that in trunk we now have instances of the
following

+  public static AnalysisEngineDescription createAnnotatorDescription()
throws ResourceInitializationException, MalformedURLException {
+    InputStream lvgStream =
LvgAnnotator.class.getClassLoader().getResourceAsStream("org/apache/ctakes/lvg/data/config/lvg.properties");
+    File lvgFile = new File("/tmp/lvg.properties");
+    try {
+      FileUtils.copyInputStreamToFile(lvgStream, lvgFile);
+    } catch (IOException e) {
+      throw new RuntimeException("Error copying temporary InpuStream
org/apache/ctakes/lvg/data/config/lvg.properties to /tmp/lvg.properties.",
e);
     }

As you can see, the lvg.properties should reside in the jar at path
org/apache/ctakes/lvg/data/config/lvg.properties, this is then copied to
/tmp (not ideal and not portable across OS).

If we can suggest and agree on what the slution should be then I am happy
to provide another patch for this.
Lewis

[0] https://issues.apache.org/jira/browse/CTAKES-385

On Thu, Mar 3, 2016 at 7:47 AM, <user-digest-help@ctakes.apache.org> wrote:

>
> ---------- Forwarded message ----------
> From: "Geise, Brandon D." <bdgeise@geisinger.edu>
> To: "user@ctakes.apache.org" <user@ctakes.apache.org>
> Cc:
> Date: Thu, 3 Mar 2016 15:47:21 +0000
> Subject: LVG Annotator
>
> Hi,
>
>
>
> I’m a little stumped at this point and hoping maybe someone can point me
> in the right direction.  I’ve built a jar using maven and packaged all the
> necessary ctakes libraries.  The issue I’m having is when I go to run the
> jar the LVG Annotator is saying the LVG config file is at
> C:\tmp\lvg.properties.  I did place the resources folder in the classpath
> and have org\apache\ctakes\lvg\data\config\lvg.properties copied there.
>
>
>
> Any suggestions on what I could be missing?
>
>
>
>

Mime
View raw message