{"action":"created","issue":{"url":"https://api.github.com/repos/nltk/nltk/issues/1249","repository_url":"https://api.github.com/repos/nltk/nltk","labels_url":"https://api.github.com/repos/nltk/nltk/issues/1249/labels{/name}","comments_url":"https://api.github.com/repos/nltk/nltk/issues/1249/comments","events_url":"https://api.github.com/repos/nltk/nltk/issues/1249/events","html_url":"https://github.com/nltk/nltk/pull/1249","id":126301166,"number":1249,"title":"Use new and shiny Stanford CoreNLP web API","user":{"login":"dimazest","id":885751,"avatar_url":"https://avatars.githubusercontent.com/u/885751?v=3","gravatar_id":"","url":"https://api.github.com/users/dimazest","html_url":"https://github.com/dimazest","followers_url":"https://api.github.com/users/dimazest/followers","following_url":"https://api.github.com/users/dimazest/following{/other_user}","gists_url":"https://api.github.com/users/dimazest/gists{/gist_id}","starred_url":"https://api.github.com/users/dimazest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimazest/subscriptions","organizations_url":"https://api.github.com/users/dimazest/orgs","repos_url":"https://api.github.com/users/dimazest/repos","events_url":"https://api.github.com/users/dimazest/events{/privacy}","received_events_url":"https://api.github.com/users/dimazest/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2016-01-12T23:15:55Z","updated_at":"2016-07-04T05:30:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nltk/nltk/pulls/1249","html_url":"https://github.com/nltk/nltk/pull/1249","diff_url":"https://github.com/nltk/nltk/pull/1249.diff","patch_url":"https://github.com/nltk/nltk/pull/1249.patch"},"body":"This is work in progress. The general idea is to separate code that start a server from one that interacts with it.\r\n\r\nI see a future usage as following\r\n\r\nWith an external server, here connection wraps a requests session, which in turn keeps a pool of connections, so there is no need to start a new connection for every API call.\r\n```python\r\nparser = StanfordParser(url='http://localhost:9000')\r\nparser.parse('John loves Mary.')\r\n```\r\n\r\nWith a server started by NLTK. In this case a server has to be started, jars found. Maybe it's a good idea to use circus arbiter for that https://circus.readthedocs.org/en/latest/for-devs/ or just popen. Here an extra care of port number should be taken as well managing the cases when the server dies.\r\n```python\r\nwith CoreNLPServer() as server:\r\n    parser = StanfordParser(url=server.url)\r\n    parser.parse('John loves Mary.')\r\n```\r\n\r\nComments and ideas are welcome."},"comment":{"url":"https://api.github.com/repos/nltk/nltk/issues/comments/230208054","html_url":"https://github.com/nltk/nltk/pull/1249#issuecomment-230208054","issue_url":"https://api.github.com/repos/nltk/nltk/issues/1249","id":230208054,"user":{"login":"fluhus","id":5978130,"avatar_url":"https://avatars.githubusercontent.com/u/5978130?v=3","gravatar_id":"","url":"https://api.github.com/users/fluhus","html_url":"https://github.com/fluhus","followers_url":"https://api.github.com/users/fluhus/followers","following_url":"https://api.github.com/users/fluhus/following{/other_user}","gists_url":"https://api.github.com/users/fluhus/gists{/gist_id}","starred_url":"https://api.github.com/users/fluhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fluhus/subscriptions","organizations_url":"https://api.github.com/users/fluhus/orgs","repos_url":"https://api.github.com/users/fluhus/repos","events_url":"https://api.github.com/users/fluhus/events{/privacy}","received_events_url":"https://api.github.com/users/fluhus/received_events","type":"User","site_admin":false},"created_at":"2016-07-04T05:30:51Z","updated_at":"2016-07-04T05:30:51Z","body":"Oh, didn't realize I should start a server. Thanks!\r\n\r\nNot sure it's my place to comment, but why expose the inner implementation (the fact that there is a server) to the user? Changing the interface like that will break existing code, wouldn't it?"}}
{"actor":{"display_login":"fluhus"}}