{"action":"created","comment":{"url":"https://api.github.com/repos/biolab/orange3-text/pulls/comments/60591704","id":60591704,"diff_hunk":"@@ -100,6 +100,22 @@ def extend_corpus(self, metadata, Y):\n         self.X = self.W = np.zeros((len(self), 0))\n         Table._init_ids(self)\n \n+    def update_attributes(self, X, dictionary):\n+        \"\"\"\n+        Adds X to the corpus and updates its domain accordingly.\n+        \"\"\"\n+        self.X = np.hstack((self.X, X))\n+\n+        dict_key_count = len(sorted(dictionary.keys()))\n+        features = [dictionary[key] for key in range(dict_key_count)]\n+        attr = [ContinuousVariable.make(f) for f in features]\n+        new_domain = Domain(\n+                attributes=attr,","path":"orangecontrib/text/corpus.py","position":23,"original_position":23,"commit_id":"4ea45e3f2b738e445e6b41dae216f31f25b17b67","original_commit_id":"4ea45e3f2b738e445e6b41dae216f31f25b17b67","user":{"login":"nikicc","id":713026,"avatar_url":"https://avatars.githubusercontent.com/u/713026?v=3","gravatar_id":"","url":"https://api.github.com/users/nikicc","html_url":"https://github.com/nikicc","followers_url":"https://api.github.com/users/nikicc/followers","following_url":"https://api.github.com/users/nikicc/following{/other_user}","gists_url":"https://api.github.com/users/nikicc/gists{/gist_id}","starred_url":"https://api.github.com/users/nikicc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikicc/subscriptions","organizations_url":"https://api.github.com/users/nikicc/orgs","repos_url":"https://api.github.com/users/nikicc/repos","events_url":"https://api.github.com/users/nikicc/events{/privacy}","received_events_url":"https://api.github.com/users/nikicc/received_events","type":"User","site_admin":false},"body":"If the user construct two consecutive BoW widgets on purpose than that is what he/she should receive. I do not know why this could be useful, but I still think that it is worse if we delete user-provided features and just replace them with BoW.","created_at":"2016-04-21T14:38:06Z","updated_at":"2016-04-21T14:38:06Z","html_url":"https://github.com/biolab/orange3-text/pull/49#discussion_r60591704","pull_request_url":"https://api.github.com/repos/biolab/orange3-text/pulls/49","_links":{"self":{"href":"https://api.github.com/repos/biolab/orange3-text/pulls/comments/60591704"},"html":{"href":"https://github.com/biolab/orange3-text/pull/49#discussion_r60591704"},"pull_request":{"href":"https://api.github.com/repos/biolab/orange3-text/pulls/49"}}},"pull_request":{"url":"https://api.github.com/repos/biolab/orange3-text/pulls/49","id":66540341,"html_url":"https://github.com/biolab/orange3-text/pull/49","diff_url":"https://github.com/biolab/orange3-text/pull/49.diff","patch_url":"https://github.com/biolab/orange3-text/pull/49.patch","issue_url":"https://api.github.com/repos/biolab/orange3-text/issues/49","number":49,"state":"open","locked":false,"title":"BagOfWords","user":{"login":"david-novak","id":8188862,"avatar_url":"https://avatars.githubusercontent.com/u/8188862?v=3","gravatar_id":"","url":"https://api.github.com/users/david-novak","html_url":"https://github.com/david-novak","followers_url":"https://api.github.com/users/david-novak/followers","following_url":"https://api.github.com/users/david-novak/following{/other_user}","gists_url":"https://api.github.com/users/david-novak/gists{/gist_id}","starred_url":"https://api.github.com/users/david-novak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-novak/subscriptions","organizations_url":"https://api.github.com/users/david-novak/orgs","repos_url":"https://api.github.com/users/david-novak/repos","events_url":"https://api.github.com/users/david-novak/events{/privacy}","received_events_url":"https://api.github.com/users/david-novak/received_events","type":"User","site_admin":false},"body":"Updated the Bag Of Words widget, so it can be used with the current text mining workflow.","created_at":"2016-04-14T19:29:52Z","updated_at":"2016-04-21T14:38:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"30a68f9a81b594776d5454118d62ef27482fe377","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/biolab/orange3-text/pulls/49/commits","review_comments_url":"https://api.github.com/repos/biolab/orange3-text/pulls/49/comments","review_comment_url":"https://api.github.com/repos/biolab/orange3-text/pulls/comments{/number}","comments_url":"https://api.github.com/repos/biolab/orange3-text/issues/49/comments","statuses_url":"https://api.github.com/repos/biolab/orange3-text/statuses/4ea45e3f2b738e445e6b41dae216f31f25b17b67","head":{"label":"david-novak:bagofwords","ref":"bagofwords","sha":"4ea45e3f2b738e445e6b41dae216f31f25b17b67","user":{"login":"david-novak","id":8188862,"avatar_url":"https://avatars.githubusercontent.com/u/8188862?v=3","gravatar_id":"","url":"https://api.github.com/users/david-novak","html_url":"https://github.com/david-novak","followers_url":"https://api.github.com/users/david-novak/followers","following_url":"https://api.github.com/users/david-novak/following{/other_user}","gists_url":"https://api.github.com/users/david-novak/gists{/gist_id}","starred_url":"https://api.github.com/users/david-novak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-novak/subscriptions","organizations_url":"https://api.github.com/users/david-novak/orgs","repos_url":"https://api.github.com/users/david-novak/repos","events_url":"https://api.github.com/users/david-novak/events{/privacy}","received_events_url":"https://api.github.com/users/david-novak/received_events","type":"User","site_admin":false},"repo":{"id":38234383,"name":"orange3-text","full_name":"david-novak/orange3-text","owner":{"login":"david-novak","id":8188862,"avatar_url":"https://avatars.githubusercontent.com/u/8188862?v=3","gravatar_id":"","url":"https://api.github.com/users/david-novak","html_url":"https://github.com/david-novak","followers_url":"https://api.github.com/users/david-novak/followers","following_url":"https://api.github.com/users/david-novak/following{/other_user}","gists_url":"https://api.github.com/users/david-novak/gists{/gist_id}","starred_url":"https://api.github.com/users/david-novak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-novak/subscriptions","organizations_url":"https://api.github.com/users/david-novak/orgs","repos_url":"https://api.github.com/users/david-novak/repos","events_url":"https://api.github.com/users/david-novak/events{/privacy}","received_events_url":"https://api.github.com/users/david-novak/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/david-novak/orange3-text","description":"Text Mining Addon for Orange3","fork":true,"url":"https://api.github.com/repos/david-novak/orange3-text","forks_url":"https://api.github.com/repos/david-novak/orange3-text/forks","keys_url":"https://api.github.com/repos/david-novak/orange3-text/keys{/key_id}","collaborators_url":"https://api.github.com/repos/david-novak/orange3-text/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/david-novak/orange3-text/teams","hooks_url":"https://api.github.com/repos/david-novak/orange3-text/hooks","issue_events_url":"https://api.github.com/repos/david-novak/orange3-text/issues/events{/number}","events_url":"https://api.github.com/repos/david-novak/orange3-text/events","assignees_url":"https://api.github.com/repos/david-novak/orange3-text/assignees{/user}","branches_url":"https://api.github.com/repos/david-novak/orange3-text/branches{/branch}","tags_url":"https://api.github.com/repos/david-novak/orange3-text/tags","blobs_url":"https://api.github.com/repos/david-novak/orange3-text/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/david-novak/orange3-text/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/david-novak/orange3-text/git/refs{/sha}","trees_url":"https://api.github.com/repos/david-novak/orange3-text/git/trees{/sha}","statuses_url":"https://api.github.com/repos/david-novak/orange3-text/statuses/{sha}","languages_url":"https://api.github.com/repos/david-novak/orange3-text/languages","stargazers_url":"https://api.github.com/repos/david-novak/orange3-text/stargazers","contributors_url":"https://api.github.com/repos/david-novak/orange3-text/contributors","subscribers_url":"https://api.github.com/repos/david-novak/orange3-text/subscribers","subscription_url":"https://api.github.com/repos/david-novak/orange3-text/subscription","commits_url":"https://api.github.com/repos/david-novak/orange3-text/commits{/sha}","git_commits_url":"https://api.github.com/repos/david-novak/orange3-text/git/commits{/sha}","comments_url":"https://api.github.com/repos/david-novak/orange3-text/comments{/number}","issue_comment_url":"https://api.github.com/repos/david-novak/orange3-text/issues/comments{/number}","contents_url":"https://api.github.com/repos/david-novak/orange3-text/contents/{+path}","compare_url":"https://api.github.com/repos/david-novak/orange3-text/compare/{base}...{head}","merges_url":"https://api.github.com/repos/david-novak/orange3-text/merges","archive_url":"https://api.github.com/repos/david-novak/orange3-text/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/david-novak/orange3-text/downloads","issues_url":"https://api.github.com/repos/david-novak/orange3-text/issues{/number}","pulls_url":"https://api.github.com/repos/david-novak/orange3-text/pulls{/number}","milestones_url":"https://api.github.com/repos/david-novak/orange3-text/milestones{/number}","notifications_url":"https://api.github.com/repos/david-novak/orange3-text/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/david-novak/orange3-text/labels{/name}","releases_url":"https://api.github.com/repos/david-novak/orange3-text/releases{/id}","deployments_url":"https://api.github.com/repos/david-novak/orange3-text/deployments","created_at":"2015-06-29T07:44:21Z","updated_at":"2016-03-14T20:54:23Z","pushed_at":"2016-04-17T19:32:41Z","git_url":"git://github.com/david-novak/orange3-text.git","ssh_url":"git@github.com:david-novak/orange3-text.git","clone_url":"https://github.com/david-novak/orange3-text.git","svn_url":"https://github.com/david-novak/orange3-text","homepage":null,"size":24369,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"biolab:master","ref":"master","sha":"eca3129e354f0e1c676bec7c31d394eb3d509435","user":{"login":"biolab","id":555189,"avatar_url":"https://avatars.githubusercontent.com/u/555189?v=3","gravatar_id":"","url":"https://api.github.com/users/biolab","html_url":"https://github.com/biolab","followers_url":"https://api.github.com/users/biolab/followers","following_url":"https://api.github.com/users/biolab/following{/other_user}","gists_url":"https://api.github.com/users/biolab/gists{/gist_id}","starred_url":"https://api.github.com/users/biolab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biolab/subscriptions","organizations_url":"https://api.github.com/users/biolab/orgs","repos_url":"https://api.github.com/users/biolab/repos","events_url":"https://api.github.com/users/biolab/events{/privacy}","received_events_url":"https://api.github.com/users/biolab/received_events","type":"Organization","site_admin":false},"repo":{"id":38108816,"name":"orange3-text","full_name":"biolab/orange3-text","owner":{"login":"biolab","id":555189,"avatar_url":"https://avatars.githubusercontent.com/u/555189?v=3","gravatar_id":"","url":"https://api.github.com/users/biolab","html_url":"https://github.com/biolab","followers_url":"https://api.github.com/users/biolab/followers","following_url":"https://api.github.com/users/biolab/following{/other_user}","gists_url":"https://api.github.com/users/biolab/gists{/gist_id}","starred_url":"https://api.github.com/users/biolab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biolab/subscriptions","organizations_url":"https://api.github.com/users/biolab/orgs","repos_url":"https://api.github.com/users/biolab/repos","events_url":"https://api.github.com/users/biolab/events{/privacy}","received_events_url":"https://api.github.com/users/biolab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/biolab/orange3-text","description":"Text Mining add-on for Orange3","fork":false,"url":"https://api.github.com/repos/biolab/orange3-text","forks_url":"https://api.github.com/repos/biolab/orange3-text/forks","keys_url":"https://api.github.com/repos/biolab/orange3-text/keys{/key_id}","collaborators_url":"https://api.github.com/repos/biolab/orange3-text/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/biolab/orange3-text/teams","hooks_url":"https://api.github.com/repos/biolab/orange3-text/hooks","issue_events_url":"https://api.github.com/repos/biolab/orange3-text/issues/events{/number}","events_url":"https://api.github.com/repos/biolab/orange3-text/events","assignees_url":"https://api.github.com/repos/biolab/orange3-text/assignees{/user}","branches_url":"https://api.github.com/repos/biolab/orange3-text/branches{/branch}","tags_url":"https://api.github.com/repos/biolab/orange3-text/tags","blobs_url":"https://api.github.com/repos/biolab/orange3-text/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/biolab/orange3-text/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/biolab/orange3-text/git/refs{/sha}","trees_url":"https://api.github.com/repos/biolab/orange3-text/git/trees{/sha}","statuses_url":"https://api.github.com/repos/biolab/orange3-text/statuses/{sha}","languages_url":"https://api.github.com/repos/biolab/orange3-text/languages","stargazers_url":"https://api.github.com/repos/biolab/orange3-text/stargazers","contributors_url":"https://api.github.com/repos/biolab/orange3-text/contributors","subscribers_url":"https://api.github.com/repos/biolab/orange3-text/subscribers","subscription_url":"https://api.github.com/repos/biolab/orange3-text/subscription","commits_url":"https://api.github.com/repos/biolab/orange3-text/commits{/sha}","git_commits_url":"https://api.github.com/repos/biolab/orange3-text/git/commits{/sha}","comments_url":"https://api.github.com/repos/biolab/orange3-text/comments{/number}","issue_comment_url":"https://api.github.com/repos/biolab/orange3-text/issues/comments{/number}","contents_url":"https://api.github.com/repos/biolab/orange3-text/contents/{+path}","compare_url":"https://api.github.com/repos/biolab/orange3-text/compare/{base}...{head}","merges_url":"https://api.github.com/repos/biolab/orange3-text/merges","archive_url":"https://api.github.com/repos/biolab/orange3-text/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/biolab/orange3-text/downloads","issues_url":"https://api.github.com/repos/biolab/orange3-text/issues{/number}","pulls_url":"https://api.github.com/repos/biolab/orange3-text/pulls{/number}","milestones_url":"https://api.github.com/repos/biolab/orange3-text/milestones{/number}","notifications_url":"https://api.github.com/repos/biolab/orange3-text/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/biolab/orange3-text/labels{/name}","releases_url":"https://api.github.com/repos/biolab/orange3-text/releases{/id}","deployments_url":"https://api.github.com/repos/biolab/orange3-text/deployments","created_at":"2015-06-26T12:02:06Z","updated_at":"2016-03-30T21:14:09Z","pushed_at":"2016-04-18T09:17:08Z","git_url":"git://github.com/biolab/orange3-text.git","ssh_url":"git@github.com:biolab/orange3-text.git","clone_url":"https://github.com/biolab/orange3-text.git","svn_url":"https://github.com/biolab/orange3-text","homepage":"","size":24406,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":7,"forks":13,"open_issues":7,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/biolab/orange3-text/pulls/49"},"html":{"href":"https://github.com/biolab/orange3-text/pull/49"},"issue":{"href":"https://api.github.com/repos/biolab/orange3-text/issues/49"},"comments":{"href":"https://api.github.com/repos/biolab/orange3-text/issues/49/comments"},"review_comments":{"href":"https://api.github.com/repos/biolab/orange3-text/pulls/49/comments"},"review_comment":{"href":"https://api.github.com/repos/biolab/orange3-text/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/biolab/orange3-text/pulls/49/commits"},"statuses":{"href":"https://api.github.com/repos/biolab/orange3-text/statuses/4ea45e3f2b738e445e6b41dae216f31f25b17b67"}}}}