mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-02 19:30:19 +03:00
Correction
This commit is contained in:
parent
c6cf5f2cb4
commit
07b6b53dae
|
@ -2082,7 +2082,7 @@ cdef void _populate_affix_buf(
|
||||||
cdef Py_UCS4 working_wchar
|
cdef Py_UCS4 working_wchar
|
||||||
|
|
||||||
while affix_buf_idx < pref_length and affix_buf_idx < word_len:
|
while affix_buf_idx < pref_length and affix_buf_idx < word_len:
|
||||||
working_wchar = PyUnicode_READ(unicode_byte_width, str_data_ptr, idx)
|
working_wchar = PyUnicode_READ(unicode_byte_width, str_data_ptr, in_word_idx)
|
||||||
if to_lower:
|
if to_lower:
|
||||||
working_wchar = Py_UNICODE_TOLOWER(working_wchar)
|
working_wchar = Py_UNICODE_TOLOWER(working_wchar)
|
||||||
memcpy(affix_buf + affix_buf_idx, &working_wchar, 4)
|
memcpy(affix_buf + affix_buf_idx, &working_wchar, 4)
|
||||||
|
@ -2101,8 +2101,8 @@ cdef void _populate_affix_buf(
|
||||||
# as that's quicker than retrieving it from the input string a second time
|
# as that's quicker than retrieving it from the input string a second time
|
||||||
memcpy(affix_buf + affix_buf_idx, affix_buf + in_word_idx, 4)
|
memcpy(affix_buf + affix_buf_idx, affix_buf + in_word_idx, 4)
|
||||||
else:
|
else:
|
||||||
working_wchar = PyUnicode_READ(unicode_byte_width, str_data_ptr, word_idx + in_word_idx)
|
working_wchar = PyUnicode_READ(unicode_byte_width, str_data_ptr, word_idx + in_word_idx)
|
||||||
if to_lower:
|
if to_lower:
|
||||||
working_wchar = Py_UNICODE_TOLOWER(working_wchar)
|
working_wchar = Py_UNICODE_TOLOWER(working_wchar)
|
||||||
memcpy(affix_buf + affix_buf_idx, &working_wchar, 4)
|
memcpy(affix_buf + affix_buf_idx, &working_wchar, 4)
|
||||||
affix_buf_idx += 1
|
affix_buf_idx += 1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user