Source code for udapi.block.zellig_harris.common

[docs] def get_node_representation(node, print_lemma=False): """ Transform the node into the proper textual representation, as will appear in the extracted contexts. :param node: An input Node. :param print_lemma: If true, the node lemma is used, otherwise the node form. :return: A proper node textual representation for the contexts data. """ if print_lemma: output = node.lemma else: output = node.form output = output.lower() return output