Add script to run the training

This commit is contained in:
Marco Castelluccio 2018-11-20 16:46:25 +01:00
Родитель 5864142b71
Коммит 1f5fa66957
1 изменённых файлов: 16 добавлений и 0 удалений

16
run.py Normal file
Просмотреть файл

@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
import argparse
from bugbug import train
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--lemmatization', help='Perform lemmatization (using spaCy)', action='store_true')
parser.add_argument('--model', nargs='?', help='Path where to store the model file')
args = parser.parse_args()
train.train(model=args.model, lemmatization=args.lemmatization)