From 3a491093eed839c298e9aefdc3d491b86f54c436 Mon Sep 17 00:00:00 2001 From: greg Date: Mon, 22 Jan 2018 16:46:25 -0500 Subject: [PATCH] Import libcpp.map if libcpp.unordered_map doesn't exist --- spacy/matcher.pyx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spacy/matcher.pyx b/spacy/matcher.pyx index dd8e0b55c..061936105 100644 --- a/spacy/matcher.pyx +++ b/spacy/matcher.pyx @@ -8,12 +8,14 @@ from cymem.cymem cimport Pool from preshed.maps cimport PreshMap from libcpp.vector cimport vector from libcpp.pair cimport pair -from libcpp.unordered_map cimport unordered_map as umap from cython.operator cimport dereference as deref from murmurhash.mrmr cimport hash64 from libc.stdint cimport int32_t -from libc.stdio cimport printf +try: + from libcpp.unordered_map cimport unordered_map as umap +except: + from libcpp.map cimport map as umap from .typedefs cimport attr_t from .typedefs cimport hash_t