New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert NTriples data into usable JSON-LD #2

Closed
fsteeg opened this Issue Sep 24, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@fsteeg
Contributor

fsteeg commented Sep 24, 2018

For source data see:

hbz/lobid-resources#851
hbz/lobid-resources#919
https://github.com/hbz/lobid-resources/blob/master/src/test/resources/loc_bib_works_test.nt

For implementation see:

https://github.com/hbz/lobid-gnd/blob/master/app/apps/Convert.java#L111

Thoughts:

  • Start with playground
  • Start without context, without frame, most simple conversion to JSON-LD
  • Attempt usage (maybe with jq?), experience problem
  • Improve with context, frame

@fsteeg fsteeg added the ready label Sep 24, 2018

@fsteeg fsteeg self-assigned this Sep 24, 2018

@fsteeg fsteeg added working and removed ready labels Sep 25, 2018

fsteeg added a commit that referenced this issue Sep 25, 2018

Basic conversion of N-Triples to JSON-LD
Using LOC test data, no context and frame, with jsonld.js via npm

See #2

acka47 added a commit that referenced this issue Sep 26, 2018

@acka47

This comment has been minimized.

Contributor

acka47 commented Sep 26, 2018

I generated the first version of a JSON-LD context. The result was added with 9ed7808.

  1. Get the Bibframe vocabulary as Turtle: $ rapper -i rdfxml -o turtle http://id.loc.gov/ontologies/bibframe.rdf > bibframe20_20180926.ttl
  2. Convert to JSON-LD context with @niklasl's python script from 2012 (I could not find a better option by now): $ python rdf_vocab_to_jsonld_context.py bibframe20_20180926.ttl bibframe > bibframe-context.jsonld
  3. Some manual clean ups (using absolute URIs instead of bf prefix etc.)

fsteeg added a commit that referenced this issue Sep 26, 2018

Use context and frame in JSON-LD conversion
Using local context in node code (`npm start`) and remote context
on GitHub in the HTML file (open data/index.html in a browser).

See #2
@fsteeg

This comment has been minimized.

Contributor

fsteeg commented Sep 26, 2018

Pushed using the context and a simple frame. Open data/index.html in a browser for a quick look. See also the README for running the node code (which uses the local context file if you want test local changes). Some things are missing in the context, so far I noticed http://id.loc.gov/ontologies/bflc, http://id.loc.gov/vocabulary/relators, and http://www.w3.org/2000/01/rdf-schema.

fsteeg added a commit that referenced this issue Sep 27, 2018

Add final postprocessing, write to files, use data
Remove `@graph`, add context URL, access fields as attributes

See #2

fsteeg added a commit that referenced this issue Sep 27, 2018

@dr0i dr0i changed the title from Convert RDF data into usable JSON-LD to Convert NTriples data into usable JSON-LD Sep 28, 2018

fsteeg added a commit that referenced this issue Sep 28, 2018

Introductory slides on APIs and JSON
Why use APIs, GitHub API as a sample, use with cURL and jq

See #2

fsteeg added a commit that referenced this issue Oct 1, 2018

Tweak context, output, usage
Pass compacting options explicitly

See #2

@fsteeg fsteeg added review and removed working labels Oct 2, 2018

@fsteeg fsteeg assigned acka47 and unassigned fsteeg Oct 2, 2018

@acka47 acka47 closed this in #9 Oct 2, 2018

@acka47 acka47 removed the review label Oct 2, 2018

acka47 added a commit that referenced this issue Oct 4, 2018

fsteeg added a commit that referenced this issue Oct 22, 2018

Use remote context in index documents, serve with node
Add output as N-Quads, remote context, and other details to slides

See:

#2
#3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment