From 00ae3edd3ab8b43400e1a4476a32b22b7c9858c4 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Tue, 13 Oct 2015 15:39:52 +1100 Subject: [PATCH] * Fix tests --- tests/website/test_api.py | 4 ++-- tests/website/test_home.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/website/test_api.py b/tests/website/test_api.py index c173c2b74..cfadabc64 100644 --- a/tests/website/test_api.py +++ b/tests/website/test_api.py @@ -40,7 +40,7 @@ def test_entity_spans(nlp): # nlp = English() tokens = nlp('Mr. Best flew to New York on Saturday morning.') ents = list(tokens.ents) - assert ents[0].label == 28061 + assert ents[0].label == 346 assert ents[0].label_ == 'PERSON' assert ents[0].orth_ == 'Best' assert ents[0].string == ents[0].string @@ -66,7 +66,7 @@ def test_count_by(nlp): import numpy from spacy import attrs tokens = nlp('apple apple orange banana') - assert tokens.count_by(attrs.ORTH) == {2529: 2, 4117: 1, 6650: 1} + assert tokens.count_by(attrs.ORTH) == {3699: 2, 3750: 1, 5965: 1} assert repr(tokens.to_array([attrs.ORTH])) == repr(numpy.array([[2529], [2529], [4117], diff --git a/tests/website/test_home.py b/tests/website/test_home.py index 3f7f7ea4c..d03acf855 100644 --- a/tests/website/test_home.py +++ b/tests/website/test_home.py @@ -29,7 +29,7 @@ def test_use_integer_ids_for_any_strings(nlp, token): hello_id = nlp.vocab.strings['Hello'] hello_str = nlp.vocab.strings[hello_id] - assert token.orth == hello_id == 3404 + assert token.orth == hello_id == 3125 assert token.orth_ == hello_str == 'Hello'