mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-12 18:26:30 +03:00
* Test new text and text_with_ws attributes in Token
This commit is contained in:
parent
e9c59693ea
commit
a1292adb82
|
@ -12,6 +12,8 @@ def test_strings(EN):
|
|||
tokens = EN(u'Give it back! He pleaded.')
|
||||
token = tokens[0]
|
||||
assert token.orth_ == 'Give'
|
||||
assert token.text == 'Give'
|
||||
assert token.text_with_ws == 'Give '
|
||||
assert token.lower_ == 'give'
|
||||
assert token.shape_ == 'Xxxx'
|
||||
assert token.prefix_ == 'G'
|
||||
|
@ -33,7 +35,7 @@ def test_flags(EN):
|
|||
|
||||
def test_single_token_string(EN):
|
||||
tokens = EN(u'foobar')
|
||||
assert tokens[0].string == 'foobar'
|
||||
assert tokens[0].text == 'foobar'
|
||||
|
||||
|
||||
def test_is_properties(EN):
|
||||
|
|
Loading…
Reference in New Issue
Block a user