I'm running this [example](https://stackabuse.com/python-for-nlp-getting-started-with-the-stanfordcorenlp-library/) using pycorenlp Stanford Core NLP python wrapper, but the annotate function returns a string instead of a dict, so, when I iterate over it to get each sentence sentiment value I get the following error: "string indices must be integers".

What could I do to get over it? Anyone could help me? Thanks in advance.
The code is below:

```
from pycorenlp import StanfordCoreNLP
nlp_wrapper = StanfordCoreNLP('http://localhost:9000')
doc = "I like this chocolate. This chocolate is not good. The chocolate is delicious. Its a very 
    tasty chocolate. This is so bad"
annot_doc = nlp_wrapper.annotate(doc,
                                 properties={
                                            'annotators': 'sentiment',
                                            'outputFormat': 'json',
                                            'timeout': 100000,
                                 })
for sentence in annot_doc["sentences"]:
      print(" ".join([word["word"] for word in sentence["tokens"]]) + " => "\
            + str(sentence["sentimentValue"]) + " = "+ sentence["sentiment"])

```