{"action":"created","comment":{"url":"https://api.github.com/repos/factorie/factorie/pulls/comments/28611961","id":28611961,"diff_hunk":"@@ -1,15 +1,5 @@\n-/* Copyright 2014.\n-   This file is part of \"FACTORIE\" (Factor graphs, Imperative, Extensible)\n-   http://factorie.cs.umass.edu, http://github.com/factorie\n-   Licensed under the Apache License, Version 2.0 (the \"License\");\n-   you may not use this file except in compliance with the License.\n-   You may obtain a copy of the License at\n-    http://www.apache.org/licenses/LICENSE-2.0\n-   Unless required by applicable law or agreed to in writing, software\n-   distributed under the License is distributed on an \"AS IS\" BASIS,\n-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n-   See the License for the specific language governing permissions and\n-   limitations under the License.\n+/*\n+ * Copyright C 2014, 2015, Oracle and/or its affiliates. All rights reserved. ","path":"src/main/scala/cc/factorie/app/nlp/lexicon/AhoCorasick.scala","position":14,"original_position":14,"commit_id":"d68397b57f500e213add400353922df12cd6adc8","original_commit_id":"d68397b57f500e213add400353922df12cd6adc8","user":{"login":"lvilnis","id":994930,"avatar_url":"https://avatars.githubusercontent.com/u/994930?v=3","gravatar_id":"","url":"https://api.github.com/users/lvilnis","html_url":"https://github.com/lvilnis","followers_url":"https://api.github.com/users/lvilnis/followers","following_url":"https://api.github.com/users/lvilnis/following{/other_user}","gists_url":"https://api.github.com/users/lvilnis/gists{/gist_id}","starred_url":"https://api.github.com/users/lvilnis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lvilnis/subscriptions","organizations_url":"https://api.github.com/users/lvilnis/orgs","repos_url":"https://api.github.com/users/lvilnis/repos","events_url":"https://api.github.com/users/lvilnis/events{/privacy}","received_events_url":"https://api.github.com/users/lvilnis/received_events","type":"User","site_admin":false},"body":"But this file was already in factorie...","created_at":"2015-04-17T17:10:55Z","updated_at":"2015-04-17T17:10:55Z","html_url":"https://github.com/factorie/factorie/pull/275#discussion_r28611961","pull_request_url":"https://api.github.com/repos/factorie/factorie/pulls/275","_links":{"self":{"href":"https://api.github.com/repos/factorie/factorie/pulls/comments/28611961"},"html":{"href":"https://github.com/factorie/factorie/pull/275#discussion_r28611961"},"pull_request":{"href":"https://api.github.com/repos/factorie/factorie/pulls/275"}}},"pull_request":{"url":"https://api.github.com/repos/factorie/factorie/pulls/275","id":33499166,"html_url":"https://github.com/factorie/factorie/pull/275","diff_url":"https://github.com/factorie/factorie/pull/275.diff","patch_url":"https://github.com/factorie/factorie/pull/275.patch","issue_url":"https://api.github.com/repos/factorie/factorie/issues/275","number":275,"state":"open","locked":false,"title":"Memory, speed and synchronization improvements for lexicons","user":{"login":"Craigacp","id":729696,"avatar_url":"https://avatars.githubusercontent.com/u/729696?v=3","gravatar_id":"","url":"https://api.github.com/users/Craigacp","html_url":"https://github.com/Craigacp","followers_url":"https://api.github.com/users/Craigacp/followers","following_url":"https://api.github.com/users/Craigacp/following{/other_user}","gists_url":"https://api.github.com/users/Craigacp/gists{/gist_id}","starred_url":"https://api.github.com/users/Craigacp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Craigacp/subscriptions","organizations_url":"https://api.github.com/users/Craigacp/orgs","repos_url":"https://api.github.com/users/Craigacp/repos","events_url":"https://api.github.com/users/Craigacp/events{/privacy}","received_events_url":"https://api.github.com/users/Craigacp/received_events","type":"User","site_admin":false},"body":"This is the remainder of the commits which reduce the memory requirements and increase the construction speed of the lexicons. The memory requirements are about a third to a half of the current factorie version, and the runtime has improved greatly as it doesn't cause multiple stop the world GC passes during lexicon construction. There are a couple of other improvements to the construction speed as it creates fewer objects now.\r\n\r\nI've added synchronisation to all of the modification operations on a lexicon so it should be safe for multithreading whilst it's being constructed. There is also a method on StackedChainNER which constructs the lexicons a priori, and running that in a single thread before multithreaded computation guarantees that there won't be issues. Similar methods should probably be added to the other NER models (or just a method which constructs all the lexicons on the ResourceLexicon class). Scala's lazy val semantics interacts poorly with multithreading.\r\n\r\nThere are also some style cleanups to make it fit better with other factorie code, and a bugfix for an off by one error in the findMentions method.\r\n\r\nAdam","created_at":"2015-04-16T22:29:39Z","updated_at":"2015-04-17T17:10:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b3d355d1e8632fe51f8bc1e9284df4e212eb4020","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/factorie/factorie/pulls/275/commits","review_comments_url":"https://api.github.com/repos/factorie/factorie/pulls/275/comments","review_comment_url":"https://api.github.com/repos/factorie/factorie/pulls/comments{/number}","comments_url":"https://api.github.com/repos/factorie/factorie/issues/275/comments","statuses_url":"https://api.github.com/repos/factorie/factorie/statuses/d68397b57f500e213add400353922df12cd6adc8","head":{"label":"Craigacp:master","ref":"master","sha":"d68397b57f500e213add400353922df12cd6adc8","user":{"login":"Craigacp","id":729696,"avatar_url":"https://avatars.githubusercontent.com/u/729696?v=3","gravatar_id":"","url":"https://api.github.com/users/Craigacp","html_url":"https://github.com/Craigacp","followers_url":"https://api.github.com/users/Craigacp/followers","following_url":"https://api.github.com/users/Craigacp/following{/other_user}","gists_url":"https://api.github.com/users/Craigacp/gists{/gist_id}","starred_url":"https://api.github.com/users/Craigacp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Craigacp/subscriptions","organizations_url":"https://api.github.com/users/Craigacp/orgs","repos_url":"https://api.github.com/users/Craigacp/repos","events_url":"https://api.github.com/users/Craigacp/events{/privacy}","received_events_url":"https://api.github.com/users/Craigacp/received_events","type":"User","site_admin":false},"repo":{"id":17960617,"name":"factorie","full_name":"Craigacp/factorie","owner":{"login":"Craigacp","id":729696,"avatar_url":"https://avatars.githubusercontent.com/u/729696?v=3","gravatar_id":"","url":"https://api.github.com/users/Craigacp","html_url":"https://github.com/Craigacp","followers_url":"https://api.github.com/users/Craigacp/followers","following_url":"https://api.github.com/users/Craigacp/following{/other_user}","gists_url":"https://api.github.com/users/Craigacp/gists{/gist_id}","starred_url":"https://api.github.com/users/Craigacp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Craigacp/subscriptions","organizations_url":"https://api.github.com/users/Craigacp/orgs","repos_url":"https://api.github.com/users/Craigacp/repos","events_url":"https://api.github.com/users/Craigacp/events{/privacy}","received_events_url":"https://api.github.com/users/Craigacp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Craigacp/factorie","description":"FACTORIE is a toolkit for deployable probabilistic modeling, implemented as a software library in Scala. It provides its users with a succinct language for creating relational factor graphs, estimating parameters and performing inference.","fork":true,"url":"https://api.github.com/repos/Craigacp/factorie","forks_url":"https://api.github.com/repos/Craigacp/factorie/forks","keys_url":"https://api.github.com/repos/Craigacp/factorie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Craigacp/factorie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Craigacp/factorie/teams","hooks_url":"https://api.github.com/repos/Craigacp/factorie/hooks","issue_events_url":"https://api.github.com/repos/Craigacp/factorie/issues/events{/number}","events_url":"https://api.github.com/repos/Craigacp/factorie/events","assignees_url":"https://api.github.com/repos/Craigacp/factorie/assignees{/user}","branches_url":"https://api.github.com/repos/Craigacp/factorie/branches{/branch}","tags_url":"https://api.github.com/repos/Craigacp/factorie/tags","blobs_url":"https://api.github.com/repos/Craigacp/factorie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Craigacp/factorie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Craigacp/factorie/git/refs{/sha}","trees_url":"https://api.github.com/repos/Craigacp/factorie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Craigacp/factorie/statuses/{sha}","languages_url":"https://api.github.com/repos/Craigacp/factorie/languages","stargazers_url":"https://api.github.com/repos/Craigacp/factorie/stargazers","contributors_url":"https://api.github.com/repos/Craigacp/factorie/contributors","subscribers_url":"https://api.github.com/repos/Craigacp/factorie/subscribers","subscription_url":"https://api.github.com/repos/Craigacp/factorie/subscription","commits_url":"https://api.github.com/repos/Craigacp/factorie/commits{/sha}","git_commits_url":"https://api.github.com/repos/Craigacp/factorie/git/commits{/sha}","comments_url":"https://api.github.com/repos/Craigacp/factorie/comments{/number}","issue_comment_url":"https://api.github.com/repos/Craigacp/factorie/issues/comments{/number}","contents_url":"https://api.github.com/repos/Craigacp/factorie/contents/{+path}","compare_url":"https://api.github.com/repos/Craigacp/factorie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Craigacp/factorie/merges","archive_url":"https://api.github.com/repos/Craigacp/factorie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Craigacp/factorie/downloads","issues_url":"https://api.github.com/repos/Craigacp/factorie/issues{/number}","pulls_url":"https://api.github.com/repos/Craigacp/factorie/pulls{/number}","milestones_url":"https://api.github.com/repos/Craigacp/factorie/milestones{/number}","notifications_url":"https://api.github.com/repos/Craigacp/factorie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Craigacp/factorie/labels{/name}","releases_url":"https://api.github.com/repos/Craigacp/factorie/releases{/id}","created_at":"2014-03-20T22:24:44Z","updated_at":"2015-04-16T21:13:00Z","pushed_at":"2015-04-16T21:12:58Z","git_url":"git://github.com/Craigacp/factorie.git","ssh_url":"git@github.com:Craigacp/factorie.git","clone_url":"https://github.com/Craigacp/factorie.git","svn_url":"https://github.com/Craigacp/factorie","homepage":null,"size":39314,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"factorie:master","ref":"master","sha":"296dea705b880fb136781f3bad47ee19786a32fa","user":{"login":"factorie","id":4682625,"avatar_url":"https://avatars.githubusercontent.com/u/4682625?v=3","gravatar_id":"","url":"https://api.github.com/users/factorie","html_url":"https://github.com/factorie","followers_url":"https://api.github.com/users/factorie/followers","following_url":"https://api.github.com/users/factorie/following{/other_user}","gists_url":"https://api.github.com/users/factorie/gists{/gist_id}","starred_url":"https://api.github.com/users/factorie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/factorie/subscriptions","organizations_url":"https://api.github.com/users/factorie/orgs","repos_url":"https://api.github.com/users/factorie/repos","events_url":"https://api.github.com/users/factorie/events{/privacy}","received_events_url":"https://api.github.com/users/factorie/received_events","type":"Organization","site_admin":false},"repo":{"id":10924885,"name":"factorie","full_name":"factorie/factorie","owner":{"login":"factorie","id":4682625,"avatar_url":"https://avatars.githubusercontent.com/u/4682625?v=3","gravatar_id":"","url":"https://api.github.com/users/factorie","html_url":"https://github.com/factorie","followers_url":"https://api.github.com/users/factorie/followers","following_url":"https://api.github.com/users/factorie/following{/other_user}","gists_url":"https://api.github.com/users/factorie/gists{/gist_id}","starred_url":"https://api.github.com/users/factorie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/factorie/subscriptions","organizations_url":"https://api.github.com/users/factorie/orgs","repos_url":"https://api.github.com/users/factorie/repos","events_url":"https://api.github.com/users/factorie/events{/privacy}","received_events_url":"https://api.github.com/users/factorie/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/factorie/factorie","description":"FACTORIE is a toolkit for deployable probabilistic modeling, implemented as a software library in Scala. It provides its users with a succinct language for creating relational factor graphs, estimating parameters and performing inference.","fork":false,"url":"https://api.github.com/repos/factorie/factorie","forks_url":"https://api.github.com/repos/factorie/factorie/forks","keys_url":"https://api.github.com/repos/factorie/factorie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/factorie/factorie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/factorie/factorie/teams","hooks_url":"https://api.github.com/repos/factorie/factorie/hooks","issue_events_url":"https://api.github.com/repos/factorie/factorie/issues/events{/number}","events_url":"https://api.github.com/repos/factorie/factorie/events","assignees_url":"https://api.github.com/repos/factorie/factorie/assignees{/user}","branches_url":"https://api.github.com/repos/factorie/factorie/branches{/branch}","tags_url":"https://api.github.com/repos/factorie/factorie/tags","blobs_url":"https://api.github.com/repos/factorie/factorie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/factorie/factorie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/factorie/factorie/git/refs{/sha}","trees_url":"https://api.github.com/repos/factorie/factorie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/factorie/factorie/statuses/{sha}","languages_url":"https://api.github.com/repos/factorie/factorie/languages","stargazers_url":"https://api.github.com/repos/factorie/factorie/stargazers","contributors_url":"https://api.github.com/repos/factorie/factorie/contributors","subscribers_url":"https://api.github.com/repos/factorie/factorie/subscribers","subscription_url":"https://api.github.com/repos/factorie/factorie/subscription","commits_url":"https://api.github.com/repos/factorie/factorie/commits{/sha}","git_commits_url":"https://api.github.com/repos/factorie/factorie/git/commits{/sha}","comments_url":"https://api.github.com/repos/factorie/factorie/comments{/number}","issue_comment_url":"https://api.github.com/repos/factorie/factorie/issues/comments{/number}","contents_url":"https://api.github.com/repos/factorie/factorie/contents/{+path}","compare_url":"https://api.github.com/repos/factorie/factorie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/factorie/factorie/merges","archive_url":"https://api.github.com/repos/factorie/factorie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/factorie/factorie/downloads","issues_url":"https://api.github.com/repos/factorie/factorie/issues{/number}","pulls_url":"https://api.github.com/repos/factorie/factorie/pulls{/number}","milestones_url":"https://api.github.com/repos/factorie/factorie/milestones{/number}","notifications_url":"https://api.github.com/repos/factorie/factorie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/factorie/factorie/labels{/name}","releases_url":"https://api.github.com/repos/factorie/factorie/releases{/id}","created_at":"2013-06-25T01:21:29Z","updated_at":"2015-04-14T02:55:13Z","pushed_at":"2015-04-16T22:29:40Z","git_url":"git://github.com/factorie/factorie.git","ssh_url":"git@github.com:factorie/factorie.git","clone_url":"https://github.com/factorie/factorie.git","svn_url":"https://github.com/factorie/factorie","homepage":null,"size":50789,"stargazers_count":293,"watchers_count":293,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":78,"mirror_url":null,"open_issues_count":16,"forks":78,"open_issues":16,"watchers":293,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/factorie/factorie/pulls/275"},"html":{"href":"https://github.com/factorie/factorie/pull/275"},"issue":{"href":"https://api.github.com/repos/factorie/factorie/issues/275"},"comments":{"href":"https://api.github.com/repos/factorie/factorie/issues/275/comments"},"review_comments":{"href":"https://api.github.com/repos/factorie/factorie/pulls/275/comments"},"review_comment":{"href":"https://api.github.com/repos/factorie/factorie/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/factorie/factorie/pulls/275/commits"},"statuses":{"href":"https://api.github.com/repos/factorie/factorie/statuses/d68397b57f500e213add400353922df12cd6adc8"}}}}