2014-09-11 14:28:38 +04:00
|
|
|
import json
|
|
|
|
|
2014-07-05 22:49:34 +04:00
|
|
|
from fabric.api import local, run, lcd, cd, env
|
|
|
|
|
|
|
|
def make():
|
2014-11-05 12:46:29 +03:00
|
|
|
local('python setup.py build_ext --inplace > /dev/null 2> /tmp/err')
|
|
|
|
|
|
|
|
def vmake():
|
2014-07-05 22:49:34 +04:00
|
|
|
local('python setup.py build_ext --inplace')
|
|
|
|
|
2014-09-11 14:28:38 +04:00
|
|
|
|
2014-11-05 12:46:29 +03:00
|
|
|
|
2014-07-05 22:49:34 +04:00
|
|
|
def clean():
|
|
|
|
local('python setup.py clean --all')
|
|
|
|
|
2014-09-11 14:28:38 +04:00
|
|
|
|
2014-08-20 19:02:32 +04:00
|
|
|
def docs():
|
2014-12-30 15:27:30 +03:00
|
|
|
with lcd('docs'):
|
|
|
|
local('make html')
|
2014-08-20 19:02:32 +04:00
|
|
|
|
2014-07-05 22:49:34 +04:00
|
|
|
def test():
|
|
|
|
local('py.test -x')
|
2014-09-11 14:28:38 +04:00
|
|
|
|
|
|
|
def sbox():
|
|
|
|
local('python sb_setup.py build_ext --inplace')
|
|
|
|
|
|
|
|
def sbclean():
|
|
|
|
local('python sb_setup.py clean --all')
|
|
|
|
|
2014-11-05 12:46:29 +03:00
|
|
|
|
|
|
|
def pos():
|
2014-11-06 20:44:14 +03:00
|
|
|
local('rm -rf data/en/pos')
|
2014-11-05 12:46:29 +03:00
|
|
|
local('python tools/train.py pos ~/work_data/docparse/wsj02-21.conll data/en/pos')
|
|
|
|
local('python tools/tag.py ~/work_data/docparse/wsj22.raw /tmp/tmp')
|
|
|
|
local('python tools/eval_pos.py ~/work_data/docparse/wsj22.conll /tmp/tmp')
|
|
|
|
|
|
|
|
|
|
|
|
def ner():
|
|
|
|
local('rm -rf data/en/ner')
|
2014-11-11 13:10:40 +03:00
|
|
|
local('python tools/train_ner.py ~/work_data/docparse/wsj02-21.conll data/en/ner')
|
|
|
|
local('python tools/tag_ner.py ~/work_data/docparse/wsj22.raw /tmp/tmp')
|
2014-11-06 20:44:14 +03:00
|
|
|
local('python tools/eval_ner.py ~/work_data/docparse/wsj22.conll /tmp/tmp | tail')
|
2014-11-12 15:22:05 +03:00
|
|
|
|
|
|
|
|
|
|
|
def conll():
|
|
|
|
local('rm -rf data/en/ner')
|
|
|
|
local('python tools/conll03_train.py ~/work_data/ner/conll2003/eng.train data/en/ner/')
|
|
|
|
local('python tools/conll03_eval.py ~/work_data/ner/conll2003/eng.testa')
|