Skip to content

msicilia/skos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

SKOS: W3C SKOS for humans

SKOS is a lightweight W3C SKOS client library written in Python.

It has been designed for conveniently retrieving data from SPARQL endpoints the Pythonic way:

>>> from skos import SKOSEndpoint
>>> url = "http://202.45.139.84:10035/catalogs/fao/repositories/agrovoc"
>>> endpoint = SKOSEndpoint(url)
>>> c = endpoint.query_concept("maize")
      >>> print c[0].get_preflabels()[12]
[u'Mais', u'it']
      >>> altlabels = c[0].get_altlabels()
      >>>print altlabels[0:2]
[[u'corn (maize)', u'en'], [u'Ziarno kukurydzy', u'pl']]

Features

  • Search skos:concept(s) based on preferred or alternative labels.
  • Extract all labels from a concept in different languages.
  • Navigational traversal of the concept hierarchy: broader, narrower, related.

Installation

pip install skos  (not available yet)

Dependencies:

Documentation

Documentation is available at Read the Docs (not available yet)

Development

About

A lightweight W3C SKOS client library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages