2

Has anyone seen a library to access Wordnet using some sort of query language? My idea is that there should be a way to write something like:

SELECT hypernyms(word, level)
WHERE word = 'art'

I've already consulted SharpNLP, but is not quite what I want. It's awesome, but not what I'm looking for. Should I use some query language, like SPARQL or some homemade dialect of SQL?

Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353
David Conde
  • 4,631
  • 2
  • 35
  • 48

1 Answers1

9

You can run directly SPARQL queries over the Wordnet database from the following SPARQL the endpoint hosted by Talis at:

There's an RDF version of Wordnet loaded in it. Also see Wordnet 3.0 in RDF. Having an RDF version of the Wordnet data allows you to directly use SPARQL to query it. I have just tested it a bit and you can run something like:

SELECT * WHERE { 
  ?s <http://www.w3.org/2006/03/wn/wn20/schema/hyponymOf> ?o
}
LIMIT 10

This query would get a small sample of hyponyms. If you want to get it from here and learn SPARQL I recommend you as a start the Jena/ARQ SPARQL Tutorial.

Edit

In another question, exploratory SPARQL queries?, you can see how to run Exploratory SPARQL queries to investigate the structure of a dataset behind a SPARQL endpoint.

Community
  • 1
  • 1
Manuel Salvadores
  • 16,287
  • 5
  • 37
  • 56
  • According to [RobV's comment](http://stackoverflow.com/questions/20581934/api-to-access-wordnet-using-sparql-or-php?noredirect=1#comment30794045_20581934), the Talis service has been discontinued. – Joshua Taylor Dec 14 '13 at 15:11