TutorialDoctor
Sep 17, 2014 - 05:03
When going through a list in a for loop, inside of a python script, I can print the whole list in the console, but I cannot use the workflow.set_output() function to pass the entire list to the next action.
It only passes the last item.
For example:
tags = linguistictagger.tag_string(text, linguistictagger.SCHEME_LEXICAL_CLASS)
for tag in tags:
lex = tag[0]
word = tag[1]
out = word + ' = ' + lex
print(out)
This works, but
tags = linguistictagger.tag_string(text, linguistictagger.SCHEME_LEXICAL_CLASS)
for tag in tags:
lex = tag[0]
word = tag[1]
out = word + ' = ' + lex
workflow.set_output(out)
This doesn't work.