mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-13 10:46:29 +03:00
Fix formatting
This commit is contained in:
parent
2e72683baa
commit
34c47bb20d
|
@ -2,6 +2,7 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
import pytest
|
||||
|
||||
from ...en import English
|
||||
|
||||
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
# coding: utf-8
|
||||
"""Test that token.idx correctly computes index into the original string."""
|
||||
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
def test_simple_punct(en_tokenizer):
|
||||
text = 'to walk, do foo'
|
||||
text = "to walk, do foo"
|
||||
tokens = en_tokenizer(text)
|
||||
assert tokens[0].idx == 0
|
||||
assert tokens[1].idx == 3
|
||||
|
@ -17,7 +18,7 @@ def test_simple_punct(en_tokenizer):
|
|||
|
||||
|
||||
def test_complex_punct(en_tokenizer):
|
||||
text = 'Tom (D., Ill.)!'
|
||||
text = "Tom (D., Ill.)!"
|
||||
tokens = en_tokenizer(text)
|
||||
assert tokens[0].idx == 0
|
||||
assert len(tokens[0]) == 3
|
||||
|
|
Loading…
Reference in New Issue
Block a user