From 5b2741f75133a8d2299f37091f4fd3e17539b01f Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Mon, 3 Dec 2018 02:12:07 +0100 Subject: [PATCH] Remove unused cytoolz / itertools imports --- examples/training/conllu.py | 1 - spacy/cli/converters/iob2json.py | 4 ++-- spacy/cli/ud/ud_run_test.py | 1 - spacy/cli/ud/ud_train.py | 1 - spacy/gold.pyx | 2 -- spacy/syntax/_parser_model.pyx | 1 - 6 files changed, 2 insertions(+), 8 deletions(-) diff --git a/examples/training/conllu.py b/examples/training/conllu.py index f949a8156..a7745b93a 100644 --- a/examples/training/conllu.py +++ b/examples/training/conllu.py @@ -22,7 +22,6 @@ from spacy.matcher import Matcher import itertools import random import numpy.random -import cytoolz import conll17_ud_eval diff --git a/spacy/cli/converters/iob2json.py b/spacy/cli/converters/iob2json.py index 24e78989b..35dc29bb3 100644 --- a/spacy/cli/converters/iob2json.py +++ b/spacy/cli/converters/iob2json.py @@ -1,7 +1,7 @@ # coding: utf8 from __future__ import unicode_literals -from cytoolz import partition_all +import cytoolz from ...gold import iob_to_biluo @@ -11,7 +11,7 @@ def iob2json(input_data, n_sents=10, *args, **kwargs): Convert IOB files into JSON format for use with train cli. """ docs = [] - for group in partition_all(n_sents, docs): + for group in cytoolz.partition_all(n_sents, docs): group = list(group) first = group.pop(0) to_extend = first["paragraphs"][0]["sentences"] diff --git a/spacy/cli/ud/ud_run_test.py b/spacy/cli/ud/ud_run_test.py index e3771fa92..43140eb03 100644 --- a/spacy/cli/ud/ud_run_test.py +++ b/spacy/cli/ud/ud_run_test.py @@ -30,7 +30,6 @@ Fused_inside = None import itertools import random import numpy.random -import cytoolz from . import conll17_ud_eval diff --git a/spacy/cli/ud/ud_train.py b/spacy/cli/ud/ud_train.py index 746607be0..6c4fbb3eb 100644 --- a/spacy/cli/ud/ud_train.py +++ b/spacy/cli/ud/ud_train.py @@ -25,7 +25,6 @@ from timeit import default_timer as timer import itertools import random import numpy.random -import cytoolz from . import conll17_ud_eval diff --git a/spacy/gold.pyx b/spacy/gold.pyx index 9c0c00652..8bdd42a83 100644 --- a/spacy/gold.pyx +++ b/spacy/gold.pyx @@ -4,8 +4,6 @@ from __future__ import unicode_literals, print_function import re import random -import cytoolz -import itertools import numpy import tempfile import shutil diff --git a/spacy/syntax/_parser_model.pyx b/spacy/syntax/_parser_model.pyx index 9796193f6..f60354be8 100644 --- a/spacy/syntax/_parser_model.pyx +++ b/spacy/syntax/_parser_model.pyx @@ -7,7 +7,6 @@ from __future__ import unicode_literals, print_function from collections import OrderedDict import numpy cimport cython.parallel -import cytoolz import numpy.random cimport numpy as np from libc.math cimport exp