def test_normal():
    annotator = FreebaseAnnotator(FREEBASE_DUMP_PATH, FREEBASE_RAW_PATH)
    sent = 'Viacom Inc. and Apple Computers released a new phone .'.split()
    actual = annotator.annotate(sent)
    expected = [((0,1), VIACOM), ((0,1), VIACOM2), ((3,4), APPLE)]
    
    assert_equal(actual, expected)
def test_empty_output():
    annotator = FreebaseAnnotator(FREEBASE_DUMP_PATH, FREEBASE_RAW_PATH)
    sent = 'Halo Inc. released a new phone .'.split()

    actual = annotator.annotate(sent)
    expected = []
    
    assert_equal(actual, expected)