mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-10-31 07:57:35 +03:00 
			
		
		
		
	* Rename external hashing lib, from trustyc to preshed
This commit is contained in:
		
							parent
							
								
									11a346fd5e
								
							
						
					
					
						commit
						096ef2b199
					
				|  | @ -1,6 +1,8 @@ | |||
| cython | ||||
| fabric | ||||
| cymem | ||||
| preshed | ||||
| murmurhash | ||||
| pytest | ||||
| sphinx | ||||
| sphinxcontrib-napoleon | ||||
|  |  | |||
|  | @ -3,7 +3,7 @@ from libc.stdint cimport uint64_t | |||
| from spacy.word cimport Lexeme | ||||
| from spacy.tokens cimport Tokens | ||||
| from spacy.lexeme cimport LexemeC | ||||
| from trustyc.maps cimport PointerMap | ||||
| from preshed.maps cimport PreshMap | ||||
| 
 | ||||
| from cymem.cymem cimport Pool | ||||
| 
 | ||||
|  | @ -30,7 +30,7 @@ cdef class Lexicon: | |||
|     cpdef Lexeme lookup(self, unicode string) | ||||
|     cdef LexemeC* get(self, String* s) except NULL | ||||
|      | ||||
|     cdef PointerMap _dict | ||||
|     cdef PreshMap _dict | ||||
|      | ||||
|     cdef list _string_features | ||||
|     cdef list _flag_features | ||||
|  | @ -39,8 +39,8 @@ cdef class Lexicon: | |||
| cdef class Language: | ||||
|     cdef Pool _mem | ||||
|     cdef unicode name | ||||
|     cdef PointerMap cache | ||||
|     cdef PointerMap specials | ||||
|     cdef PreshMap cache | ||||
|     cdef PreshMap specials | ||||
|     cpdef readonly Lexicon lexicon | ||||
| 
 | ||||
|     cdef object prefix_re | ||||
|  |  | |||
|  | @ -26,7 +26,7 @@ from cython.operator cimport preincrement as preinc | |||
| from cython.operator cimport dereference as deref | ||||
| 
 | ||||
| 
 | ||||
| from trustyc.maps cimport PointerMap | ||||
| from preshed.maps cimport PreshMap | ||||
| from spacy import orth | ||||
| from spacy import util | ||||
| 
 | ||||
|  | @ -130,8 +130,8 @@ cdef class Language: | |||
|     def __cinit__(self, name, user_string_features, user_flag_features): | ||||
|         self.name = name | ||||
|         self._mem = Pool() | ||||
|         self.cache = PointerMap(2 ** 25) | ||||
|         self.specials = PointerMap(2 ** 16) | ||||
|         self.cache = PreshMap(2 ** 25) | ||||
|         self.specials = PreshMap(2 ** 16) | ||||
|         lang_data = util.read_lang_data(name) | ||||
|         rules, prefix, suffix, words, probs, clusters, case_stats, tag_stats = lang_data | ||||
|         self.prefix_re = re.compile(prefix) | ||||
|  | @ -352,7 +352,7 @@ cdef class Lexicon: | |||
|         self._mem = Pool() | ||||
|         self._flag_features = flag_features | ||||
|         self._string_features = string_features | ||||
|         self._dict = PointerMap(2 ** 20) | ||||
|         self._dict = PreshMap(2 ** 20) | ||||
|         self.size = 0 | ||||
|         cdef String string | ||||
|         for uni_string in words: | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user