Coder Social home page Coder Social logo

linkeddata-trivia's Introduction

linkeddata-trivia

What is this?

Originally I got inspired by this recent post on HackerNews, where alex_g has built a quiz, which automatically generates questions from Wikipedia articles using natural language processing (NLP). However, I found the results not that satisfying, yet, and decides to build my own dynamic quiz. Instead of NLP processing I decided to use Linked Data as a base for generating questions. More precisely I'm using the DBPedia knowledge base to retreive fact information from, which mostly originates in Wikipedia articles as well. The data is structured as an RDF graph and can be queried using SPARQL. Despite from the official DBPedia SPARQL endpoint this little proof-of-concept-like app uses another webservice, kit-lod16-knowledge-panel, which I developed in the context of the Linked Open Data seminar at university. It is responsible for ranking RDF properties for specific RDF entities by relevance in order to decide, which one to display to an end-user (or include to a quiz).

Demo

Available HERE (may be down or unstable).

Limitations

This project is not a production-ready app at all, but rather a proof-of-concept to experiment with. Currently, the major issue is performance. Since the app fires a bunch of rather expensive, non-optimized SPARQL queries at the public DBPedia endpoint, the whole process of generating a quiz question takes several seconds on average, sometimes even up to a minute. This could be optimized to a certain extent (e.g. currently there are at least 8 separate HTTP requests from this app plus a few more from the ranking webservice), but all in all querying RDF data is still pretty slow.

Another limitation is the way "wrong" answer options are generated. Currently, random values within a certain interval around the "correct" answer are generated for dates and numbers. For properties, whose rdfs:range are entities of a class, a random set of other entities from the same class is fetched from DBPedia and shown as alternative answers. However, string-valued answers, among others, are ignored completely, because it's hard to auto-generate an alternative value for a plain string. There's room for enhancement here.

A third way for improvement would be to include not only DBPedia, but also Yago, Wikidata and other sources.

Usage

  1. Download, set up and run the kit-lod16-knowledge-panel server (backend-core)
  2. git clone https://github.com/n1try/linkeddata-trivia
  3. Change RANKING_ENDPOINT constant in generator.js to use local ranking service (by default at http://localhost:8080/api/ranking)
  4. npm install
  5. node index.js
  6. Go to http://localhost:3000

License

MIT @ Ferdinand Mütsch

linkeddata-trivia's People

Contributors

muety avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

brili

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.