All Projects → rdfio → rdf2smw

rdfio / rdf2smw

Licence: MIT license
Convert RDF to Semantic MediaWiki facts in MediaWiki XML format, with a standalone commandline tool

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to rdf2smw

SemanticResultFormats
Provides additional visualizations (result formats) for Semantic MediaWiki
Stars: ✭ 40 (+122.22%)
Mutual labels:  mediawiki, semantic-mediawiki, smw
SemanticCite
Allows to manage citation resources using semantic annotations
Stars: ✭ 22 (+22.22%)
Mutual labels:  mediawiki, semantic-mediawiki, smw
SemanticBreadcrumbLinks
Provides in-page navigation by building breadcrumb links from an attributive property filter.
Stars: ✭ 15 (-16.67%)
Mutual labels:  mediawiki, semantic-mediawiki, smw
SemanticExtraSpecialProperties
Provides extra special properties to Semantic MediaWiki.
Stars: ✭ 24 (+33.33%)
Mutual labels:  mediawiki, semantic-mediawiki, smw
SemanticWikibase
Makes Wikibase data available in Semantic MediaWiki
Stars: ✭ 14 (-22.22%)
Mutual labels:  mediawiki, semantic-mediawiki, smw
SEPA
Get notifications about changes in your SPARQL endpoint.
Stars: ✭ 21 (+16.67%)
Mutual labels:  rdf, rdf-triples
basex-rdf
RDF parsing for BaseX
Stars: ✭ 16 (-11.11%)
Mutual labels:  rdf, rdf-data
tentris
Tentris is a tensor-based RDF triple store with SPARQL support.
Stars: ✭ 34 (+88.89%)
Mutual labels:  rdf, rdf-data
Semanticmediawiki
🔗 Semantic MediaWiki turns MediaWiki into a knowledge management platform with query and export capabilities
Stars: ✭ 359 (+1894.44%)
Mutual labels:  rdf, mediawiki
trio
Datatype agnostic triple store & query engine API
Stars: ✭ 78 (+333.33%)
Mutual labels:  rdf
semver-cli
semver-cli is a simple command line tool to compare and manipulate version strings.
Stars: ✭ 28 (+55.56%)
Mutual labels:  commandline
pyfuseki
A library that uses Python to connect and manipulate Jena Fuseki, which provides sync and async methods.
Stars: ✭ 22 (+22.22%)
Mutual labels:  rdf
pycsvw
A tool to read CSV files with CSVW metadata and transform them into other formats.
Stars: ✭ 32 (+77.78%)
Mutual labels:  rdf
matomo-mediawiki-extension
www.mediawiki.org/wiki/Extension:Piwik_Integration
Stars: ✭ 18 (+0%)
Mutual labels:  mediawiki
gatsby-theme-terminal
A Gatsby theme for techies who love terminal / command line / bash like portfolio.
Stars: ✭ 20 (+11.11%)
Mutual labels:  commandline
discord-wiki-bot
Wiki-Bot is a bot with the purpose to easily search for and link to wiki pages. Wiki-Bot shows short descriptions and additional info about the pages and is able to resolve redirects and follow interwiki links.
Stars: ✭ 69 (+283.33%)
Mutual labels:  mediawiki
Kunst
Download and display album art or display embedded album art
Stars: ✭ 242 (+1244.44%)
Mutual labels:  commandline
wikibot
Some MediaWiki bot examples including wikipedia, wikidata using MediaWiki module of CeJS library. 採用 CeJS MediaWiki 自動化作業用程式庫來製作 MediaWiki (維基百科/維基數據) 機器人的範例。
Stars: ✭ 26 (+44.44%)
Mutual labels:  mediawiki
googletranslate
Python Google Translate (using reverse-engineered public API, so free)
Stars: ✭ 67 (+272.22%)
Mutual labels:  commandline
ControlledVocabularyManager
Rails application with Blazegraph for managing controlled vocabularies in RDF.
Stars: ✭ 20 (+11.11%)
Mutual labels:  rdf

rdf2smw

CircleCI Test Coverage Go Report Card Status Code Climate Rating Code Climate Issues GoDoc

Updates

Sep 4, 2017: Our paper on RDFIO and rdf2smw was just published! If you use rdf2smw in scientific work, please cite:
Lampa S, Willighagen E, Kohonen P, King A, Vrandečić D, Grafström R, Spjuth O
RDFIO: extending Semantic MediaWiki for interoperable biomedical data management
Journal of Biomedical Semantics. 8:35 (2017). DOI: 10.1186/s13326-017-0136-y.

Sep 30, 2016: rdf2smw was covered in a talk at SMWCon in Frankfurt, Sep 2016. See: Talk page, Slides, Video.

Import / convert RDF data into a Semantic MediaWiki

A commandline tool to convert from RDF triples to Semantic MediaWiki facts in MediaWiki XML export format to be used with MediaWiki's built-in XML import feature.

This allows you to quickly and simply populate a Semantic MediaWiki page structure, from an RDF data file.

It is written in Go for better performance than PHP. The latest version processes triples into pages in the order of ~55K triples/sec converted into ~13K pages/sec on an 2014 i5 Haswell dual core processor, to give an idea.

rdf2smw is very similar to the RDF import function in the RDFIO Semantic MediaWiki extension, but takes another approach: Whereas RDFIO converts RDF to wiki pages and imports them in the same go, rdf2smw first converts RDF to an XML file outside of PHP (for better performance), and then importing using MediaWiki's built-in import function.

Status: The tool is pretty much feature complete, including ability to write facts via template calls if a categorization (via owl:Class or rdf:type) of the subject can be done. What is lacking is more options to fine-tune things. Right now you'll have to modify the source code yourself if you need any customization. Hope to address this in the near future.

Dependencies

The tool itself does not have any dependencies, apart from a unix-like operating system. For importing the generated XML dump file to make sense though, you will need a web server, PHP, MediaWiki and Semantic MediaWiki.

An automated virtualbox generation script (so valled "vagrant box"), with all of this, plus the RDFIO extension, can be found here, and is highly recommended, if you don't have a MediaWiki / SemanticMediawiki installation already!

Installation

For linux 64 bit:

  1. Download the file rdf2smw_linux64.gz, on the latest release.
  2. Unpack it with: gunzip rdf2smw_linux64.gz
  3. Call it, on the commandline (see the usage section below).

Usage

Call the rdf2smw binary, specifying a file with triples in n-triples or turtle format, with the --in flag, and an output file in XML format with the --out flag, like so:

./rdf2smw --in triples.nt --out semantic_mediawiki_pages.xml

In addition to the specified output file, there will be separate files for templates and properties, named similar to the main output file, but replacing .xml with _templates.xml and _properties.xml respectively.

These XML files can then be imported into MediaWiki / Semantic MediaWiki, via the importDump.php maintenance script, located in the maintenance folder under the main mediawiki folder.

php <wikidir>/maintenance/importDump.php semantic_mediawiki_pages_templates.xml
php <wikidir>/maintenance/importDump.php semantic_mediawiki_pages_properties.xml
php <wikidir>/maintenance/importDump.php semantic_mediawiki_pages.xml

Note that the order above is highly recommended (templates, then properties, then the rest), so as to avoid unnecessary re-computing of semantic data after the import is done.

Architecture

Find below a schematic illustration of the flow-based programming process graph of the rdf2smw program:

Flow-based programming diagram of rdf2smw

Illustration created with drawfbp

Known limitations

Only N-triples is supported as input format right now. We plan to add more formats shortly.

Technical notes

rdf2smw is based on the FlowBase flow-based programming micro-framework.

Acknowledgements

rdf2smw makes heavy use of Petter Goksøyr Åsen's awesome RDF parsing library.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].