Version 0.29
As the publisher of the STW Thesaurus for Economics, the German National Library of Economics (ZBW) provides experimental thesaurus web services for use by humans and by machines. In the first instance these services are designed to support query expansion in the context of information retrieval applications.
The services follow the REST design principles.
All services uniformly support the HTTP GET method.
Returns all concepts (by default of subtype zbwext:Descriptor only), where the search term matches prefLabel or altLabel.
Example: http://zbw.eu/beta/stw-ws/concepts?query=audit
Parameters: query, lang, concept_type (NYI)
Returns the narrower concepts of the given concept (by default descriptors only), supplemented with the preferred label in English (default) or German.
Example: http://zbw.eu/beta/stw-ws/narrower?concept=http://zbw.eu/stw/descriptor/12882-1
Parameters: concept, lang, concept_type (NYI)
Returns prefLabel and altLabels of a given concept.
Example: http://zbw.eu/beta/stw-ws/labels?concept=http://zbw.eu/stw/descriptor/19160-4
These services combine basic services to offer convenient access to often used functions. (Sometimes less flexible, because fixed defaults may be used.)
Returns the alternative search terms, by
1. searching the given term within the preferred and alternate labels of all descriptors,
2. returning all preferred and alternate labels of these descriptors
(not restricted to a certain language).
(Combination of /concepts and /labels.)
Example: http://zbw.eu/beta/stw-ws/synonyms?query=environmental+audit
Parameters: query
Returns for a query string every matching term (alt or prefered labels, right truncated), the prefered label in the selected language and the URI, ordered by term. Result is currently limited to 10 entries and sparql-json output format. (For an example for use in a Javascript application see the autosuggest incremental search service on the STW web site.)
Example:
http://zbw.eu/beta/stw-ws/suggest?query=acc
http://zbw.eu/beta/stw-ws/suggest?dataset=jel&query=acc
Parameters: query, dataset, lang, limit (NYI), callback
Returns for a query string
1. concepts with matching labels (matching is done via a lucene 'or' query
against every single label). Results are returned in order of descending scores.
Number of results is limited to number of words or less.
2. narrower concepts of the matched concepts
3. related concepts of the matches concepts
4. pref_labels for all concepts
5. alt_labels for all concepts
Result is currently limited to sparql-json output format. ?score doesn't work yet.
Example: http://zbw.eu/beta/stw-ws/combined1?query=free+trade+zone
Equivalent to "Content-Type" HTTP Request Parameter (NYI). When definded, "output=" takes precedence.
deprecated - please use output
URI of the Concept
Search String, URI-escaped if necessary. Presently, exact (though case-insensitive) matches are performed.
maximal number of results
Name of a (Javascript) callback routine to wrap the result (only for JSON output format).
Currently works only with "/suggest" and "/combined1".
Error handling is still quite rudimental. In case of a client side error, HTTP response code 400 ("Bad Request") and a short message are returned.
The beta version is implemented using Joseki SPARQL server (from the Jena toolkit) and a simple PHP wrapper. A SPARQL Endpoint (http://zbw.eu/beta/sparql) is available also. It is powerd by sparqlite and based on Jena and LARQ. This one is used for the /combined1 service.
Comments, queries and suggestions are greatly appreciated.