{"action":"created","comment":{"url":"https://api.github.com/repos/HuJiayin/spark/pulls/comments/48700186","id":48700186,"diff_hunk":"@@ -0,0 +1,41 @@\n+/*\n+ * Licensed to the Apache Software Foundation (ASF) under one or more\n+ * contributor license agreements.  See the NOTICE file distributed with\n+ * this work for additional information regarding copyright ownership.\n+ * The ASF licenses this file to You under the Apache License, Version 2.0\n+ * (the \"License\"); you may not use this file except in compliance with\n+ * the License.  You may obtain a copy of the License at\n+ *\n+ *    http://www.apache.org/licenses/LICENSE-2.0\n+ *\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+\n+package org.apache.spark.ml.nlp\n+\n+import org.apache.spark.mllib.nlp.{CRF, CRFModel}\n+import org.apache.spark.sql.{Row, DataFrame}\n+\n+class ConditionalRandomField {\n+  def train(template: DataFrame,\n+            sentences: DataFrame): CRFModel = {\n+    val t = template.select().","path":"mllib/src/main/scala/org/apache/spark/ml/nlp/ConditionalRandomField.scala","position":26,"original_position":26,"commit_id":"5e5e3e14b5dfd82c05691b44cd876b923117bbf2","original_commit_id":"5e5e3e14b5dfd82c05691b44cd876b923117bbf2","user":{"login":"chenghao-intel","id":2367031,"avatar_url":"https://avatars.githubusercontent.com/u/2367031?v=3","gravatar_id":"","url":"https://api.github.com/users/chenghao-intel","html_url":"https://github.com/chenghao-intel","followers_url":"https://api.github.com/users/chenghao-intel/followers","following_url":"https://api.github.com/users/chenghao-intel/following{/other_user}","gists_url":"https://api.github.com/users/chenghao-intel/gists{/gist_id}","starred_url":"https://api.github.com/users/chenghao-intel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chenghao-intel/subscriptions","organizations_url":"https://api.github.com/users/chenghao-intel/orgs","repos_url":"https://api.github.com/users/chenghao-intel/repos","events_url":"https://api.github.com/users/chenghao-intel/events{/privacy}","received_events_url":"https://api.github.com/users/chenghao-intel/received_events","type":"User","site_admin":false},"body":"Hmm, I doubt this can work. Why do you select nothing here?","created_at":"2016-01-04T01:21:31Z","updated_at":"2016-01-04T01:21:31Z","html_url":"https://github.com/HuJiayin/spark/pull/1#discussion_r48700186","pull_request_url":"https://api.github.com/repos/HuJiayin/spark/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/HuJiayin/spark/pulls/comments/48700186"},"html":{"href":"https://github.com/HuJiayin/spark/pull/1#discussion_r48700186"},"pull_request":{"href":"https://api.github.com/repos/HuJiayin/spark/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/HuJiayin/spark/pulls/1","id":53944568,"html_url":"https://github.com/HuJiayin/spark/pull/1","diff_url":"https://github.com/HuJiayin/spark/pull/1.diff","patch_url":"https://github.com/HuJiayin/spark/pull/1.patch","issue_url":"https://api.github.com/repos/HuJiayin/spark/issues/1","number":1,"state":"closed","locked":false,"title":"Crf2","user":{"login":"HuJiayin","id":12150346,"avatar_url":"https://avatars.githubusercontent.com/u/12150346?v=3","gravatar_id":"","url":"https://api.github.com/users/HuJiayin","html_url":"https://github.com/HuJiayin","followers_url":"https://api.github.com/users/HuJiayin/followers","following_url":"https://api.github.com/users/HuJiayin/following{/other_user}","gists_url":"https://api.github.com/users/HuJiayin/gists{/gist_id}","starred_url":"https://api.github.com/users/HuJiayin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HuJiayin/subscriptions","organizations_url":"https://api.github.com/users/HuJiayin/orgs","repos_url":"https://api.github.com/users/HuJiayin/repos","events_url":"https://api.github.com/users/HuJiayin/events{/privacy}","received_events_url":"https://api.github.com/users/HuJiayin/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-17T07:54:08Z","updated_at":"2016-01-04T01:21:31Z","closed_at":"2015-12-17T08:55:48Z","merged_at":"2015-12-17T08:55:48Z","merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/HuJiayin/spark/pulls/1/commits","review_comments_url":"https://api.github.com/repos/HuJiayin/spark/pulls/1/comments","review_comment_url":"https://api.github.com/repos/HuJiayin/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HuJiayin/spark/issues/1/comments","statuses_url":"https://api.github.com/repos/HuJiayin/spark/statuses/5e5e3e14b5dfd82c05691b44cd876b923117bbf2","head":{"label":"HuJiayin:crf2","ref":"crf2","sha":"5e5e3e14b5dfd82c05691b44cd876b923117bbf2","user":{"login":"HuJiayin","id":12150346,"avatar_url":"https://avatars.githubusercontent.com/u/12150346?v=3","gravatar_id":"","url":"https://api.github.com/users/HuJiayin","html_url":"https://github.com/HuJiayin","followers_url":"https://api.github.com/users/HuJiayin/followers","following_url":"https://api.github.com/users/HuJiayin/following{/other_user}","gists_url":"https://api.github.com/users/HuJiayin/gists{/gist_id}","starred_url":"https://api.github.com/users/HuJiayin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HuJiayin/subscriptions","organizations_url":"https://api.github.com/users/HuJiayin/orgs","repos_url":"https://api.github.com/users/HuJiayin/repos","events_url":"https://api.github.com/users/HuJiayin/events{/privacy}","received_events_url":"https://api.github.com/users/HuJiayin/received_events","type":"User","site_admin":false},"repo":{"id":36782662,"name":"spark","full_name":"HuJiayin/spark","owner":{"login":"HuJiayin","id":12150346,"avatar_url":"https://avatars.githubusercontent.com/u/12150346?v=3","gravatar_id":"","url":"https://api.github.com/users/HuJiayin","html_url":"https://github.com/HuJiayin","followers_url":"https://api.github.com/users/HuJiayin/followers","following_url":"https://api.github.com/users/HuJiayin/following{/other_user}","gists_url":"https://api.github.com/users/HuJiayin/gists{/gist_id}","starred_url":"https://api.github.com/users/HuJiayin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HuJiayin/subscriptions","organizations_url":"https://api.github.com/users/HuJiayin/orgs","repos_url":"https://api.github.com/users/HuJiayin/repos","events_url":"https://api.github.com/users/HuJiayin/events{/privacy}","received_events_url":"https://api.github.com/users/HuJiayin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/HuJiayin/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/HuJiayin/spark","forks_url":"https://api.github.com/repos/HuJiayin/spark/forks","keys_url":"https://api.github.com/repos/HuJiayin/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HuJiayin/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HuJiayin/spark/teams","hooks_url":"https://api.github.com/repos/HuJiayin/spark/hooks","issue_events_url":"https://api.github.com/repos/HuJiayin/spark/issues/events{/number}","events_url":"https://api.github.com/repos/HuJiayin/spark/events","assignees_url":"https://api.github.com/repos/HuJiayin/spark/assignees{/user}","branches_url":"https://api.github.com/repos/HuJiayin/spark/branches{/branch}","tags_url":"https://api.github.com/repos/HuJiayin/spark/tags","blobs_url":"https://api.github.com/repos/HuJiayin/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HuJiayin/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HuJiayin/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/HuJiayin/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HuJiayin/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/HuJiayin/spark/languages","stargazers_url":"https://api.github.com/repos/HuJiayin/spark/stargazers","contributors_url":"https://api.github.com/repos/HuJiayin/spark/contributors","subscribers_url":"https://api.github.com/repos/HuJiayin/spark/subscribers","subscription_url":"https://api.github.com/repos/HuJiayin/spark/subscription","commits_url":"https://api.github.com/repos/HuJiayin/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/HuJiayin/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/HuJiayin/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/HuJiayin/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/HuJiayin/spark/contents/{+path}","compare_url":"https://api.github.com/repos/HuJiayin/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HuJiayin/spark/merges","archive_url":"https://api.github.com/repos/HuJiayin/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HuJiayin/spark/downloads","issues_url":"https://api.github.com/repos/HuJiayin/spark/issues{/number}","pulls_url":"https://api.github.com/repos/HuJiayin/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/HuJiayin/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/HuJiayin/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HuJiayin/spark/labels{/name}","releases_url":"https://api.github.com/repos/HuJiayin/spark/releases{/id}","created_at":"2015-06-03T05:45:31Z","updated_at":"2015-06-03T05:45:52Z","pushed_at":"2015-12-17T08:55:48Z","git_url":"git://github.com/HuJiayin/spark.git","ssh_url":"git@github.com:HuJiayin/spark.git","clone_url":"https://github.com/HuJiayin/spark.git","svn_url":"https://github.com/HuJiayin/spark","homepage":null,"size":130101,"stargazers_count":0,"watchers_count":0,"language":"Scala","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":"HuJiayin:master","ref":"master","sha":"ec2b6c26c9b6bd59d29b5d7af2742aca7e6e0b07","user":{"login":"HuJiayin","id":12150346,"avatar_url":"https://avatars.githubusercontent.com/u/12150346?v=3","gravatar_id":"","url":"https://api.github.com/users/HuJiayin","html_url":"https://github.com/HuJiayin","followers_url":"https://api.github.com/users/HuJiayin/followers","following_url":"https://api.github.com/users/HuJiayin/following{/other_user}","gists_url":"https://api.github.com/users/HuJiayin/gists{/gist_id}","starred_url":"https://api.github.com/users/HuJiayin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HuJiayin/subscriptions","organizations_url":"https://api.github.com/users/HuJiayin/orgs","repos_url":"https://api.github.com/users/HuJiayin/repos","events_url":"https://api.github.com/users/HuJiayin/events{/privacy}","received_events_url":"https://api.github.com/users/HuJiayin/received_events","type":"User","site_admin":false},"repo":{"id":36782662,"name":"spark","full_name":"HuJiayin/spark","owner":{"login":"HuJiayin","id":12150346,"avatar_url":"https://avatars.githubusercontent.com/u/12150346?v=3","gravatar_id":"","url":"https://api.github.com/users/HuJiayin","html_url":"https://github.com/HuJiayin","followers_url":"https://api.github.com/users/HuJiayin/followers","following_url":"https://api.github.com/users/HuJiayin/following{/other_user}","gists_url":"https://api.github.com/users/HuJiayin/gists{/gist_id}","starred_url":"https://api.github.com/users/HuJiayin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HuJiayin/subscriptions","organizations_url":"https://api.github.com/users/HuJiayin/orgs","repos_url":"https://api.github.com/users/HuJiayin/repos","events_url":"https://api.github.com/users/HuJiayin/events{/privacy}","received_events_url":"https://api.github.com/users/HuJiayin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/HuJiayin/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/HuJiayin/spark","forks_url":"https://api.github.com/repos/HuJiayin/spark/forks","keys_url":"https://api.github.com/repos/HuJiayin/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HuJiayin/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HuJiayin/spark/teams","hooks_url":"https://api.github.com/repos/HuJiayin/spark/hooks","issue_events_url":"https://api.github.com/repos/HuJiayin/spark/issues/events{/number}","events_url":"https://api.github.com/repos/HuJiayin/spark/events","assignees_url":"https://api.github.com/repos/HuJiayin/spark/assignees{/user}","branches_url":"https://api.github.com/repos/HuJiayin/spark/branches{/branch}","tags_url":"https://api.github.com/repos/HuJiayin/spark/tags","blobs_url":"https://api.github.com/repos/HuJiayin/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HuJiayin/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HuJiayin/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/HuJiayin/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HuJiayin/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/HuJiayin/spark/languages","stargazers_url":"https://api.github.com/repos/HuJiayin/spark/stargazers","contributors_url":"https://api.github.com/repos/HuJiayin/spark/contributors","subscribers_url":"https://api.github.com/repos/HuJiayin/spark/subscribers","subscription_url":"https://api.github.com/repos/HuJiayin/spark/subscription","commits_url":"https://api.github.com/repos/HuJiayin/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/HuJiayin/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/HuJiayin/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/HuJiayin/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/HuJiayin/spark/contents/{+path}","compare_url":"https://api.github.com/repos/HuJiayin/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HuJiayin/spark/merges","archive_url":"https://api.github.com/repos/HuJiayin/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HuJiayin/spark/downloads","issues_url":"https://api.github.com/repos/HuJiayin/spark/issues{/number}","pulls_url":"https://api.github.com/repos/HuJiayin/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/HuJiayin/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/HuJiayin/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HuJiayin/spark/labels{/name}","releases_url":"https://api.github.com/repos/HuJiayin/spark/releases{/id}","created_at":"2015-06-03T05:45:31Z","updated_at":"2015-06-03T05:45:52Z","pushed_at":"2015-12-17T08:55:48Z","git_url":"git://github.com/HuJiayin/spark.git","ssh_url":"git@github.com:HuJiayin/spark.git","clone_url":"https://github.com/HuJiayin/spark.git","svn_url":"https://github.com/HuJiayin/spark","homepage":null,"size":130101,"stargazers_count":0,"watchers_count":0,"language":"Scala","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"}},"_links":{"self":{"href":"https://api.github.com/repos/HuJiayin/spark/pulls/1"},"html":{"href":"https://github.com/HuJiayin/spark/pull/1"},"issue":{"href":"https://api.github.com/repos/HuJiayin/spark/issues/1"},"comments":{"href":"https://api.github.com/repos/HuJiayin/spark/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/HuJiayin/spark/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/HuJiayin/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HuJiayin/spark/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/HuJiayin/spark/statuses/5e5e3e14b5dfd82c05691b44cd876b923117bbf2"}}}}