Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wordnet access using queries [closed]

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?

like image 949
David Conde Avatar asked Jul 19 '26 16:07

David Conde


1 Answers

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

  • http://api.talis.com/stores/wordnet/services/sparql (now discontinued)

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.

like image 153
Manuel Salvadores Avatar answered Jul 22 '26 07:07

Manuel Salvadores