{"action":"created","issue":{"url":"https://api.github.com/repos/opencog/opencog/issues/1214","labels_url":"https://api.github.com/repos/opencog/opencog/issues/1214/labels{/name}","comments_url":"https://api.github.com/repos/opencog/opencog/issues/1214/comments","events_url":"https://api.github.com/repos/opencog/opencog/issues/1214/events","html_url":"https://github.com/opencog/opencog/issues/1214","id":54168969,"number":1214,"title":"R2L: anaphora resolution?","user":{"login":"williampma","id":7298267,"avatar_url":"https://avatars.githubusercontent.com/u/7298267?v=3","gravatar_id":"","url":"https://api.github.com/users/williampma","html_url":"https://github.com/williampma","followers_url":"https://api.github.com/users/williampma/followers","following_url":"https://api.github.com/users/williampma/following{/other_user}","gists_url":"https://api.github.com/users/williampma/gists{/gist_id}","starred_url":"https://api.github.com/users/williampma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/williampma/subscriptions","organizations_url":"https://api.github.com/users/williampma/orgs","repos_url":"https://api.github.com/users/williampma/repos","events_url":"https://api.github.com/users/williampma/events{/privacy}","received_events_url":"https://api.github.com/users/williampma/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/opencog/opencog/labels/nlp","name":"nlp","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/opencog/opencog/milestones/2","labels_url":"https://api.github.com/repos/opencog/opencog/milestones/2/labels","id":930898,"number":2,"title":"Dialogue System","description":"The aim is to have a basic OpenCog based dialogue system with all the parts in place and the whole thing holistically working, for the three use cases of\r\n1. standalone dialogue\r\n2. dialogue with a game character\r\n3. dialogue (via speech) with a robot\r\n\r\nAfter this, the next phase of effort will involve improving the components of the system (via hand-engineering them more, or in some cases via replacing hand-engineered components via learned components), and customizing the system for particular functionalities.\r\n\r\nInitially outlined @ http://wiki.opencog.org/w/OpenCog_HK_2014_Dialogue_System_Task_Breakdown  Not all have been imported as some of the tasks have been completed","creator":{"login":"AmeBel","id":2135577,"avatar_url":"https://avatars.githubusercontent.com/u/2135577?v=3","gravatar_id":"","url":"https://api.github.com/users/AmeBel","html_url":"https://github.com/AmeBel","followers_url":"https://api.github.com/users/AmeBel/followers","following_url":"https://api.github.com/users/AmeBel/following{/other_user}","gists_url":"https://api.github.com/users/AmeBel/gists{/gist_id}","starred_url":"https://api.github.com/users/AmeBel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmeBel/subscriptions","organizations_url":"https://api.github.com/users/AmeBel/orgs","repos_url":"https://api.github.com/users/AmeBel/repos","events_url":"https://api.github.com/users/AmeBel/events{/privacy}","received_events_url":"https://api.github.com/users/AmeBel/received_events","type":"User","site_admin":false},"open_issues":19,"closed_issues":4,"state":"open","created_at":"2015-01-12T03:11:11Z","updated_at":"2015-01-15T03:08:16Z","due_on":"2015-08-31T16:00:00Z","closed_at":null},"comments":14,"created_at":"2015-01-13T09:41:16Z","updated_at":"2015-01-16T08:56:38Z","closed_at":null,"body":"We have some form of anaphora resolution for RelEx's opencog atoms, but not for R2L atoms.  Do we not need that as well for those logic atoms?\r\n\r\nI ask because in the process of working with SuReal, I cannot match the output of `(r2l \"John steals the orange and eats the orange.\")` or `(r2l \"John steals the orange and eats it.\")` with \r\n\r\n```\r\n(EvaluationLink (stv 0.99000001 0.99000001)\r\n\t(PredicateNode \"steals@d88d647d-5c02-481e-b8d0-cfd20d33fb23\" (stv 0.001 0.99000001))\r\n\t(ListLink (stv 0.99000001 0.99000001)\r\n\t\t(ConceptNode \"Bob@fd5fb72f-0d3f-4517-8b20-8147df2ee7d3\" (stv 0.001 0.99000001))\r\n\t\t(ConceptNode \"apple@ca552878-32d4-41e3-aaa3-34239ba98f34\" (stv 0.001 0.99000001))\r\n\t)\r\n)\r\n(EvaluationLink (stv 0.99000001 0.99000001)\r\n\t(PredicateNode \"eats@5ec780eb-a98b-4650-a680-3b0163a8822e\" (stv 0.001 0.99000001))\r\n\t(ListLink (stv 0.99000001 0.99000001)\r\n\t\t(ConceptNode \"Bob@fd5fb72f-0d3f-4517-8b20-8147df2ee7d3\" (stv 0.001 0.99000001))\r\n\t\t(ConceptNode \"apple@ca552878-32d4-41e3-aaa3-34239ba98f34\" (stv 0.001 0.99000001))\r\n\t)\r\n)\r\n```\r\nbecause both `(ConceptNode \"apple@ca55...\")` need to match to the same node, and we have two different \"orange\" in the first R2L output, and one \"orange\" and a \"it\" in the second.\r\n\r\nI suppose this requires the \"abstraction\" post-processing pipeline at some step as well?\r\n\r\n@AmeBel add to the Dialogue System milestone?"},"comment":{"url":"https://api.github.com/repos/opencog/opencog/issues/comments/70225107","html_url":"https://github.com/opencog/opencog/issues/1214#issuecomment-70225107","issue_url":"https://api.github.com/repos/opencog/opencog/issues/1214","id":70225107,"user":{"login":"williampma","id":7298267,"avatar_url":"https://avatars.githubusercontent.com/u/7298267?v=3","gravatar_id":"","url":"https://api.github.com/users/williampma","html_url":"https://github.com/williampma","followers_url":"https://api.github.com/users/williampma/followers","following_url":"https://api.github.com/users/williampma/following{/other_user}","gists_url":"https://api.github.com/users/williampma/gists{/gist_id}","starred_url":"https://api.github.com/users/williampma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/williampma/subscriptions","organizations_url":"https://api.github.com/users/williampma/orgs","repos_url":"https://api.github.com/users/williampma/repos","events_url":"https://api.github.com/users/williampma/events{/privacy}","received_events_url":"https://api.github.com/users/williampma/received_events","type":"User","site_admin":false},"created_at":"2015-01-16T08:56:38Z","updated_at":"2015-01-16T08:56:38Z","body":"I haven't come up with a good solution yet.\r\n\r\nWhile it would be good that R2L's output something like the following for the sentence `John steals the orange and eats the orange.` (assuming same \"orange\")\r\n```\r\n(EvaluationLink\r\n   (PredicateNode \"steals@11\")\r\n   (ListLink\r\n      (ConceptNode \"John@22\")\r\n      (ConceptNode \"orange@33\")))\r\n(EvaluationLink\r\n   (PredicateNode \"eats@44\")\r\n   (ListLink\r\n       (ConceptNode \"John@22\")\r\n       (ConceptNode \"orange@33\")))\r\n```\r\nso that SuReal can match to this sentence when talking about one orange/apple/etc, it will still need some information to get to the original 2 orange's `WordInstanceNode` from the original sentence (to potential be replace by the new word orange/apple/etc at SuReal)...  kind of like\r\n```\r\n (SomeSortOfLink (ConceptNode \"orange@33\") (WordInstanceNode \"orange@33\"))\r\n (SomeSortOfLink (ConceptNode \"orange@33\") (WordInstanceNode \"orange@44\"))\r\n```\r\nThen following these links SuReal can generate `Sam steals the apple and eats the apple.`\r\n\r\n\r\nHowever, with the above solution, even the sentence `John steals the orange and eats it.` would produce the same R2L's output, except it would have\r\n```\r\n (SomeSortOfLink (ConceptNode \"orange@33\") (WordInstanceNode \"orange@33\"))\r\n (SomeSortOfLink (ConceptNode \"orange@33\") (WordInstanceNode \"it@44\"))\r\n```\r\nSuppose SuReal want to replace \"orange\" with \"apple\", then the resulting sentence would end up as `Sam steals the apple and eats apple`, which is incorrect because `apple` doesn't really match to `it` (in terms of grammar), but SuReal doesn't know by looking at the R2L's output graph.\r\n\r\n\r\nSo maybe the solution should be to keep the R2L's output as is, with 2 different orange instance for the same concept\r\n```\r\n(EvaluationLink\r\n   (PredicateNode \"steals@11\")\r\n   (ListLink\r\n      (ConceptNode \"John@22\")\r\n      (ConceptNode \"orange@33\")))\r\n(EvaluationLink\r\n   (PredicateNode \"eats@44\")\r\n   (ListLink\r\n       (ConceptNode \"John@22\")\r\n       (ConceptNode \"orange@44\")))\r\n```\r\n\r\nbut how would SuReal match to this graph when it only want to talk about one `apple` concept...  it is like making one variable maps to two nodes in one solution, which sounds kind of strange... so at the moment I am leaning toward somehow making the first solution work.\r\n\r\nPerhaps SuReal need to generate those `SomeSortOfLink` as part of its query... but there's also the sentence `John steals and eats the orange`, which really only does have one orange instance, WordInstanceNode included.\r\n\r\nAnd then the problem is reversed when generating anaphora.  I will have to think some more."}}