{"action":"created","comment":{"url":"https://api.github.com/repos/opencog/atomspace/pulls/comments/40426944","id":40426944,"diff_hunk":"@@ -304,4 +304,58 @@ HandleSeq get_predicates_for(const Handle& target,\n     return answer;\n }\n \n+bool are_similar(const Handle& h1, const Handle& h2,bool strict_type_match)\n+{\n+    if (h1 == h2) return true;\n+\n+    if (NodeCast(h1) and NodeCast(h2)) {\n+        if (strict_type_match and (h1->getType() != h2->getType()) )\n+            return false;\n+        else\n+            return true;\n+    }\n+\n+    LinkPtr lh1(LinkCast(h1));\n+    LinkPtr lh2(LinkCast(h2));\n+\n+    if (lh1 and lh2) {\n+        if(strict_type_match and (lh1->getType() != lh2->getType()))\n+        {\n+         return false;","path":"opencog/atomutils/AtomUtils.cc","position":21,"original_position":21,"commit_id":"033fc70eddbf4ffd9c04690aa6031c120b666e48","original_commit_id":"033fc70eddbf4ffd9c04690aa6031c120b666e48","user":{"login":"ngeiswei","id":819225,"avatar_url":"https://avatars.githubusercontent.com/u/819225?v=3","gravatar_id":"","url":"https://api.github.com/users/ngeiswei","html_url":"https://github.com/ngeiswei","followers_url":"https://api.github.com/users/ngeiswei/followers","following_url":"https://api.github.com/users/ngeiswei/following{/other_user}","gists_url":"https://api.github.com/users/ngeiswei/gists{/gist_id}","starred_url":"https://api.github.com/users/ngeiswei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngeiswei/subscriptions","organizations_url":"https://api.github.com/users/ngeiswei/orgs","repos_url":"https://api.github.com/users/ngeiswei/repos","events_url":"https://api.github.com/users/ngeiswei/events{/privacy}","received_events_url":"https://api.github.com/users/ngeiswei/received_events","type":"User","site_admin":false},"body":"Maybe it's time to invest in a real editor (emacs, vim, etc). :-)","created_at":"2015-09-25T13:06:56Z","updated_at":"2015-09-25T13:06:56Z","html_url":"https://github.com/opencog/atomspace/pull/334#discussion_r40426944","pull_request_url":"https://api.github.com/repos/opencog/atomspace/pulls/334","_links":{"self":{"href":"https://api.github.com/repos/opencog/atomspace/pulls/comments/40426944"},"html":{"href":"https://github.com/opencog/atomspace/pull/334#discussion_r40426944"},"pull_request":{"href":"https://api.github.com/repos/opencog/atomspace/pulls/334"}}},"pull_request":{"url":"https://api.github.com/repos/opencog/atomspace/pulls/334","id":46002691,"html_url":"https://github.com/opencog/atomspace/pull/334","diff_url":"https://github.com/opencog/atomspace/pull/334.diff","patch_url":"https://github.com/opencog/atomspace/pull/334.patch","issue_url":"https://api.github.com/repos/opencog/atomspace/issues/334","number":334,"state":"open","locked":false,"title":"Extension to AtomUtils","user":{"login":"misgeatgit","id":2872565,"avatar_url":"https://avatars.githubusercontent.com/u/2872565?v=3","gravatar_id":"","url":"https://api.github.com/users/misgeatgit","html_url":"https://github.com/misgeatgit","followers_url":"https://api.github.com/users/misgeatgit/followers","following_url":"https://api.github.com/users/misgeatgit/following{/other_user}","gists_url":"https://api.github.com/users/misgeatgit/gists{/gist_id}","starred_url":"https://api.github.com/users/misgeatgit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/misgeatgit/subscriptions","organizations_url":"https://api.github.com/users/misgeatgit/orgs","repos_url":"https://api.github.com/users/misgeatgit/repos","events_url":"https://api.github.com/users/misgeatgit/events{/privacy}","received_events_url":"https://api.github.com/users/misgeatgit/received_events","type":"User","site_admin":false},"body":"I wanted to compare similarity of two atoms without creating bindlink and the pattern matcher.","created_at":"2015-09-25T11:37:44Z","updated_at":"2015-09-25T13:06:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2d0d243a2244221109d1030289922b0c9c84c977","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/opencog/atomspace/pulls/334/commits","review_comments_url":"https://api.github.com/repos/opencog/atomspace/pulls/334/comments","review_comment_url":"https://api.github.com/repos/opencog/atomspace/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opencog/atomspace/issues/334/comments","statuses_url":"https://api.github.com/repos/opencog/atomspace/statuses/033fc70eddbf4ffd9c04690aa6031c120b666e48","head":{"label":"misgeatgit:extutil","ref":"extutil","sha":"033fc70eddbf4ffd9c04690aa6031c120b666e48","user":{"login":"misgeatgit","id":2872565,"avatar_url":"https://avatars.githubusercontent.com/u/2872565?v=3","gravatar_id":"","url":"https://api.github.com/users/misgeatgit","html_url":"https://github.com/misgeatgit","followers_url":"https://api.github.com/users/misgeatgit/followers","following_url":"https://api.github.com/users/misgeatgit/following{/other_user}","gists_url":"https://api.github.com/users/misgeatgit/gists{/gist_id}","starred_url":"https://api.github.com/users/misgeatgit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/misgeatgit/subscriptions","organizations_url":"https://api.github.com/users/misgeatgit/orgs","repos_url":"https://api.github.com/users/misgeatgit/repos","events_url":"https://api.github.com/users/misgeatgit/events{/privacy}","received_events_url":"https://api.github.com/users/misgeatgit/received_events","type":"User","site_admin":false},"repo":{"id":35009837,"name":"atomspace","full_name":"misgeatgit/atomspace","owner":{"login":"misgeatgit","id":2872565,"avatar_url":"https://avatars.githubusercontent.com/u/2872565?v=3","gravatar_id":"","url":"https://api.github.com/users/misgeatgit","html_url":"https://github.com/misgeatgit","followers_url":"https://api.github.com/users/misgeatgit/followers","following_url":"https://api.github.com/users/misgeatgit/following{/other_user}","gists_url":"https://api.github.com/users/misgeatgit/gists{/gist_id}","starred_url":"https://api.github.com/users/misgeatgit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/misgeatgit/subscriptions","organizations_url":"https://api.github.com/users/misgeatgit/orgs","repos_url":"https://api.github.com/users/misgeatgit/repos","events_url":"https://api.github.com/users/misgeatgit/events{/privacy}","received_events_url":"https://api.github.com/users/misgeatgit/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/misgeatgit/atomspace","description":"The OpenCog hypergraph database and logic (reasoning) engine","fork":true,"url":"https://api.github.com/repos/misgeatgit/atomspace","forks_url":"https://api.github.com/repos/misgeatgit/atomspace/forks","keys_url":"https://api.github.com/repos/misgeatgit/atomspace/keys{/key_id}","collaborators_url":"https://api.github.com/repos/misgeatgit/atomspace/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/misgeatgit/atomspace/teams","hooks_url":"https://api.github.com/repos/misgeatgit/atomspace/hooks","issue_events_url":"https://api.github.com/repos/misgeatgit/atomspace/issues/events{/number}","events_url":"https://api.github.com/repos/misgeatgit/atomspace/events","assignees_url":"https://api.github.com/repos/misgeatgit/atomspace/assignees{/user}","branches_url":"https://api.github.com/repos/misgeatgit/atomspace/branches{/branch}","tags_url":"https://api.github.com/repos/misgeatgit/atomspace/tags","blobs_url":"https://api.github.com/repos/misgeatgit/atomspace/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/misgeatgit/atomspace/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/misgeatgit/atomspace/git/refs{/sha}","trees_url":"https://api.github.com/repos/misgeatgit/atomspace/git/trees{/sha}","statuses_url":"https://api.github.com/repos/misgeatgit/atomspace/statuses/{sha}","languages_url":"https://api.github.com/repos/misgeatgit/atomspace/languages","stargazers_url":"https://api.github.com/repos/misgeatgit/atomspace/stargazers","contributors_url":"https://api.github.com/repos/misgeatgit/atomspace/contributors","subscribers_url":"https://api.github.com/repos/misgeatgit/atomspace/subscribers","subscription_url":"https://api.github.com/repos/misgeatgit/atomspace/subscription","commits_url":"https://api.github.com/repos/misgeatgit/atomspace/commits{/sha}","git_commits_url":"https://api.github.com/repos/misgeatgit/atomspace/git/commits{/sha}","comments_url":"https://api.github.com/repos/misgeatgit/atomspace/comments{/number}","issue_comment_url":"https://api.github.com/repos/misgeatgit/atomspace/issues/comments{/number}","contents_url":"https://api.github.com/repos/misgeatgit/atomspace/contents/{+path}","compare_url":"https://api.github.com/repos/misgeatgit/atomspace/compare/{base}...{head}","merges_url":"https://api.github.com/repos/misgeatgit/atomspace/merges","archive_url":"https://api.github.com/repos/misgeatgit/atomspace/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/misgeatgit/atomspace/downloads","issues_url":"https://api.github.com/repos/misgeatgit/atomspace/issues{/number}","pulls_url":"https://api.github.com/repos/misgeatgit/atomspace/pulls{/number}","milestones_url":"https://api.github.com/repos/misgeatgit/atomspace/milestones{/number}","notifications_url":"https://api.github.com/repos/misgeatgit/atomspace/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/misgeatgit/atomspace/labels{/name}","releases_url":"https://api.github.com/repos/misgeatgit/atomspace/releases{/id}","created_at":"2015-05-04T02:26:26Z","updated_at":"2015-05-04T02:26:31Z","pushed_at":"2015-09-25T11:31:12Z","git_url":"git://github.com/misgeatgit/atomspace.git","ssh_url":"git@github.com:misgeatgit/atomspace.git","clone_url":"https://github.com/misgeatgit/atomspace.git","svn_url":"https://github.com/misgeatgit/atomspace","homepage":"","size":140758,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"opencog:master","ref":"master","sha":"c53f2065da5fbac870f196435fb05a3bd3fc0e8e","user":{"login":"opencog","id":2109913,"avatar_url":"https://avatars.githubusercontent.com/u/2109913?v=3","gravatar_id":"","url":"https://api.github.com/users/opencog","html_url":"https://github.com/opencog","followers_url":"https://api.github.com/users/opencog/followers","following_url":"https://api.github.com/users/opencog/following{/other_user}","gists_url":"https://api.github.com/users/opencog/gists{/gist_id}","starred_url":"https://api.github.com/users/opencog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencog/subscriptions","organizations_url":"https://api.github.com/users/opencog/orgs","repos_url":"https://api.github.com/users/opencog/repos","events_url":"https://api.github.com/users/opencog/events{/privacy}","received_events_url":"https://api.github.com/users/opencog/received_events","type":"Organization","site_admin":false},"repo":{"id":34678084,"name":"atomspace","full_name":"opencog/atomspace","owner":{"login":"opencog","id":2109913,"avatar_url":"https://avatars.githubusercontent.com/u/2109913?v=3","gravatar_id":"","url":"https://api.github.com/users/opencog","html_url":"https://github.com/opencog","followers_url":"https://api.github.com/users/opencog/followers","following_url":"https://api.github.com/users/opencog/following{/other_user}","gists_url":"https://api.github.com/users/opencog/gists{/gist_id}","starred_url":"https://api.github.com/users/opencog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencog/subscriptions","organizations_url":"https://api.github.com/users/opencog/orgs","repos_url":"https://api.github.com/users/opencog/repos","events_url":"https://api.github.com/users/opencog/events{/privacy}","received_events_url":"https://api.github.com/users/opencog/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opencog/atomspace","description":"The OpenCog hypergraph database and logic (reasoning) engine","fork":false,"url":"https://api.github.com/repos/opencog/atomspace","forks_url":"https://api.github.com/repos/opencog/atomspace/forks","keys_url":"https://api.github.com/repos/opencog/atomspace/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opencog/atomspace/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opencog/atomspace/teams","hooks_url":"https://api.github.com/repos/opencog/atomspace/hooks","issue_events_url":"https://api.github.com/repos/opencog/atomspace/issues/events{/number}","events_url":"https://api.github.com/repos/opencog/atomspace/events","assignees_url":"https://api.github.com/repos/opencog/atomspace/assignees{/user}","branches_url":"https://api.github.com/repos/opencog/atomspace/branches{/branch}","tags_url":"https://api.github.com/repos/opencog/atomspace/tags","blobs_url":"https://api.github.com/repos/opencog/atomspace/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opencog/atomspace/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opencog/atomspace/git/refs{/sha}","trees_url":"https://api.github.com/repos/opencog/atomspace/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opencog/atomspace/statuses/{sha}","languages_url":"https://api.github.com/repos/opencog/atomspace/languages","stargazers_url":"https://api.github.com/repos/opencog/atomspace/stargazers","contributors_url":"https://api.github.com/repos/opencog/atomspace/contributors","subscribers_url":"https://api.github.com/repos/opencog/atomspace/subscribers","subscription_url":"https://api.github.com/repos/opencog/atomspace/subscription","commits_url":"https://api.github.com/repos/opencog/atomspace/commits{/sha}","git_commits_url":"https://api.github.com/repos/opencog/atomspace/git/commits{/sha}","comments_url":"https://api.github.com/repos/opencog/atomspace/comments{/number}","issue_comment_url":"https://api.github.com/repos/opencog/atomspace/issues/comments{/number}","contents_url":"https://api.github.com/repos/opencog/atomspace/contents/{+path}","compare_url":"https://api.github.com/repos/opencog/atomspace/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opencog/atomspace/merges","archive_url":"https://api.github.com/repos/opencog/atomspace/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opencog/atomspace/downloads","issues_url":"https://api.github.com/repos/opencog/atomspace/issues{/number}","pulls_url":"https://api.github.com/repos/opencog/atomspace/pulls{/number}","milestones_url":"https://api.github.com/repos/opencog/atomspace/milestones{/number}","notifications_url":"https://api.github.com/repos/opencog/atomspace/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opencog/atomspace/labels{/name}","releases_url":"https://api.github.com/repos/opencog/atomspace/releases{/id}","created_at":"2015-04-27T16:32:57Z","updated_at":"2015-09-21T10:59:20Z","pushed_at":"2015-09-25T11:37:44Z","git_url":"git://github.com/opencog/atomspace.git","ssh_url":"git@github.com:opencog/atomspace.git","clone_url":"https://github.com/opencog/atomspace.git","svn_url":"https://github.com/opencog/atomspace","homepage":"","size":151635,"stargazers_count":23,"watchers_count":23,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":31,"mirror_url":null,"open_issues_count":27,"forks":31,"open_issues":27,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opencog/atomspace/pulls/334"},"html":{"href":"https://github.com/opencog/atomspace/pull/334"},"issue":{"href":"https://api.github.com/repos/opencog/atomspace/issues/334"},"comments":{"href":"https://api.github.com/repos/opencog/atomspace/issues/334/comments"},"review_comments":{"href":"https://api.github.com/repos/opencog/atomspace/pulls/334/comments"},"review_comment":{"href":"https://api.github.com/repos/opencog/atomspace/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opencog/atomspace/pulls/334/commits"},"statuses":{"href":"https://api.github.com/repos/opencog/atomspace/statuses/033fc70eddbf4ffd9c04690aa6031c120b666e48"}}}}