def test_frog_to_saf(): tokens = list(parse_frog(LINES)) saf = frog_to_saf(tokens) assert_equal(len(saf['tokens']), 8) token = [t for t in saf['tokens'] if t['lemma'] == 'Amsterdam'] assert_equal(len(token), 1) assert_equal(token[0]['pos1'], 'M')
def test_frog_to_saf(): tokens = list(parse_frog(LINES)) saf = frog_to_saf(tokens) assert_equal(len(saf["tokens"]), 8) token = [t for t in saf["tokens"] if t["lemma"] == "Amsterdam"] assert_equal(len(token), 1) assert_equal(token[0]["pos1"], "M")
def test_parse_frog(): tokens = list(parse_frog(LINES)) assert_equal(len(tokens), 8) expected = dict(id=0, sentence=0, lemma='dit', word='dit', pos='VNW(aanw,pron,stan,vol,3o,ev)', pos_confidence=0.9, rel=("su", 1)) assert_equal(tokens[0], expected) assert_equal(tokens[3]['ne'], 'LOC') assert_equal(tokens[7]['sentence'], 1)
def test_parse_frog(): tokens = list(parse_frog(LINES)) assert_equal(len(tokens), 8) expected = dict(id=0, sentence=0, lemma='dit', word='dit', pos='VNW(aanw,pron,stan,vol,3o,ev)', pos_confidence=0.9) assert_equal(tokens[0], expected) assert_equal(tokens[7]['sentence'], 1)
def test_parse_frog(): tokens = list(parse_frog(LINES)) assert_equal(len(tokens), 8) expected = dict(id=0, sentence=0, lemma="dit", word="dit", pos="VNW(aanw,pron,stan,vol,3o,ev)", pos_confidence=0.9) assert_equal(tokens[0], expected) assert_equal(tokens[7]["sentence"], 1)