{"action":"opened","issue":{"url":"https://api.github.com/repos/explosion/spaCy/issues/2638","repository_url":"https://api.github.com/repos/explosion/spaCy","labels_url":"https://api.github.com/repos/explosion/spaCy/issues/2638/labels{/name}","comments_url":"https://api.github.com/repos/explosion/spaCy/issues/2638/comments","events_url":"https://api.github.com/repos/explosion/spaCy/issues/2638/events","html_url":"https://github.com/explosion/spaCy/issues/2638","id":348173478,"node_id":"MDU6SXNzdWUzNDgxNzM0Nzg=","number":2638,"title":"Space symbol at the end of the token when using token.string","user":{"login":"prokopevaleksey","id":8290813,"node_id":"MDQ6VXNlcjgyOTA4MTM=","avatar_url":"https://avatars2.githubusercontent.com/u/8290813?v=4","gravatar_id":"","url":"https://api.github.com/users/prokopevaleksey","html_url":"https://github.com/prokopevaleksey","followers_url":"https://api.github.com/users/prokopevaleksey/followers","following_url":"https://api.github.com/users/prokopevaleksey/following{/other_user}","gists_url":"https://api.github.com/users/prokopevaleksey/gists{/gist_id}","starred_url":"https://api.github.com/users/prokopevaleksey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prokopevaleksey/subscriptions","organizations_url":"https://api.github.com/users/prokopevaleksey/orgs","repos_url":"https://api.github.com/users/prokopevaleksey/repos","events_url":"https://api.github.com/users/prokopevaleksey/events{/privacy}","received_events_url":"https://api.github.com/users/prokopevaleksey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-07T05:35:24Z","updated_at":"2018-08-07T05:35:24Z","closed_at":null,"author_association":"NONE","body":"When I use `token.string` I sometimes end up with a space symbol at the end of returned string. However, when I use `str(token)` everything seems to be fine. This can be reproduced on a simple example show below.\r\n\r\n## How to reproduce the behaviour\r\n<!-- Include a code example or the steps that led to the problem. Please try to be as specific as possible. -->\r\n`[token.string for token in nlp('So i can go out and play.')]`\r\n`['So ', 'i ', 'can ', 'go ', 'out ', 'and ', 'play', '.']`\r\n\r\n`[str(token) for token in nlp('So i can go out and play.')]`\r\n`['So', 'i', 'can', 'go', 'out', 'and', 'play', '.']`\r\n\r\n## Your Environment\r\n<!-- Include details of your environment. If you're using spaCy 1.7+, you can also type `python -m spacy info --markdown` and copy-paste the result here.-->* **spaCy version:** 2.0.11\r\n* **Platform:** Linux-4.15.0-29-generic-x86_64-with-debian-stretch-sid\r\n* **Python version:** 3.6.5\r\n* **Models:** en_core_web_sm, en_core_web_lg, en_vectors_web_lg, en_core_web_md"}}
{"actor":{"display_login":"prokopevaleksey"}}