Thing Creation Service (aka Rebirth-Machine)
- Javadoc: RebirthMachine
- Interface: source:trunk/gnowsis-server/src/java/org/gnowsis/pimo/RebirthMachine.java
- non-functions stub impl: source:trunk/gnowsis-server/src/java/org/gnowsis/pimo/impl/RebirthMachineImpl.java
automatic creation of things from resources (rebirth-machine). Generating persons, projects, topics out of the data collected from adapters
There are basic implementations of how we would create things in this diploma thesis by Man Luo (dfki access only):
Example: Rebirth of a document
The document "ProjectFlyer.pdf" from Paul's filesystem has more properties beyond normal tagging. So Paul decides to make a pimo-document out of it. The projectFlyer.pdf should be already on the harddrive and indexed by the gnowsis/aperture indexer to the ResourceStorage,
ProjectFlyer.pdf auto-indexed: <file:/c:/paul/RomeProjectFlyer.pdf> a data:Document; rdfs:label "Rome Project Flyer".
First, the flyer is instantiated as instance in the PIMO, of Class "ProjectFlyer". Let us assume the class already exists. The following calls result in this data. The PimoService and the DataAccess are used to achieve this.
String uri = pimoservice.createThing("Rome Project Flyer", "gnowsis://email@example.com/resources/pimo/ProjectFlyer"); // add grounding to thing dataaccessapi.addTriple(uri, pimo:groundingOccurrence, "file:/c:/paul/RomeProjectFlyer.pdf", false);
result data in PimoStorage
<gnowsis://firstname.lastname@example.org/resources/pimo/RomeProjectFlyer> a <gnowsis://email@example.com/resources/pimo/ProjectFlyer>; rdfs:label "Rome Project Flyer"; pimo:groundingOccurrence <file:/c:/paul/RomeProjectFlyer.pdf>.
Synchronising by tagging systems and Aperture
Users that have flickr.com or technorati accounts have their mental concepts already entered as tags. Each tag is, per default, a candidate to be an instance of type "topic". Ususally, Tags are topics anyway. Also, the user can manually add tags to any resource on the semantic desktop. These tags should also be included in the mywikitology.
see ApertureDatasources for a list of datasources that create tags and may be used.
Approach to create PIMO-things from PIMO-Resources:
- log all add/remove/change events from aperture. example: User added e-mail E
- e-mail E was added, look what possible things can be created from E
- possible things are: three persons: Paul, Peter and Monika. They are to, from and cc of the mail
- look if foaf:Person instances to the possible things are already in PIMO. look by e-mail address.
- Peter and Paul were already in pim, do not create them again but add the e-mail as 'occurrence' to them
- Monika is new, create a pimo:Person for her, attach the paul:Monika person to the e-mail via pimo:creationSupportedBy
- done: the e-mail was checked, Peter and Paul have new occurrences, Monika is created.
The following is needed to do this:
- a set of SERQL queries (or something) that look at a resource and create possible things. This will also do ontology transformation, the Aperture-data ontology will be converted to pimo. You can invent domain ontologies for that, for example pimo:foaf for our foaf-related information.
- a checker to see if possible things are in user's pimo already (=smushing, searching doublettes)
- a way to add the possible things to the pimo using the Pimo-Service.
One of the requirements from gnowsis states to create active folders, or active things. To allow this, we will describe our implementation sometime in the future. The extension of the PIMO to represent these active folders will be part of the upcoming PIMO-api ontology. Look out for it in the next months. Contact the developers of gnowsis at some time.
This is implemented already in two rebirthing-plugins, but has to be made user-friendly.
Synchronising Folders To Topics / instances. Folders in the file-system can be linked to subjects from the mental model.
- a class is linked to a folder - the sub-folders or files in the folder are instances of the class. Example: the class "Project" is linked to folder "home/john/projects/". All folders on the hard-disk are assumed to be projects.
- an instance is linked to a folder - the sub-folders and sub-files are documents that are describing the instance (pim:hasSubject).
For each case, an editor has to be written in the WikitologyGui and the editor, enabling the user to associate concepts to folders.
The WikitologyService has to watch for changes in these folders (notified by Aperture on recrawling the folders) and move them to the mental models.
The synchronisation can be configured to be in suggested classes/instances mode, where the new things are only candiates, or in confirmed mode.
- synchronisation creates suggestions - the created classes / instances MAY be useful to the user, but don't have to be and should not be visualized at all times
- synchronisation creates classes / instances - the items in the linked folder will always represent something.
Implementation in Gnowsis
The machine has a plugin architecture (hurrah for abstraction), so it should be possible to extend it with more functionality later. The machine uses the AlignmentOntology phaselibs: http://phaselibs.opendfki.de/wiki/AlignmentOntology The rebirth-machine in Gnowsis works in 3 steps:
- A range of plugins analyse the resource store, looking for things that could be reborn, f.x. people crawler from address books, tags crawler from flickr, etc. The plugin outputs mapping proposals, represented by instances of the mapping ontology.
- For each plugin, the proposals are reviewed by all "RebirthReviewers" this could be a graphical thing prompting the user, or some unsupervised heuristic. These reviewers may either accept, reject or ignore each proposal.
- The rebirth machine commits all proposed mappings that were accepted by the reviewers. (The rejected mappings are remembered, and will not be suggested again)
Both step 1 and 2 work with plugins, you can write new plugins by extending org.gnowsis.pimo.impl.RebirthPluginBase (or implementing org.gnowsis.pimo.RebirthPlugin) and add this to the RebirthMachine. Similarily you can add new reviewers by extending org.gnowsis.pimo.impl.RebirthReviewerBase or implementing org.gnowsis.pimo.RebirthReviewer.
At the time of writing the following plugins exist:
- RebirthTags - i.e. from flickr, del.icio.us, etc., maps to Topics
- RebirthImapCrawlerPeople - map ALL people who have sent or recieved emails to People
- RebirthPeople - map all vCard people (i.e. crawled from address-books) to People
and one reviewer:
- ThresholdRebirthReviewer - accept all proposals with a confidence over a certain value, currently 0.8
I would assume that I forget to update this list, so check the code! :)
In the future setting up plugins/reviewers will be a part of the configuration of gnowsis... (#295)