from_amr

semstr.convert.from_amr(lines, passage_id=None, return_original=False, save_original=True, wikification=False, placeholders=True, **kwargs)[source]

Converts from parsed text in AMR PENMAN format to a Passage object.

Parameters:
  • lines – iterable of lines in AMR PENMAN format, describing a single passage.
  • passage_id – ID to set for passage, overriding the ID from the file
  • save_original – whether to save original AMR text in passage.extra
  • return_original – return triple of (UCCA passage, AMR string, AMR ID)
  • wikification – whether to use wikification for replacing node labels with placeholders based on tokens
  • placeholders – introduce placeholders into node labels when they include the terminal’s text?

:return generator of Passage objects