Skip to content
Merged
6 changes: 6 additions & 0 deletions spacy/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
except ImportError:
import copyreg as copy_reg

try:
import Queue as queue
except ImportError:
import queue

is_python2 = six.PY2
is_python3 = six.PY3
Expand All @@ -32,13 +36,15 @@
basestring_ = basestring
input_ = raw_input
json_dumps = lambda data: ujson.dumps(data, indent=2).decode('utf8')
intern = intern

elif is_python3:
bytes_ = bytes
unicode_ = str
basestring_ = str
input_ = input
json_dumps = lambda data: ujson.dumps(data, indent=2)
intern = sys.intern


def symlink_to(orig, dest):
Expand Down
4 changes: 4 additions & 0 deletions spacy/pattern/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# coding: utf-8

from .pattern import DependencyTree
from .parser import PatternParser
Loading