Exemplo n.º 1
0
def test():
    print 'Testing...'
    devset = relation.load_relation('rel-testset.gold', 'parsed-files')
    for label in relation.LABELS:
        print label
        relation.generate_svmtk_file('test', label, devset)
        relation.call_svm_light_tk('classify', 'test.' + label + '.txt', label + '.model')
Exemplo n.º 2
0
def train():
    print 'Training...'
    trainset = relation.load_relation('rel-trainset.gold', 'parsed-files')
    for label in relation.LABELS:
        print label
        relation.generate_svmtk_file('train', label, trainset)
        relation.call_svm_light_tk('learn', 'train.' + label + '.txt', label + '.model')