> Before you do that, try putting the following code
in your annotator:

    String filename = "EnglishSD.bin.gz";
    InputStream is = UIMAFramework.class.getResourceAsStream(filename);
    if (is == null) {
      System.out.println("Could not open file " + filename);
    } else {
      System.out.println("Successfully opened file " + filename);
    }

I don't know what code exactly UIMA uses to load that
resource, but if this works, loading the model as a
resource should work as well.  If on the other hand
this doesn't work, I'm not surprised that the model
can't be loaded as a resource.

This classpath issue still bugs me. Would it be possible to introduce a way to set the classloader manually (and globally)? For example XStream has such a feature (xstream.setClassLoader()). That way those problems with XStream were completely solved when using it inside an Eclipse plugin. But the thing that even bugs me more is that this happens at all. Cause of "Eclipse-RegisterBuddy: org.apache.uima" in the MANIFEST, UIMA should see the same classpath as the plugin itself. And even stranger is that all descriptors are found, but not the defined resources. So it seems that UIMA looks in different ways for descriptors and resources.
Hm, as I said ... it really bugs me ;-)

Regards,
Kai

Reply via email to