Details of the second lab: rule system
Main goal of the lab: extending the dataset obtained from rdfa by automatically derived context-based information.
The lab will build upon your first rdfa lab.
What will you have to do
Concretely, you will have:
- Look at your rdfa pages and invent/create sensible small rule files in the Otter syntax for deriving new data from physically present rdfa data.
- It may happen that the rdfa pages from the first lab do not contain really suitable/interesting data for this. In that case, create new pages.
- The rdfa pages should indicate (by having a corresponding link in the rdfa data) which rule set should be used. You should have at least two different rdfa pages and two different rulesets, one for each page.
- The rule file should be such that no contradiction arises and the set of derived facts is still maintainable (not millions of new facts).
- Write a program which takes your first lab output, finds an indicated rule file and builds a new Otter syntax file containing both rules and the data obtained from the rdfa page.
- Then let the same program call Otter with the newly built file and send the result to a result file.
- Write a program which takes the output file, parses out the derived facts (fact has just one atom and no variables) and adds these to the original rdfa-parsed dataset.
- Finally print out the extended dataset: the original facts and newly derived facts from this dataset.
You may write just one program for all these tasks or several different. In the latter case you will also have to write a "master" program (as a shell script or bat file, for example) calling these subprograms.
The final resulting program should take a page url or file name as a single input and produce a list of all found and derived facts as output.
Suggestions and links
Otter prover:
- the old version http://www.cs.unm.edu/~mccune/otter/
- the new version (Prover9) http://www.cs.unm.edu/~mccune/prover9/
Download, experiment, then read documentation: