Plugin Directory

Changeset 700744


Ignore:
Timestamp:
04/20/2013 01:06:33 PM (13 years ago)
Author:
chr15
Message:

Updated Core Library to 2.0.6

Location:
summy/trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • summy/trunk/lib/Summy/Core.php

    r685224 r700744  
    33/**
    44 * @package     Summy
    5  * @version     $Id: Core.php 128 2013-03-17 23:44:07Z Tefra $
    65 * @author      Christodoulos Tsoulloftas
    76 * @copyright   Copyright 2011-2013, http://www.komposta.net
     
    243242            $i = 0;
    244243            $total = ceil(($this->config['rate'] / 100) * $this->totalSentences);
    245             $indexes = array_keys($this->sentenceScores);
    246244            //Grab the top x sentences
    247             while($i < $total)
    248             {
    249                 $this->summarySentences[] = array_shift($indexes);
     245            foreach($this->sentenceScores AS $index => $score)
     246            {
     247                if($score == 0 || $total == $i)
     248                {
     249                    break;
     250                }
    250251                $i++;
     252                $this->summarySentences[] = $index;
     253            }
     254
     255            //Return false if no senteces made it to the summary
     256            if(empty($this->summarySentences))
     257            {
     258                return false;
    251259            }
    252260
     
    255263            return true;
    256264        }
    257         else
    258         {
    259             return false;
    260         }
     265        return false;
    261266    }
    262267
     
    408413    }
    409414}
    410 
    411 ?>
  • summy/trunk/lib/Summy/Filter/En/Stemmer.php

    r685224 r700744  
    77 *
    88 * @package     Summy
    9  * @version     $Id: Stemmer.php 128 2013-03-17 23:44:07Z Tefra $
    109 * @author      Christodoulos Tsoulloftas
    1110 * @copyright   Copyright 2011-2013, http://www.komposta.net
     
    377376    }
    378377}
    379 
    380 ?>
  • summy/trunk/lib/Summy/Filter/En/StopWords.php

    r664156 r700744  
    33/**
    44 * @package     Summy
    5  * @version     $Id: StopWords.php 93 2013-02-04 18:26:25Z Tefra $
    65 * @author      Christodoulos Tsoulloftas
    76 * @copyright   Copyright 2011-2013, http://www.komposta.net
     
    562561    );
    563562}
    564 
    565 ?>
  • summy/trunk/lib/Summy/Filter/En/Text.php

    r685224 r700744  
    33/**
    44 * @package     Summy
    5  * @version     $Id: Text.php 128 2013-03-17 23:44:07Z Tefra $
    65 * @author      Christodoulos Tsoulloftas
    76 * @copyright   Copyright 2011-2013, http://www.komposta.net
     
    8382    }
    8483}
    85 
    86 ?>
  • summy/trunk/lib/Summy/Filter/Gr/Stemmer.php

    r685224 r700744  
    1919 *
    2020 * @package     Summy
    21  * @version     $Id: Stemmer.php 112 2013-03-06 21:56:52Z Tefra $
    2221 * @author      Christodoulos Tsoulloftas
    2322 * @copyright   Copyright 2011-2013, http://www.komposta.net
     
    512511    }
    513512}
    514 
    515 ?>
  • summy/trunk/lib/Summy/Filter/Gr/StopWords.php

    r664156 r700744  
    33/**
    44 * @package     Summy
    5  * @version     $Id: StopWords.php 93 2013-02-04 18:26:25Z Tefra $
    65 * @author      Christodoulos Tsoulloftas
    76 * @copyright   Copyright 2011-2013, http://www.komposta.net
     
    653652    );
    654653}
    655 
    656 ?>
  • summy/trunk/lib/Summy/Filter/Gr/Text.php

    r664156 r700744  
    33/**
    44 * @package     Summy
    5  * @version     $Id: Text.php 103 2013-02-04 21:56:04Z Tefra $
    65 * @author      Christodoulos Tsoulloftas
    76 * @copyright   Copyright 2011-2013, http://www.komposta.net
     
    8685    }
    8786}
    88 
    89 ?>
  • summy/trunk/lib/Summy/Filter/StopWords.php

    r664156 r700744  
    33/**
    44 * @package     Summy
    5  * @version     $Id: StopWords.php 88 2013-02-04 13:25:53Z Tefra $
    65 * @author      Christodoulos Tsoulloftas
    76 * @copyright   Copyright 2011-2013, http://www.komposta.net
     
    3635    }
    3736}
    38 
    39 ?>
  • summy/trunk/lib/Summy/Filter/WordLength.php

    r664156 r700744  
    33/**
    44 * @package     Summy
    5  * @version     $Id: WordLength.php 88 2013-02-04 13:25:53Z Tefra $
    65 * @author      Christodoulos Tsoulloftas
    76 * @copyright   Copyright 2011-2013, http://www.komposta.net
     
    3736    }
    3837}
    39 
    40 ?>
  • summy/trunk/lib/Summy/Score/Position.php

    r685224 r700744  
    33/**
    44 * @package     Summy
    5  * @version     $Id: Position.php 117 2013-03-16 16:37:14Z Tefra $
    65 * @author      Christodoulos Tsoulloftas
    76 * @copyright   Copyright 2011-2013, http://www.komposta.net
     
    7372    }
    7473}
    75 
    76 ?>
  • summy/trunk/lib/Summy/Score/Term.php

    r685224 r700744  
    33/**
    44 * @package     Summy
    5  * @version     $Id: Term.php 125 2013-03-16 17:49:26Z Tefra $
    65 * @author      Christodoulos Tsoulloftas
    76 * @copyright   Copyright 2011-2013, http://www.komposta.net
     
    199198    }
    200199}
    201 
    202 ?>
  • summy/trunk/readme.txt

    r685226 r700744  
    55Requires at least: 3.5.0
    66Tested up to: 3.5.1
    7 Stable tag: 1.0.2
     7Stable tag: 1.0.3
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7171== Changelog ==
    7272
     73= 1.0.3 =
     74* Fixed bug including null scored sentences in the summary to reach the output rate.
     75
    7376= 1.0.2 =
    7477* Updated Core Library to [2.0.5](http://summy.komposta.net/index/changelog)
    75 * * Fixed Bug in English Stemmer (Step 2 Case 'T')
    76 * * Updated Greek Stemmer to improve performance in same cases up to 50%.
    7778
    7879= 1.0.1 =
  • summy/trunk/summy.php

    r685226 r700744  
    55  Plugin URI: http://www.komposta.net/article/wp-summy
    66  Description: Summy can generate excerpts for your posts by applying various algorithms for automatic summarization extraction.
    7   Version: 1.0.2
     7  Version: 1.0.3
    88  Author: Christodoulos Tsoulloftas
    99  Author URI: http://www.komposta.net
Note: See TracChangeset for help on using the changeset viewer.