title: Apache Spark Naive Bayes based Text Classification
body: <p>im trying to use Apache Spark for document classification.</p>
  
  <p>For example i have two types of Class (C and J)</p>
  
  <p>Train data is :</p>
  
  <pre><code>C, Chinese Beijing Chinese
  C, Chinese Chinese Shanghai
  C, Chinese Macao
  J, Tokyo Japan Chinese
  </code></pre>
  
  <p>And test data is :
  Chinese Chinese Chinese Tokyo Japan // What is ist J or C ?</p>
  
  <p>How i can train and predict as above datas. I did Naive Bayes text classification with Apache Mahout, however no with Apache Spark.</p>
  
  <p>How can i do this with Apache Spark?</p>