mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
addressed all comments by Ines
This commit is contained in:
parent
85b4319f33
commit
4ff786e113
|
@ -69,7 +69,10 @@ yet you your yours yourself yourselves
|
|||
""".split()
|
||||
)
|
||||
|
||||
for hyphen in ["'", "`", "‘", "´", "’"]:
|
||||
for stopword in u"n't 'd 'll 'm 're 's 've".split():
|
||||
STOP_WORDS.add(stopword.replace("'", hyphen))
|
||||
contractions = ["n't", "'d", "'ll", "'m", "'re", "'s", "'ve"]
|
||||
STOP_WORDS.update(contractions)
|
||||
|
||||
for apostrophe in ["‘", "’"]:
|
||||
for stopword in contractions:
|
||||
STOP_WORDS.add(stopword.replace("'", apostrophe))
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
# coding: utf8
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import pytest
|
||||
|
||||
from spacy.lang.en import English
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
# coding: utf8
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"word",
|
||||
[
|
||||
u"don't",
|
||||
u"don’t",
|
||||
u"I'd",
|
||||
u"I’d",
|
||||
"don't",
|
||||
"don’t",
|
||||
"I'd",
|
||||
"I’d",
|
||||
],
|
||||
)
|
||||
def test_issue3521(en_tokenizer, word):
|
||||
|
|
Loading…
Reference in New Issue
Block a user