|
From: Jack P. <jac...@gm...> - 2008-12-05 23:31:58
|
Hi Sebastian,
Thanks for that reply.
I was building JOnto outside of eclipse. I suppose I should move it
inside. I've got it compiling everywhere except that it dies building
WordNetServlet. Compiling dies down in doProcess() particularly in the
area where it is trying to generate
SortedSet<KOSEntryResult> searchResults
The entire block of uncommented code there calls for
com.kh.jonto.openthesaurus.pl.OTContext which, AFIK, does not exit
anywhere in the classpath--OpenThesaurus.
So, i've been experimenting with the code given at the wiki:
List<KOSEntry> results = new ArrayList<KOSEntry>();
for(ThesaurusContext context : Thesauri.getInstance().getContexts())
results.addAll(ThesaurusStorage.getInstance().search(context, word));
Which does not work at all. ThesaurusStorage.search() (really
KOSStorage.search() does not have that signature or return value. The
closest signature I can find is:
Map<KOSEntry, Float> search(KOSContext _context, String content, Float
threshold): the threshold is already calculated, so my new code looks
like this:
<a hack>
SortedSet<KOSEntry> results = new TreeSet<KOSEntry>();
Map<KOSEntry,Float> x = new HashMap<KOSEntry,Float>();
for(ThesaurusContext context : Thesauri.getInstance().getContexts())
x.putAll(ThesaurusStorage.getInstance().search(context, word, fthreshold ));
results.addAll(x.keySet());
request.setAttribute("synsets", results);
Having done all that, I now get a build and installToWebapps. Now to
drop it into Jetty and see what happens. The wiki says this:
you need to have Sesame 2.0 repository set up somewhere and connect to
it through the configuration parameters
Which leaves me with another learning curve.
Comments welcome.
Thanks
Jack
|