From 4eb5bd02e7640465419ad1a16576d59dab2d11c0 Mon Sep 17 00:00:00 2001 From: ines Date: Fri, 27 Oct 2017 00:32:12 +0200 Subject: [PATCH] Update textcat pre-processing after to_array change --- spacy/_ml.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/spacy/_ml.py b/spacy/_ml.py index 8a8d355d9..4c4e36412 100644 --- a/spacy/_ml.py +++ b/spacy/_ml.py @@ -94,7 +94,6 @@ def _zero_init(model): @layerize def _preprocess_doc(docs, drop=0.): keys = [doc.to_array([LOWER]) for doc in docs] - keys = [a[:, 0] for a in keys] ops = Model.ops lengths = ops.asarray([arr.shape[0] for arr in keys]) keys = ops.xp.concatenate(keys) @@ -521,7 +520,6 @@ def zero_init(model): @layerize def preprocess_doc(docs, drop=0.): keys = [doc.to_array([LOWER]) for doc in docs] - keys = [a[:, 0] for a in keys] ops = Model.ops lengths = ops.asarray([arr.shape[0] for arr in keys]) keys = ops.xp.concatenate(keys)