From f19af6cb2c5e340417cd9ac41c2137299bf9df96 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sat, 24 Sep 2016 22:08:43 +0200 Subject: [PATCH] Python 3 compatible basestring --- spacy/util.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spacy/util.py b/spacy/util.py index 1e48e5840..fb6788b98 100644 --- a/spacy/util.py +++ b/spacy/util.py @@ -8,6 +8,10 @@ import pathlib import six from .attrs import TAG, HEAD, DEP, ENT_IOB, ENT_TYPE +try: + basestring +except NameError: + basestring = str LANGUAGES = {} _data_path = pathlib.Path(__file__).parent / 'data'