Minor deletions, a=chris

Chris Pollett [2015-11-30 20:Nov:th]
Minor deletions, a=chris
Filename
src/library/summarizers/CentroidWeightedSummarizer.php
tests/CmsDetectorTest.php
diff --git a/src/library/summarizers/CentroidWeightedSummarizer.php b/src/library/summarizers/CentroidWeightedSummarizer.php
index d117e366d..b3d778eae 100644
--- a/src/library/summarizers/CentroidWeightedSummarizer.php
+++ b/src/library/summarizers/CentroidWeightedSummarizer.php
@@ -176,59 +176,6 @@ class CentroidWeightedSummarizer extends Summarizer
             }
             $i++;
         }
-        //should not need anything below this line
-//        if (strlen($formatted_doc) < PageProcessor::$max_description_len
-//            || $n == 1) {
-//            //if input short only use above to get a word cloud
-//            $formatted_doc = substr($formatted_doc, 0,
-//                PageProcessor::$max_description_len);
-//            return [$formatted_doc, $word_cloud];
-//        }
-//        ksort($wc);
-//        /* Calculate similarity measure between centroid and each sentence */
-//        $sim = [];
-//        for ($i=0; $i < $n; $i++) {
-//            $a = $b1 = $b2 = $c1 = $c2 = $d = 0;
-//            for ($k = 0; $k < $t; $k++) {
-//                    $wck = $wc[$k];
-//                    $idfk = $idf[$k];
-//                    $tmp = substr_count($sentences[$i], $terms[$k]);
-//                    $wik = ($tmp > 0) ? $idfk * (1 + log($tmp)) : 0;
-//                    $a += ($wik * $wck * $idfk);
-//                    $b1 += ($wik * $wik);
-//                    $c1 += ($wck * $wck);
-//            }
-//            $b2 = sqrt($b1);
-//            $c2 = sqrt($c1);
-//            $d = $b2 * $c2;
-//            if ($d == 0) {
-//                $sim[$i] = 0;
-//            } else {
-//                $sim[$i] = $a / $d;
-//            }
-//        }
-//        arsort($sim);
-//        /* Getting how many sentences should be there in summary */
-//        $top = self::summarySentenceCount($out_sentences, $sim);
-//        $sum_array = [];
-//        $sum_array = array_keys(array_slice($sim, 0, $top - 1, true));
-//        sort($sum_array);
-//        $summary = '';
-//        foreach ($sum_array as $key) {
-//            $summary .= $out_sentences[$key] . ". ";
-//        }
-//
-//
-//
-//
-//        if (self::OUTPUT_TO_FILE) {
-//            $output_file_contents = "";
-//            foreach ($sum_array as $key) {
-//                $output_file_contents .= $out_sentences[$key] . ".\n";
-//            }
-//            file_put_contents(C\WORK_DIRECTORY . self::OUTPUT_FILE_PATH,
-//                $output_file_contents);
-//        }
         /* Summary of text summarization */
         return [$summary, $word_cloud];
     }
diff --git a/tests/CmsDetectorTest.php b/tests/CmsDetectorTest.php
index 8023cdddd..0d8c20ce6 100644
--- a/tests/CmsDetectorTest.php
+++ b/tests/CmsDetectorTest.php
@@ -77,7 +77,7 @@ class CmsDetectorTest extends UnitTest
                 $cms_detector_dir . "/" . $file_name);
             $return_value_to_compare = trim($return_values_to_compare[$i]);
             $contents = file_get_contents($file_path);
-            $detect = new CmsDetector();
+            $detect = new CmsDetector();
             $cms_detector_return_value = $detect->checkFromContent($contents);
             $return_value_to_compare = iconv('ASCII', 'UTF-8//IGNORE',
                 $return_value_to_compare);
ViewGit