Sem4Tags Web Service

Sem4Tags is available for non commercial use as a RESTful web service. Please take into account that this is a demo web service, and therefore we don´t have an authentication service. As some others available web services we expect an average of one query per second per user. The web service exposes two methods.

Note We have detected that with the current machine capabilities the service is able to process simoultanously at most 40 tags. .

Disambiguate

The first one is a disambiguate method that is able to select the most probable dbpedia resource for a tag in a given context:

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/disambiguate

This method has the following arguments (default values in bold):
- tag (Mandatory): Comma separated string of tags to process
- contextstr(Optional): Comma separated string of words/tags that define the context
- lang(Optional): Use en for English, es for Spanish, or both for both languages.
- activeContext(Optional): Use true or false if you want to use the active context.

The output is an XML file with an ordered list of posible DBpedia resources for each one of the input tags.

For instance, if we want to disambiguate the retiroPark tag in the context defined by Madrid, Spain we can use the following call:

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/disambiguate?tag=retiroPark&lang=en&contextstr=madrid,spain

Note: The multilingual sense repository is incrementally populated. Each time a tag is processed first we look for information in our sense repository, if we do not find information for that tag we extract the information from Wikipedia and DBpedia. This extraction process can take some time. When the information is already in the sense repository the disambiguate method is faster.

Populate Multilingual Sense Repository

To avoid unnecesary delays in the disambiguate method due to the incremental load of the sense repository, we provide a load method.

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/load

This method has the following arguments (default values in bold):
- tag (Mandatory): Tag to process
- lang(Optional): Use en for English, es for Spanish, or both for both languages.

The output is an XML file stating if the process was sucessful or not.

For instance, if we want to load information in the sense repository about the madrid tag in English we can use the following call:

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/load?tag=madrid&lang=en

More examples of use in Spanish

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/disambiguate?tag=Estación&lang=es&contextstr=tren,%20transporte

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/disambiguate?tag=Estaci%C3%B3n&lang=es&contextstr=bus,%20transporte

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/disambiguate?tag=Estaci%C3%B3n&lang=es&contextstr=espacio

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/disambiguate?tag=Estaci%C3%B3n&lang=es&contextstr=temperatura

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/disambiguate?tag=Estaci%C3%B3n&lang=es&contextstr=esqu%C3%AD

 

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/disambiguate?tag=Bolsa&lang=es

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/disambiguate?tag=bolsa&lang=es&contextstr=acciones,mercado

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/disambiguate?tag=bolsa&lang=es&contextstr=coche,%20seguridad

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/disambiguate?tag=bolsa&lang=es&contextstr=tienda,%20compra

 

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/disambiguate?tag=blackberry&lang=es

 

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/disambiguate?tag=Apple

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/disambiguate?tag=Apple&lang=es&contextstr=macintosh

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/disambiguate?tag=Apple&lang=es&contextstr=Beatles

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/disambiguate?tag=Apple&lang=es&contextstr=Fiona

 

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/disambiguate?tag=golf&lang=es

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/disambiguate?tag=golf&lang=es&contextstr=autom%C3%B3vil,%20volkswagen

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/disambiguate?tag=golf&lang=es&contextstr=Salsa

 

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/disambiguate?tag=Madrid&lang=es

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/disambiguate?tag=Madrid&lang=es&contextstr=F%C3%BAtbol,%20Liga

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/disambiguate?tag=Madrid&lang=es&contextstr=F%C3%BAtbol,%20Liga,%20Atletico

 

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/disambiguate?tag=Metro&lang=es

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/disambiguate?tag=Metro&lang=es&contextstr=Transporte

 

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/disambiguate?tag=Retiro&lang=es

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/disambiguate?tag=Retiro&lang=es&contextstr=metro

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/disambiguate?tag=Retiro&lang=es&contextstr=distrito

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/disambiguate?tag=Retiro&lang=es&contextstr=Argentina

 

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/disambiguate?tag=Plaza%20Mayor&lang=es

 

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/disambiguate?tag=Bici&lang=es

 

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/disambiguate?tag=Salsa&lang=es&contextstr=baile,%20musica

http://grafias.dia.fi.upm.es/SemanticTagWebServiceRestFul/resources/tag/disambiguate?tag=Salsa&lang=es&contextstr=aderezo