How to use the conllu.compat.string_to_file function in conllu

To help you get started, we’ve selected a few conllu examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github EmilStenstrom / conllu / tests / test_parser.py View on Github external
def test_empty(self):
        self.assertEqual(parse_conllu_plus_fields(string_to_file("")), None)
        self.assertEqual(parse_conllu_plus_fields(string_to_file(None)), None)
github EmilStenstrom / conllu / tests / test_parser.py View on Github external
def test_empty(self):
        self.assertEqual(list(parse_sentences(string_to_file(""))), [])
        self.assertEqual(list(parse_sentences(string_to_file(None))), [])
github EmilStenstrom / conllu / tests / test_integration.py View on Github external
def test_parse_incr(self):
        self.assertEqual(parse(data), list(parse_incr(string_to_file(data))))
github EmilStenstrom / conllu / conllu / __init__.py View on Github external
def parse_tree(data):
    return list(parse_tree_incr(string_to_file(data)))