From 3ba109622c24bd52f32e605c523249e1c26b0207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Bournhonesque?= Date: Thu, 16 Feb 2017 12:23:27 +0100 Subject: [PATCH] Add regression test with non ' ' space character as token --- spacy/tests/regression/test_issue834.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 spacy/tests/regression/test_issue834.py diff --git a/spacy/tests/regression/test_issue834.py b/spacy/tests/regression/test_issue834.py new file mode 100644 index 000000000..7ed186dfe --- /dev/null +++ b/spacy/tests/regression/test_issue834.py @@ -0,0 +1,14 @@ +# coding: utf-8 + +from io import StringIO + +word2vec_str = """, -0.046107 -0.035951 -0.560418 +de -0.648927 -0.400976 -0.527124 +. 0.113685 0.439990 -0.634510 +  -1.499184 -0.184280 -0.598371""" + + +def test_issue834(en_vocab): + f = StringIO(word2vec_str) + vector_length = en_vocab.load_vectors(f) + assert vector_length == 3