title: Anaphora resolution in stanford-nlp using python
body: <p>I am trying to do anaphora resolution and for that below is my code.</p>
  
  <p>first i navigate to the folder where i have downloaded the stanford module. Then i run the command in command prompt to initialize stanford nlp module</p>
  
  <pre><code>java -mx4g -cp "*;stanford-corenlp-full-2017-06-09/*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port 9000 -timeout 15000
  </code></pre>
  
  <p>After that i execute below code in Python</p>
  
  <pre><code>from pycorenlp import StanfordCoreNLP
  nlp = StanfordCoreNLP('http://localhost:9000')
  </code></pre>
  
  <p>I want to change the sentence <code>Tom is a smart boy. He know a lot of thing.</code> into <code>Tom is a smart boy. Tom know a lot of thing.</code> and there is no tutorial or any help available in Python.</p>
  
  <p>All i am able to do is annotate by below code in Python</p>
  
  <p>coreference resolution</p>
  
  <pre><code>output = nlp.annotate(sentence, properties={'annotators':'dcoref','outputFormat':'json','ner.useSUTime':'false'})
  </code></pre>
  
  <p>and by parsing for coref </p>
  
  <pre><code>coreferences = output['corefs']
  </code></pre>
  
  <p>i get below JSON</p>
  
  <pre><code>coreferences
  
  {u'1': [{u'animacy': u'ANIMATE',
     u'endIndex': 2,
     u'gender': u'MALE',
     u'headIndex': 1,
     u'id': 1,
     u'isRepresentativeMention': True,
     u'number': u'SINGULAR',
     u'position': [1, 1],
     u'sentNum': 1,
     u'startIndex': 1,
     u'text': u'Tom',
     u'type': u'PROPER'},
    {u'animacy': u'ANIMATE',
     u'endIndex': 6,
     u'gender': u'MALE',
     u'headIndex': 5,
     u'id': 2,
     u'isRepresentativeMention': False,
     u'number': u'SINGULAR',
     u'position': [1, 2],
     u'sentNum': 1,
     u'startIndex': 3,
     u'text': u'a smart boy',
     u'type': u'NOMINAL'},
    {u'animacy': u'ANIMATE',
     u'endIndex': 2,
     u'gender': u'MALE',
     u'headIndex': 1,
     u'id': 3,
     u'isRepresentativeMention': False,
     u'number': u'SINGULAR',
     u'position': [2, 1],
     u'sentNum': 2,
     u'startIndex': 1,
     u'text': u'He',
     u'type': u'PRONOMINAL'}],
   u'4': [{u'animacy': u'INANIMATE',
     u'endIndex': 7,
     u'gender': u'NEUTRAL',
     u'headIndex': 4,
     u'id': 4,
     u'isRepresentativeMention': True,
     u'number': u'SINGULAR',
     u'position': [2, 2],
     u'sentNum': 2,
     u'startIndex': 3,
     u'text': u'a lot of thing',
     u'type': u'NOMINAL'}]}
  </code></pre>
  
  <p>Any help on this?</p>