mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
* Add train function to fabfile
This commit is contained in:
parent
baff0f8ad8
commit
ed8942a096
13
fabfile.py
vendored
13
fabfile.py
vendored
|
@ -56,6 +56,19 @@ def test():
|
||||||
local('py.test -x')
|
local('py.test -x')
|
||||||
|
|
||||||
|
|
||||||
|
def train(train_loc=None, dev_loc=None, model_dir=None):
|
||||||
|
if train_loc is None:
|
||||||
|
train_loc = 'corpora/en/ym.wsj02-21.conll'
|
||||||
|
if dev_loc is None:
|
||||||
|
dev_loc = 'corpora/en/ym.wsj24.conll'
|
||||||
|
if model_dir is None:
|
||||||
|
model_dir = 'models/en/'
|
||||||
|
with virtualenv(VENV_DIR):
|
||||||
|
with lcd(path.dirname(__file__)):
|
||||||
|
local('python bin/init_model.py lang_data/en/ corpora/en/ ' + model_dir)
|
||||||
|
local('python bin/parser/train.py %s %s %s' % (train_loc, dev_loc, model_dir))
|
||||||
|
|
||||||
|
|
||||||
def travis():
|
def travis():
|
||||||
local('open https://travis-ci.org/honnibal/thinc')
|
local('open https://travis-ci.org/honnibal/thinc')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user