|
From: Sebastian K. <seb...@gm...> - 2008-12-06 00:01:16
|
What you want to use is WordNetContext.getContext(), instead of
com.kh.jonto.openthesaurus.pl.OTContext.getContext()
With Sesame 2.0 - yeah - we have upgraded to RDF2GO and Sesame2 - but
Jena should work as well (though not tested yet).
S.
On Fri, Dec 5, 2008 at 11:31 PM, Jack Park <jac...@gm...> wrote:
> 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
>
> ------------------------------------------------------------------------------
> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
> The future of the web can't happen without you. Join us at MIX09 to help
> pave the way to the Next Web now. Learn more and register at
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
> _______________________________________________
> Jonto-users mailing list
> Jon...@li...
> https://lists.sourceforge.net/lists/listinfo/jonto-users
>
--
--
--------------------------------------------
-- Sebastian Ryszard Kruk
-- Lead Researcher, Project Manager
-- Digital Enterprise Research Institute
-- National University of Ireland, Galway
-- mailto: seb...@gm...
-- GG: 335067, Jabber: seb...@gm...
-- Skype: sebastiankruk
-- WWW: http://www.sebastiankruk.com/
-- mobile (IRL): +353 85 7126591
-- VoIP (PL): +48 52 5110114
--------------------------------------------
|