def test_conll2000(self): def f(): CoNLL2000.testa('d') self.assertRaises(BaseException, f) def f(): CoNLL2000.testb('d') self.assertRaises(NotImplementedError, f) def f(): CoNLL2000.train('d') self.assertRaises(BaseException, f) def f(): CoNLL2000.testa('en').baseline() self.assertRaises(NotImplementedError, f) c = CoNLL2000.testa("en") self._test_corpus(c) c = CoNLL2000.train("en") self._test_corpus(c)
def test_eval(self): c = CoNLL2000.testa("en") t = [e for e in c.iob_tokens('SYN')] all_t = [e for e in c.tokens()] r = c.conlleval(t) self._test_self_eval_result(r, all_t, t) self._test_self_eval(CoNLL2002.testa("nl")) self._test_self_eval(CoNLL2002.testb("nl")) self._test_self_eval(CoNLL2002.train("nl")) self._test_self_eval(CoNLL2002.testa("es")) self._test_self_eval(CoNLL2002.testb("es")) self._test_self_eval(CoNLL2002.train("es")) self._test_self_eval(CoNLL2003.testa("en")) self._test_self_eval(CoNLL2003.testb("en")) self._test_self_eval(CoNLL2003.train("en"))
def test_eval(self): c = CoNLL2000.testa("en") t = [ e for e in c.iob_tokens('SYN') ] all_t = [e for e in c.tokens() ] r = c.conlleval(t) self._test_self_eval_result(r, all_t, t) self._test_self_eval(CoNLL2002.testa("nl")) self._test_self_eval(CoNLL2002.testb("nl")) self._test_self_eval(CoNLL2002.train("nl")) self._test_self_eval(CoNLL2002.testa("es")) self._test_self_eval(CoNLL2002.testb("es")) self._test_self_eval(CoNLL2002.train("es")) self._test_self_eval(CoNLL2003.testa("en")) self._test_self_eval(CoNLL2003.testb("en")) self._test_self_eval(CoNLL2003.train("en"))
def f(): CoNLL2000.testa('en').baseline()
def f(): CoNLL2000.testa('d')
def f(): CoNLL2000.testa('en').baseline() self.assertRaises(NotImplementedError, f)
def f(): CoNLL2000.testa('d') self.assertRaises(BaseException, f)