in Education by
I'm having some trouble understanding the changes made to the coref resolver in the last version of the Stanford NLP tools. As an example, below is a sentence and the corresponding CorefChainAnnotation: The atom is a basic unit of matter, it consists of a dense central nucleus surrounded by a cloud of negatively charged electrons. {1=[1 1, 1 2], 5=[1 3], 7=[1 4], 9=[1 5]} I am not sure I understand the meaning of these numbers. Looking at the source doesn't really help either. Thank you JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
I've been working with the coreference dependency graph and I started by using the other answer to this question. After a while though I realized that this algorithm above is not exactly correct. The output it produced is not even close to the modified version I have. For anyone else who uses this article, here is the algorithm I ended up with which also filters out self references because every representativeMention also mentions itself and a lot of mentions only reference themselves. Map coref = document.get(CorefChainAnnotation.class); for(Map.Entry entry : coref.entrySet()) { CorefChain c = entry.getValue(); //this is because it prints out a lot of self references which aren't that useful if(c.getCorefMentions().size() <= 1) continue; CorefMention cm = c.getRepresentativeMention(); String clust = ""; List<CoreLabel> tks = document.get(SentencesAnnotation.class).get(cm.sentNum-1).get(TokensAnnotation.class); for(int i = cm.startIndex-1; i < cm.endIndex-1; i++) clust += tks.get(i).get(TextAnnotation.class) + " "; clust = clust.trim(); System.out.println("representative mention: \"" + clust + "\" is mentioned by:"); for(CorefMention m : c.getCorefMentions()){ String clust2 = ""; tks = document.get(SentencesAnnotation.class).get(m.sentNum-1).get(TokensAnnotation.class); for(int i = m.startIndex-1; i < m.endIndex-1; i++) clust2 += tks.get(i).get(TextAnnotation.class) + " "; clust2 = clust2.trim(); //don't need the self mention if(clust.equals(clust2)) continue; System.out.println("\t" + clust2); } } And the final output for your example sentence is the following: representative mention: "a basic unit of matter" is mentioned by: The atom it Usually "the atom" ends up being the representative mention but in the case it doesn't surprisingly. Another example with a slightly more accurate output is for the following sentence: The Revolutionary War occurred during the 1700s and it was the first war in the United States. produces the following output: representative mention: "The Revolutionary War" is mentioned by: it the first war in the United States

Related questions

0 votes
    What is Coreference Resolution? (a) Anaphora Resolution (b) Given a sentence or larger chunk of text, determine which ... d) None of the mentioned Please answer the above question....
asked Oct 22, 2022 in Education by JackTerrance
0 votes
    What is Coreference Resolution? (a) Anaphora Resolution (b) Given a sentence or larger chunk of text, determine which ... d) None of the mentioned Please answer the above question....
asked Oct 2, 2022 in Education by JackTerrance
0 votes
    Which Azure networking component is the core unit, from which administrators can have full control over IP address ... . Load Balancers 3. Routing Tables 4. Local Network...
asked Sep 22, 2021 in Technology by JackTerrance
+1 vote
    Which Azure networking component is the core unit from which administrators can have full control over IP address ... , name resolution, security settings, and routing rules?...
asked Oct 20, 2020 in Technology by JackTerrance
+1 vote
    Which Azure networking component is the core unit from which administrators can have full control over IP address ... , name resolution, security settings, and routing rules?...
asked Oct 20, 2020 in Technology by JackTerrance
0 votes
    Explain with reasons whether the following statements are true or false: A resolution can be passed even if China exercises its veto power. Please answer the above question....
asked Aug 14, 2022 in Education by JackTerrance
0 votes
    I have three text fields and submit button on a browser page.. Lets say A, B, C, and submit ( ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 17, 2022 in Education by JackTerrance
0 votes
    I am porting a game, that was originally written for the Win32 API, to Linux (well, porting the ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jan 13, 2022 in Education by JackTerrance
0 votes
    Fill in the Blanks. (5) A. is a type of scanner that is used to capture the highest resolution from an image. Select the correct answer from above options...
asked Dec 24, 2021 in Education by JackTerrance
0 votes
    What are the resolution steps when Burp does not intercept HTTPS requests? A)Toinstall Burp's CA certificate ... browser configuration. Select the correct answer from above options...
asked Nov 30, 2021 in Education by JackTerrance
0 votes
    What is Scope Resolution in Python?...
asked Dec 6, 2020 in Technology by JackTerrance
0 votes
    What is the field of Natural Language Processing (NLP)? (a) Computer Science (b) Artificial Intelligence (c) Linguistics (d) All of the mentioned Please answer the above question....
asked Oct 22, 2022 in Education by JackTerrance
0 votes
    NLP is concerned with the interactions between computers and human (natural) languages. (a) True (b) False ... Acting of Artificial Intelligence Please answer the above question....
asked Oct 22, 2022 in Education by JackTerrance
0 votes
    What is the main challenge/s of NLP? (a) Handling Ambiguity of Sentences (b) Handling Tokenization (c) Handling POS- ... (d) All of the mentioned Please answer the above question....
asked Oct 22, 2022 in Education by JackTerrance
0 votes
    Modern NLP algorithms are based on machine learning, especially statistical machine learning. (a) True (b) ... Acting of Artificial Intelligence Please answer the above question....
asked Oct 22, 2022 in Education by JackTerrance
...