to_text

ucca.convert.to_text(passage, sentences=True, lang='en', *args, **kwargs)[source]

Converts from a Passage object to tokenized strings.

Parameters:
  • passage – the Passage object to convert
  • sentences – whether to break the Passage to sentences (one for string) or leave as one string. Defaults to True
  • lang – language to use for sentence splitting model
Returns:

a list of strings - 1 if sentences=False, # of sentences otherwise