Esempio n. 1
0
 def setUp(self):
     self.s = Subcat()
Esempio n. 2
0
class TestSubcat(unittest.TestCase):
    def setUp(self):
        self.s = Subcat()

    def tearDown(self):
        self.s = None

    def test_lemmata(self):
        self.assertEqual(self.s.subcat("bi"), ['BIPROG', 'BIPP'])
        self.assertEqual(self.s.subcat("is"), ['TRANS'])
        self.assertEqual(self.s.subcat("abair"), ['TRANS', 'VPROP'])
        self.assertEqual(self.s.subcat("arsa"), ['QUOTE'])
        cluinn = self.s.subcat("cluinn")
        self.assertTrue('TRANS' in cluinn)
        self.assertTrue('VPROPQ' in cluinn)
        self.assertTrue('VBHO' in cluinn)
        dean = self.s.subcat("dèan")
        self.assertTrue('TRANS' in dean)
        self.assertTrue('VAIR' in dean)
        faic = self.s.subcat("faic")
        self.assertEqual(faic, ['TRANS'])
        faigh = self.s.subcat("faigh")
        self.assertTrue('TRANS' in faigh)
        rach = self.s.subcat("rach")
        self.assertTrue('INTRANS' in rach)
        self.assertTrue('RACH' in rach)
        thig = self.s.subcat("thig")
        self.assertTrue('INTRANS' in thig)
        buail = self.s.subcat("buail")
        self.assertTrue('TRANS' in buail)
        bruidhinn = self.s.subcat("bruidhinn")
        self.assertTrue('VRI' in bruidhinn)
        coimhead = self.s.subcat("coimhead")
        self.assertTrue('VAIR' in coimhead)
        self.assertTrue('VRI' in coimhead)
        coinnich = self.s.subcat("coinnich")
        self.assertTrue('VRI' in coinnich)
        cuir = self.s.subcat("cuir")
        self.assertTrue('VAIR' in cuir)
        self.assertTrue('VRI' in cuir)
        cum = self.s.subcat("cùm")
        self.assertTrue('VAIR' in cum)
        self.assertTrue('VPROPQ' in cum)
        f*g = self.s.subcat("fàg")
        self.assertFalse('INTRANS' in f*g)
        falbh = self.s.subcat("falbh")
        self.assertFalse('TRANS' in falbh)
        faod = self.s.subcat("faod")
        self.assertTrue('FAODFEUM' in faod)
        fas = self.s.subcat("fàs")
        self.assertTrue('INTRANS' in fas)
        self.assertTrue('VADJ' in fas)
        feuch = self.s.subcat("feuch")
        self.assertTrue('VRI' in feuch)
        self.assertTrue('VPROP' in feuch)
        self.assertTrue('VPROPQ' in feuch)
        feum = self.s.subcat("feum")
        self.assertTrue('FAODFEUM' in feum)
        fuirich = self.s.subcat("fuirich")
        self.assertTrue('VAIR' in fuirich)
        gabh = self.s.subcat("gabh")
        self.assertTrue('VAIR' in gabh)
        self.assertTrue('VRI' in gabh)
        gluais = self.s.subcat("gluais")
        self.assertFalse('INTRANS' in gluais)
        iarr = self.s.subcat("iarr")
        self.assertTrue('VAIR' in iarr)
        inns = self.s.subcat("inns")
        self.assertTrue('VPROPQ' in inns)
        leig = self.s.subcat("leig")
        self.assertTrue('VLE' in leig)
        self.assertTrue('VDE' in leig)
        obraich = self.s.subcat("obraich")
        self.assertTrue('INTRANS' in obraich)
        ruig = self.s.subcat("ruig")
        self.assertTrue('VAIR' in ruig)
        ruith = self.s.subcat("ruith")
        self.assertFalse('TRANS' in ruith)
        seall = self.s.subcat("seall")
        self.assertTrue('VAIR' in seall)
        smaoinich = self.s.subcat("smaoinich")
        self.assertTrue('VPROP' in smaoinich)
        self.assertTrue('VMU' in smaoinich)
        tachair = self.s.subcat("tachair")
        self.assertTrue('IMPERS' in tachair)
        self.assertTrue('VAIR' in tachair)
        toisich = self.s.subcat("tòisich")
        self.assertTrue('BIPROG', toisich)
        tionndaidh = self.s.subcat("tionndaidh")
        self.assertTrue('VGU' in tionndaidh)