{"action":"created","issue":{"url":"https://api.github.com/repos/stanfordnlp/CoreNLP/issues/49","labels_url":"https://api.github.com/repos/stanfordnlp/CoreNLP/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/stanfordnlp/CoreNLP/issues/49/comments","events_url":"https://api.github.com/repos/stanfordnlp/CoreNLP/issues/49/events","html_url":"https://github.com/stanfordnlp/CoreNLP/issues/49","id":55169526,"number":49,"title":"Problems with IndexedWord word() and value()","user":{"login":"annefried","id":8365026,"avatar_url":"https://avatars.githubusercontent.com/u/8365026?v=3","gravatar_id":"","url":"https://api.github.com/users/annefried","html_url":"https://github.com/annefried","followers_url":"https://api.github.com/users/annefried/followers","following_url":"https://api.github.com/users/annefried/following{/other_user}","gists_url":"https://api.github.com/users/annefried/gists{/gist_id}","starred_url":"https://api.github.com/users/annefried/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annefried/subscriptions","organizations_url":"https://api.github.com/users/annefried/orgs","repos_url":"https://api.github.com/users/annefried/repos","events_url":"https://api.github.com/users/annefried/events{/privacy}","received_events_url":"https://api.github.com/users/annefried/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-22T15:52:05Z","updated_at":"2015-01-25T23:25:55Z","closed_at":null,"body":"Hi, in the context of dkpro's StanfordCoreferenceResolver, I found the following problem:\r\nStanford CoreNLP (v3.4.1) seems to plan to make changes at IndexedWord: word() and value() both exist but according to a comment, should be unified at some time.\r\n\r\nDetails:\r\n\r\nStanfordCoreferenceResolver creates the collapsed dependencies this way:\r\nParserAnnotatorUtils.fillInParseAnnotations(false, true, gsf, sentence, treeCopy);\r\n\r\nDcoref's Document.java makes use of the function getNodeByWordPattern of SemanticGraph, which in turn uses w.word(). This does not seem to be set by fillInParseAnnotations.\r\n\r\nvalue() is set, however, so I preliminarily fixed the problem by adding the following right after fillInParseAnnotations in StanfordCoreferenceResolver.\r\n\r\nSemanticGraph deps = sentence.get(SemanticGraphCoreAnnotations.CollapsedDependenciesAnnotation.class);\r\nfor (IndexedWord vertex : deps.vertexSet()) {\r\n     vertex.setWord(vertex.value());\r\n}\r\n\r\nThe problem should be fixed in StanfordCoreNLP, however."},"comment":{"url":"https://api.github.com/repos/stanfordnlp/CoreNLP/issues/comments/71399565","html_url":"https://github.com/stanfordnlp/CoreNLP/issues/49#issuecomment-71399565","issue_url":"https://api.github.com/repos/stanfordnlp/CoreNLP/issues/49","id":71399565,"user":{"login":"manning","id":2438050,"avatar_url":"https://avatars.githubusercontent.com/u/2438050?v=3","gravatar_id":"","url":"https://api.github.com/users/manning","html_url":"https://github.com/manning","followers_url":"https://api.github.com/users/manning/followers","following_url":"https://api.github.com/users/manning/following{/other_user}","gists_url":"https://api.github.com/users/manning/gists{/gist_id}","starred_url":"https://api.github.com/users/manning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manning/subscriptions","organizations_url":"https://api.github.com/users/manning/orgs","repos_url":"https://api.github.com/users/manning/repos","events_url":"https://api.github.com/users/manning/events{/privacy}","received_events_url":"https://api.github.com/users/manning/received_events","type":"User","site_admin":false},"created_at":"2015-01-25T23:25:55Z","updated_at":"2015-01-25T23:25:55Z","body":"Yes, there have traditionally been various bugs because of the separation of word() and value() - even though there were some good reasons for it.\r\n\r\nBut have you tried to reproduce this on v3.5 or the current master?  I just added code to the test of StanfordCoreNLPITest:test(), based on your code above: \r\n\r\n      // check that dependency graph Labels have word()                                                                                               \r\n      SemanticGraph deps = sentence.get(SemanticGraphCoreAnnotations.CollapsedDependenciesAnnotation.class);\r\n      for (IndexedWord vertex : deps.vertexSet()) {\r\n        Assert.assertNotNull(vertex.word());\r\n        Assert.assertEquals(vertex.word(), vertex.value());\r\n      }\r\n\r\nThat code passes for me. So maybe this is already fixed? If not can you provide a test case that fails?\r\n\r\n(I realize that you may have good compatibility reasons for staying off Java 8 at the moment, but I suspect right now we don't have the energy to release a v3.4.2 unless more or more serious problems are found....)\r\n"}}