{"action":"created","issue":{"url":"https://api.github.com/repos/explosion/spaCy/issues/678","repository_url":"https://api.github.com/repos/explosion/spaCy","labels_url":"https://api.github.com/repos/explosion/spaCy/issues/678/labels{/name}","comments_url":"https://api.github.com/repos/explosion/spaCy/issues/678/comments","events_url":"https://api.github.com/repos/explosion/spaCy/issues/678/events","html_url":"https://github.com/explosion/spaCy/issues/678","id":194867946,"number":678,"title":"Bug in IS_STOP function(?)","user":{"login":"sniranjan","id":1933453,"avatar_url":"https://avatars.githubusercontent.com/u/1933453?v=3","gravatar_id":"","url":"https://api.github.com/users/sniranjan","html_url":"https://github.com/sniranjan","followers_url":"https://api.github.com/users/sniranjan/followers","following_url":"https://api.github.com/users/sniranjan/following{/other_user}","gists_url":"https://api.github.com/users/sniranjan/gists{/gist_id}","starred_url":"https://api.github.com/users/sniranjan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sniranjan/subscriptions","organizations_url":"https://api.github.com/users/sniranjan/orgs","repos_url":"https://api.github.com/users/sniranjan/repos","events_url":"https://api.github.com/users/sniranjan/events{/privacy}","received_events_url":"https://api.github.com/users/sniranjan/received_events","type":"User","site_admin":false},"labels":[{"id":111380490,"url":"https://api.github.com/repos/explosion/spaCy/labels/usage","name":"usage","color":"09A3D5","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-12-12T00:11:07Z","updated_at":"2016-12-19T12:29:31Z","closed_at":"2016-12-19T12:29:31Z","body":"I am using the below code to check if a word is a stop word or not. As you can see below, if the try block fails, the IS_STOP function is throwing an error.\r\n\r\n```\r\nimport spacy\r\nnlp = spacy.load('en')\r\ntry:\r\n    print 0/0 #Raise and Exception \r\nexcept:\r\n    print nlp.is_stop('is')\r\n```\r\n\r\nI get the below error:\r\n\r\n```\r\n      5     print 0/0\r\n      6 except:\r\n----> 7     print spacy.load('en').is_stop('is')\r\nAttributeError: 'English' object has no attribute 'is_stop'\r\n```\r\nI am using Spacy 1.3.0 on Windows (Python 2.7)"},"comment":{"url":"https://api.github.com/repos/explosion/spaCy/issues/comments/267953044","html_url":"https://github.com/explosion/spaCy/issues/678#issuecomment-267953044","issue_url":"https://api.github.com/repos/explosion/spaCy/issues/678","id":267953044,"user":{"login":"honnibal","id":8059750,"avatar_url":"https://avatars.githubusercontent.com/u/8059750?v=3","gravatar_id":"","url":"https://api.github.com/users/honnibal","html_url":"https://github.com/honnibal","followers_url":"https://api.github.com/users/honnibal/followers","following_url":"https://api.github.com/users/honnibal/following{/other_user}","gists_url":"https://api.github.com/users/honnibal/gists{/gist_id}","starred_url":"https://api.github.com/users/honnibal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/honnibal/subscriptions","organizations_url":"https://api.github.com/users/honnibal/orgs","repos_url":"https://api.github.com/users/honnibal/repos","events_url":"https://api.github.com/users/honnibal/events{/privacy}","received_events_url":"https://api.github.com/users/honnibal/received_events","type":"User","site_admin":false},"created_at":"2016-12-19T12:29:30Z","updated_at":"2016-12-19T12:29:30Z","body":"That use of `is_stop` was always undocumented. The main way to find stop words is on the tokens or vocab words, using the `token.is_stop` or `lexeme.is_stop` attributes:\r\n\r\n```python\r\n\r\nimport spacy\r\n\r\nnlp = spacy.load('en')\r\n\r\ndoc = nlp(u'Which of these are stop words?')\r\nfor word in doc:\r\n    print(word.text, word.is_stop)\r\n```\r\n\r\nIf you need the stop list itself, it can now be found in `spacy.en.language_data.STOP_WORDS`."}}
{"actor":{"display_login":"honnibal"}}