Erinevus lehekülje "Automated reasoning homework 2015" redaktsioonide vahel
(ei näidata sama kasutaja 7 vahepealset redaktsiooni) | |||
1. rida: | 1. rida: | ||
+ | |||
+ | == <font color="red">Deadline moved!</font> == | ||
+ | |||
+ | The deadline is moved to 1. December: on 24 November there will be machine learning seminar instead of the lab. | ||
== Automated reasoning homework as a second part of a two-phase project == | == Automated reasoning homework as a second part of a two-phase project == | ||
10. rida: | 14. rida: | ||
== Administrative == | == Administrative == | ||
− | Homework defence deadline: | + | Homework defence deadline: 1. December. Presentation afer this deadline will give half of the points. Absolute deadline is 8. December: no submissions will be accepted after that,. |
Work should be submitted to git, latest one day before deadline. | Work should be submitted to git, latest one day before deadline. | ||
29. rida: | 33. rida: | ||
</pre> | </pre> | ||
− | where the list [http://en.wikipedia.org/wiki/Barack_Obama, http://en.wikipedia.org/wiki/china] means that we do not know | + | where the list [ http://en.wikipedia.org/wiki/Barack_Obama, http://en.wikipedia.org/wiki/china ] means that we do not know |
which interpretation is the correct one (the original word was like he,this,she,it,...) | which interpretation is the correct one (the original word was like he,this,she,it,...) | ||
47. rida: | 51. rida: | ||
* pose a question in otter format | * pose a question in otter format | ||
* run otter to find answer | * run otter to find answer | ||
− | |||
− | |||
If you manage to do that, you will pass. | If you manage to do that, you will pass. | ||
75. rida: | 77. rida: | ||
* [[Derive simple information about Obama]] | * [[Derive simple information about Obama]] | ||
* [[Ask a query about Obama]] | * [[Ask a query about Obama]] | ||
+ | * [[Output of first lab converted to second lab]] with a few rules added: can derive that Hyatt has type hotel and Obama is rich. [[Here is otter output of this example]] | ||
+ | * [[A question posed: find a mortal in the text]]: we just add <tt>-rdf(X,"id:type","mortal") | $ans(X).</tt> to the facts (i.e. a negated query with a variable and $ans to capture a suitable value for X. | ||
* [[Probabilities and web scraping]] Determine the type of objects using information from a web page and probability-like measures. | * [[Probabilities and web scraping]] Determine the type of objects using information from a web page and probability-like measures. | ||
95. rida: | 99. rida: | ||
* Process the myoutput.txt, filtering out derived stuff and/or determine whether the output contains the word PROOF | * Process the myoutput.txt, filtering out derived stuff and/or determine whether the output contains the word PROOF | ||
+ | |||
+ | == Example code == | ||
+ | |||
+ | [[lab 2 example code converted to give]] as a result the [[Output of first lab converted to second lab]] |
Viimane redaktsioon: 17. november 2015, kell 17:16
Deadline moved!
The deadline is moved to 1. December: on 24 November there will be machine learning seminar instead of the lab.
Automated reasoning homework as a second part of a two-phase project
The goal of this homework is
- to learn about representing knowledge and rules in logic
- experimenting with an automated reasoner
The concrete task is to add some common sense rules to the rdf or multi-arity representation output of the first phase of the project and then ask and prove some example queries using an automated reasoner.
Administrative
Homework defence deadline: 1. December. Presentation afer this deadline will give half of the points. Absolute deadline is 8. December: no submissions will be accepted after that,.
Work should be submitted to git, latest one day before deadline.
The groups are same as for the first phase
What you have to do
First of all, by default we will use the otter prover. Download it and try out some example problems in the otter zip file. Have a look at the manual as well.
Suppose you have a triplet like
[http://en.wikipedia.org/wiki/Barack_Obama, http://en.wikipedia.org/wiki/china], id:type http://conceptnet5.media.mit.edu/web/c/en/person
where the list [ http://en.wikipedia.org/wiki/Barack_Obama, http://en.wikipedia.org/wiki/china ] means that we do not know which interpretation is the correct one (the original word was like he,this,she,it,...)
First, pick just one interpretation like
http://en.wikipedia.org/wiki/Barack_Obama, id:type http://conceptnet5.media.mit.edu/web/c/en/person
and then
- represent it in otter format
- add common sense rules about the domain of news and politics (ontology: like a taxonomy, can be a bit more complex)
- pose a question in otter format
- run otter to find answer
If you manage to do that, you will pass.
Next, a bit fancier task:
Run a loop where you try out different interpretations of he,this,she,it,... and for each interpretation in the list:
- represent it in otter format
- add common sense rules about the domain of news and politics (ontology: like a taxonomy, can be a bit more complex)
- check whether otter generates a contradiction: if yes, then this is probably a wrong interpretation, since it does not match common sense rules.
What more you could do
Instead of relying on your own handmade rules, you could use the json format data in conceptnet about objects to create a set of relevant rules automatically! You could use the wordnet for the same purpose. You could even use the http://wiki.dbpedia.org/ to get a large amount of real-world facts you could add to your knowledge base.
This is what you could really get from conceptnet and wordnet and dbpedia: the main purpose why these databases/systems exist.
This is not required for the lab, but if you manage to do it (ie. use some of these systems for creating relevant rules and facts automatically) we'll award you extra points!
Examples to use as a starting point
The following examples are in the Otter format: the first two are in the clause syntax and are similar to what you are expected to in the third lab. The last one demonstrates formula syntax, calculation and probabilities (kind of).
- Derive simple information about Obama
- Ask a query about Obama
- Output of first lab converted to second lab with a few rules added: can derive that Hyatt has type hotel and Obama is rich. Here is otter output of this example
- A question posed: find a mortal in the text: we just add -rdf(X,"id:type","mortal") | $ans(X). to the facts (i.e. a negated query with a variable and $ans to capture a suitable value for X.
- Probabilities and web scraping Determine the type of objects using information from a web page and probability-like measures.
How to create the Otter file and use the output
- Split the example Otter file like obama1.txt into the initial part containing the strategy selection etc and the final part containing end_of_list.
- Create the rdf data in Otter format automatically from the output of your parser in the previous lab.
- In case you pose a question, add the negated question in the Otter format.
- Compile the full intput file by appending these parts into a full input file myinput.txt:
- the prefix part,
- the automatically created rdf data in Otter format,
- the (optional) question in Otter format, in the negated form
- the commonsense rules and facts: either static handmade rules or rules/facts created automatically from conceptnet/wordnet/dbpedia
- the short final part ie end_of_list
- Run otter like otter < myinput.txt > myoutput.txt
- Process the myoutput.txt, filtering out derived stuff and/or determine whether the output contains the word PROOF
Example code
lab 2 example code converted to give as a result the Output of first lab converted to second lab