Ejemplo n.º 1
0
 private function extractFeaturesFromDoc()
 {
     /* Extract features from each document by using an instance of 
      * the FeatureExtractor class */
     $obj_fe = new FeatureExtractor();
     foreach ($this->corpus as $doc_id => $document) {
         $this->document_set[$doc_id] = $obj_fe->getFeatures($document);
     }
 }
Ejemplo n.º 2
0
 private function extractFeaturesFromDoc()
 {
     /* Extract features from each document by using an instance of 
      * the FeatureExtractor class */
     $obj_fe = new FeatureExtractor();
     foreach ($this->corpus as $doc_id => $document) {
         $this->document_set[$doc_id] = $obj_fe->getFeatures($document);
         /* Initially all documents are unclustered. */
         array_push($this->unclustered_documents, $doc_id);
     }
 }