2014-09-11 10:28:38 +00:00
|
|
|
import json
|
|
|
|
|
2014-07-05 18:49:34 +00:00
|
|
|
from fabric.api import local, run, lcd, cd, env
|
|
|
|
|
|
|
|
def make():
|
2014-11-05 09:46:29 +00:00
|
|
|
local('python setup.py build_ext --inplace > /dev/null 2> /tmp/err')
|
|
|
|
|
|
|
|
def vmake():
|
2014-07-05 18:49:34 +00:00
|
|
|
local('python setup.py build_ext --inplace')
|
|
|
|
|
2014-09-11 10:28:38 +00:00
|
|
|
|
2014-11-05 09:46:29 +00:00
|
|
|
|
2014-07-05 18:49:34 +00:00
|
|
|
def clean():
|
|
|
|
local('python setup.py clean --all')
|
|
|
|
|
2014-09-11 10:28:38 +00:00
|
|
|
|
2014-08-20 15:02:32 +00:00
|
|
|
def docs():
|
2014-09-11 10:28:38 +00:00
|
|
|
local('sphinx-build -b html docs/ .')
|
|
|
|
|
2014-08-20 15:02:32 +00:00
|
|
|
|
2014-07-05 18:49:34 +00:00
|
|
|
def test():
|
|
|
|
local('py.test -x')
|
2014-09-11 10:28:38 +00:00
|
|
|
|
|
|
|
def sbox():
|
|
|
|
local('python sb_setup.py build_ext --inplace')
|
|
|
|
|
|
|
|
def sbclean():
|
|
|
|
local('python sb_setup.py clean --all')
|
|
|
|
|
2014-11-05 09:46:29 +00:00
|
|
|
|
|
|
|
def pos():
|
|
|
|
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')
|
|
|
|
local('python tools/train.py ner ~/work_data/ner/muc7.train data/en/ner')
|
|
|
|
local('python tools/tag.py ~/work_data/ner/muc7.raw /tmp/ner')
|
|
|
|
local('python tools/eval_ner.py ~/work_data/ner/muc7.dev /tmp/ner')
|