Version 0.54
As the publisher of the STW Thesaurus for Economics, the ZBW - Leibniz Information Centre for
Economics provides experimental economics
terminology and authority web services (econ-ws, formerly stw-ws) for use by
humans and by machines. The services primarily aim to support resource lookup
and query expansion in the context of information retrieval applications.
Parts of the delivered data originate from datasets which were created by third
parties and shared through open licenses (see information below).
The services follow the REST design principles.
All services uniformly support the HTTP GET method.
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 use in Javascript applications see example.)
Example:
http://zbw.eu/beta/econ-ws/suggest?query=acc
http://zbw.eu/beta/econ-ws/suggest?dataset=jel&query=e2
Parameters: query, dataset, lang, limit (NYI), callback
Result: term, prefLabel, concept, notation (for classifications)
Returns for a query string every matching entry (by label, right truncated) with the preferred name (in larger datasets usually non-unique), a constructed (mostly unique) preferred label in the selected language, and the URI, ordered by descending count of hits in some backend database (as a very vague measure of relevance). Result is currently limited to 10 entries and sparql-json output format. (For use in Javascript applications see example.)
Example:
http://zbw.eu/beta/econ-ws/suggest2?dataset=econ_pers&query=ke
Parameters: query, dataset (currently only econ_pers), lang, limit (NYI), callback
Result: prefName, prefLabel, concept
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).
(Effectively a combination of /concepts and /labels.)
With parameter vocabs=ALL, pref- and altLabels from all matching concepts of other vocabularies (via skos:exactMatch) are included for lookup and returned terms.
Example:
http://zbw.eu/beta/econ-ws/synonyms?query=investment+policy
http://zbw.eu/beta/econ-ws/synonyms?query=investment+policy&vocabs=ALL
Result: synonym
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 matched concepts
4. prefLabels for all concepts
5. alt/hiddenLabels for all concepts
Can be restricted to only one relationship
Result is currently limited to sparql-json output format. ?score doesn't work yet.
Example: http://zbw.eu/beta/econ-ws/combined1?query=free+trade+zone
Parameters: query, relationship, vocabs (currently stw or ALL implemented), callback
Result: match, score, concept, prefLabel, altLabel, hiddenLabel, narrower, related
Returns all or selected mappings for a concept (or a comma-seperated list of concepts), with its preferred labels.
Example:
http://zbw.eu/beta/econ-ws/mappings?concept=http://zbw.eu/stw/descriptor/19218-6
http://zbw.eu/beta/econ-ws/mappings?concept=http://zbw.eu/stw/descriptor/19218-6&lang=de
http://zbw.eu/beta/econ-ws/mappings?concept=http://d-nb.info/gnd/4291458-9&lang=de
Parameters: concept, lang, vocabs (NYI, defaults to ALL)
Result: concept, prefLabel, relation, targetPrefLabel, targetConcept, target
These are not strictly terminology services, but maybe useful in the context of STW and other terminologies.
Currently returns a comma-separated list of STW descriptor URIs for a supplied ISBN number, an identifier (currently the according GVK PPN and an informative label (to uncover typos in the isbn), in sparql-json output format. For use in Javascript applications see example. (Highly experimental)
Example:
http://zbw.eu/beta/econ-ws/assigned_descriptors?isbn=978-3-8349-1754-6
Parameters: isbn (10 or 13, required), gvkppn (NYI)
The following services had been designed in 2009 in approach to offer programmatic acces to STW. They have seen few practical use, and they can be easily substituted by either the /suggest service (in case of /concepts), or by access to the RDF/RDFa representation of the concept. So they may be dropped in future versions.
Returns all concepts (by default of subtype zbwext:Descriptor only), where the search term matches prefLabel or altLabel.
Example: http://zbw.eu/beta/econ-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/econ-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/econ-ws/labels?concept=http://zbw.eu/stw/descriptor/19160-4
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.