mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-27 02:16:32 +03:00
* Add comment explaining hash_string
This commit is contained in:
parent
815bda201d
commit
bf77bcd6b9
|
@ -13,6 +13,7 @@ SEPARATOR = '\n|-SEP-|\n'
|
||||||
|
|
||||||
|
|
||||||
cpdef hash_t hash_string(unicode string) except 0:
|
cpdef hash_t hash_string(unicode string) except 0:
|
||||||
|
# This should probably use Py_UCS4 API, but I can't in Python2.7
|
||||||
chars = <Py_UNICODE*>string
|
chars = <Py_UNICODE*>string
|
||||||
return hash64(chars, len(string) * sizeof(Py_UNICODE), 0)
|
return hash64(chars, len(string) * sizeof(Py_UNICODE), 0)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user