From 7400c7f8a7eefe171602d6e5f148b82eef6d0693 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Wed, 20 Mar 2019 01:19:34 +0100 Subject: [PATCH] Move UD scripts to bin --- {spacy/cli => bin}/ud/__init__.py | 0 {spacy/cli => bin}/ud/conll17_ud_eval.py | 0 {spacy/cli => bin}/ud/run_eval.py | 0 {spacy/cli => bin}/ud/ud_run_test.py | 22 +++++++++++----------- {spacy/cli => bin}/ud/ud_train.py | 18 +++++++++--------- spacy/cli/__init__.py | 1 - 6 files changed, 20 insertions(+), 21 deletions(-) rename {spacy/cli => bin}/ud/__init__.py (100%) rename {spacy/cli => bin}/ud/conll17_ud_eval.py (100%) rename {spacy/cli => bin}/ud/run_eval.py (100%) rename {spacy/cli => bin}/ud/ud_run_test.py (96%) rename {spacy/cli => bin}/ud/ud_train.py (98%) diff --git a/spacy/cli/ud/__init__.py b/bin/ud/__init__.py similarity index 100% rename from spacy/cli/ud/__init__.py rename to bin/ud/__init__.py diff --git a/spacy/cli/ud/conll17_ud_eval.py b/bin/ud/conll17_ud_eval.py similarity index 100% rename from spacy/cli/ud/conll17_ud_eval.py rename to bin/ud/conll17_ud_eval.py diff --git a/spacy/cli/ud/run_eval.py b/bin/ud/run_eval.py similarity index 100% rename from spacy/cli/ud/run_eval.py rename to bin/ud/run_eval.py diff --git a/spacy/cli/ud/ud_run_test.py b/bin/ud/ud_run_test.py similarity index 96% rename from spacy/cli/ud/ud_run_test.py rename to bin/ud/ud_run_test.py index 35c878721..b6307f799 100644 --- a/spacy/cli/ud/ud_run_test.py +++ b/bin/ud/ud_run_test.py @@ -13,14 +13,14 @@ import srsly import spacy import spacy.util -from ...tokens import Token, Doc -from ...gold import GoldParse -from ...util import compounding, minibatch_by_words -from ...syntax.nonproj import projectivize -from ...matcher import Matcher +from spacy.tokens import Token, Doc +from spacy.gold import GoldParse +from spacy.util import compounding, minibatch_by_words +from spacy.syntax.nonproj import projectivize +from spacy.matcher import Matcher -# from ...morphology import Fused_begin, Fused_inside -from ... import displacy +# from spacy.morphology import Fused_begin, Fused_inside +from spacy import displacy from collections import defaultdict, Counter from timeit import default_timer as timer @@ -33,10 +33,10 @@ import numpy.random from . import conll17_ud_eval -from ... import lang -from ...lang import zh -from ...lang import ja -from ...lang import ru +from spacy import lang +from spacy.lang import zh +from spacy.lang import ja +from spacy.lang import ru ################ diff --git a/spacy/cli/ud/ud_train.py b/bin/ud/ud_train.py similarity index 98% rename from spacy/cli/ud/ud_train.py rename to bin/ud/ud_train.py index 563fcfb87..0600ab0ff 100644 --- a/spacy/cli/ud/ud_train.py +++ b/bin/ud/ud_train.py @@ -13,12 +13,12 @@ import json import spacy import spacy.util -from ...tokens import Token, Doc -from ...gold import GoldParse -from ...util import compounding, minibatch, minibatch_by_words -from ...syntax.nonproj import projectivize -from ...matcher import Matcher -from ... import displacy +from spacy.tokens import Token, Doc +from spacy.gold import GoldParse +from spacy.util import compounding, minibatch, minibatch_by_words +from spacy.syntax.nonproj import projectivize +from spacy.matcher import Matcher +from spacy import displacy from collections import defaultdict, Counter from timeit import default_timer as timer @@ -28,9 +28,9 @@ import numpy.random from . import conll17_ud_eval -from ... import lang -from ...lang import zh -from ...lang import ja +from spacy import lang +from spacy.lang import zh +from spacy.lang import ja try: import torch diff --git a/spacy/cli/__init__.py b/spacy/cli/__init__.py index 4ab1c7c55..778453711 100644 --- a/spacy/cli/__init__.py +++ b/spacy/cli/__init__.py @@ -10,4 +10,3 @@ from .evaluate import evaluate # noqa: F401 from .convert import convert # noqa: F401 from .init_model import init_model # noqa: F401 from .validate import validate # noqa: F401 -from .ud import ud_train, ud_evaluate # noqa: F401