How to use the conllu.parser.parse_int_value 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_parse_int_value(self):
        self.assertEqual(parse_int_value("_"), None)
        self.assertEqual(parse_int_value("4"), 4)
        self.assertEqual(parse_int_value("0"), 0)
        self.assertEqual(parse_int_value("10"), 10)
        self.assertEqual(parse_int_value("-10"), -10)

        with self.assertRaises(ParseException):
            parse_int_value("a")
github EmilStenstrom / conllu / tests / test_parser.py View on Github external
def test_parse_int_value(self):
        self.assertEqual(parse_int_value("_"), None)
        self.assertEqual(parse_int_value("4"), 4)
        self.assertEqual(parse_int_value("0"), 0)
        self.assertEqual(parse_int_value("10"), 10)
        self.assertEqual(parse_int_value("-10"), -10)

        with self.assertRaises(ParseException):
            parse_int_value("a")
github EmilStenstrom / conllu / tests / test_parser.py View on Github external
def test_parse_int_value(self):
        self.assertEqual(parse_int_value("_"), None)
        self.assertEqual(parse_int_value("4"), 4)
        self.assertEqual(parse_int_value("0"), 0)
        self.assertEqual(parse_int_value("10"), 10)
        self.assertEqual(parse_int_value("-10"), -10)

        with self.assertRaises(ParseException):
            parse_int_value("a")
github EmilStenstrom / conllu / tests / test_parser.py View on Github external
def test_parse_int_value(self):
        self.assertEqual(parse_int_value("_"), None)
        self.assertEqual(parse_int_value("4"), 4)
        self.assertEqual(parse_int_value("0"), 0)
        self.assertEqual(parse_int_value("10"), 10)
        self.assertEqual(parse_int_value("-10"), -10)

        with self.assertRaises(ParseException):
            parse_int_value("a")
github EmilStenstrom / conllu / tests / test_integration.py View on Github external
                "phead": lambda line, i: parse_int_value(line[i]),
                "apreds": lambda line, i: [
github EmilStenstrom / conllu / tests / test_parser.py View on Github external
def test_parse_int_value(self):
        self.assertEqual(parse_int_value("_"), None)
        self.assertEqual(parse_int_value("4"), 4)
        self.assertEqual(parse_int_value("0"), 0)
        self.assertEqual(parse_int_value("10"), 10)
        self.assertEqual(parse_int_value("-10"), -10)

        with self.assertRaises(ParseException):
            parse_int_value("a")
github EmilStenstrom / conllu / tests / test_parser.py View on Github external
def test_parse_int_value(self):
        self.assertEqual(parse_int_value("_"), None)
        self.assertEqual(parse_int_value("4"), 4)
        self.assertEqual(parse_int_value("0"), 0)
        self.assertEqual(parse_int_value("10"), 10)
        self.assertEqual(parse_int_value("-10"), -10)

        with self.assertRaises(ParseException):
            parse_int_value("a")