Ejemplo n.º 1
0
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')
Ejemplo n.º 2
0
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")
Ejemplo n.º 3
0
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')
Ejemplo n.º 4
0
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)
Ejemplo n.º 5
0
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)
Ejemplo n.º 6
0
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)