Git Product home page Git Product logo

genealogical-trees's Introduction

Semantic Web Genealogical Trees

DOI

Rationale

This is an example of logical reasoning applied to the graphs of genealogical trees. Defining the kinship types on top of genealogical trees seems to be the perfect use case for semantic technologies.

The source of data is the GEDCOM file format (.ged) common for exchange of genealogical information. With the aid of RDFLib and gedcom Python libraries GEDCOM files are converted into the OWL 2 ontologies (ABox) in Turtle syntax (.ttl file extension), adopting the TBox of the Family History Knowledge Base (FHKB, see data/header.ttl file). Note that the FHKB ontology is although very small but uses unusually complex role hierarchy and is rather hard for modern reasoners. After reasoning with the naive Python implementation of the OWL 2 RL Profile and inferring all possible triples the ontologies are finally converted to the JSON-formatted graphs for in-browser visualization. This is done inside the bundled index.html HTML5 web-app by means of D3.js JavaScript library.

Using this repository

The above is summarized in the gedcom2json.sh script, which is used like this:

./gedcom2json.sh path/to/your/gedcom.ged path/to/entailed_graph.json

Resulting file entailed_graph.json is to be uploaded and visualized in the bundled HTML5 web-app index.html (no server scripting is used). Its copy is currently hosted at GitHub: http://blokhin.github.io/genealogical-trees. Locally it should be served from a web-server (e.g. python -m SimpleHTTPServer or php -S localhost:8000).

Before processing, the required Python libraries listed in requirements.txt should be installed (virtualenv is highly recommended).

Blog tutorial

https://blog.tilde.pro/semantic-web-technologies-on-an-example-of-family-trees-7518f3f835a9

Remark on FHKB

Note however the following comment from FHKB authors:

We probably do not wish to drive a genealogical application using an FHKB in this form. Its purpose is educational. It touches most of OWL 2 and shows a lot of what it can do, but also a considerable amount of what it cannot do. As inference is maximised, the FHKB breaks most of the OWL 2 reasoners at the time of writing. However, it serves its role to teach about OWL 2. OWL 2 on its own and using it in this style, really does not work for family history.

Remark on reasoning

Reasoning with the naive Python implementation of the OWL 2 RL Profile is very slow and takes hours for relatively big family trees. Therefore use of the fast native reasoner (like Fact++) is very desirable. Wrapped in the owl-cpp Python bindings, Fact++ performs up to two orders of magnitude faster.

genealogical-trees's People

Contributors

blokhin avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

genealogical-trees's Issues

uncles and aunts not always colored

Great demonstration, so nice!

I have been playing with the example tree

If I understand the coloured legend, when you hover a person, this should happen to his/her close relatives:

  • brothers, sisters and cousins should change their color to red (#f00)
  • uncles and aunts should change their color to violet (#90c)
  • grandparents should change their color to blue (#06f)

When I hover Ekaterina Ivanovna Romanova, this happens:

  • RED: sister (Anna Ivanovna Romanova) and cousins (Elizaveta Petrovna Romanova plus her 2 brother & sister)
  • BLUE: grandparent (Aleksej Mihajlovich Romanov)
  • VIOLET: uncles/aunts, but only 2 of them: Fedor Alekseevich Romanov & Sofja Aleksevna Romanova. For some reason, their brother Petr I Alekseevich Romanov does not change its colour!

Now I try with her cousin. When I hover Elizaveta Petrovna Romanova, this happens:

  • RED: correct as above (her 2 brother & sister, plus her 2 cousins)
  • BLUE: same grandparent as above
  • VIOLET: nobody!! Although she has 3 uncles/aunts in the tree (same 2 as above, plus Ivan V Alekseevich Romanov, father of her cousin Ekaterina Ivanovna Romanova)

So VIOLET is not always being applied.

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.