Skip to content

Commit

Permalink
Python 3 return zip object
Browse files Browse the repository at this point in the history
  • Loading branch information
Lynten committed Jun 7, 2017
1 parent 4e5b881 commit e051eb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stanfordcorenlp/corenlp.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def pos_tag(self, sentence):
for token in s['tokens']:
words.append(token['word'])
tags.append(token['pos'])
return zip(words, tags)
return list(zip(words, tags))

def ner(self, sentence):
r_dict = self._request('ner', sentence)
Expand All @@ -150,7 +150,7 @@ def ner(self, sentence):
for token in s['tokens']:
words.append(token['word'])
ner_tags.append(token['ner'])
return zip(words, ner_tags)
return list(zip(words, ner_tags))

def parse(self, sentence):
r_dict = self._request('pos,parse', sentence)
Expand Down

0 comments on commit e051eb5

Please sign in to comment.