Class Summarizer
Summarizer class
Copyright: 2011 Summarizer
Author: Indiana Jones
See: http://www.tools4noobs.com/summarize/
Example: $summarizer = new Summarizer($options); $summarizer->loadText($text); $summary = $summarizer->run();
Located at Summarizer.php
public
|
|
public
|
|
public
|
|
public
array
|
|
public
string
|
|
public
array
|
|
public
|
|
public
array
|
|
public
array
|
|
public
integer
|
#
getAnalyzedWordsCount( )
Get number of analyzed words. Includes all the words that are taken into
account in order to determine sentence/word rankings. Note: The words from
sentences which are under the minimum sentence length are ignored. Note: The
words which are under the minimum word length or are found in the |
public
integer
|
#
getTotalWordsCount( )
Get total number of words. Note: The words from sentences which are under the minimum length are ignored. |
public
integer
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
boolean
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
array
|
|
protected
|
|
protected
|
|
protected
|
string |
OPTION_MIN_SENTENCE_LENGTH |
'min_sentence_length' |
#
Minimum sentence length |
string |
OPTION_MIN_WORD_LENGTH |
'min_word_length' |
#
Minimum word length |
string |
OPTION_TRESHOLD |
'treshold' |
#
Treshold |
string |
OPTION_FIRST_BEST |
'first_best' |
#
Number of best lines to return |
string |
OPTION_HTML |
'html' |
#
Document is in HTML format |
string |
OPTION_SKIP_WORDS_FILE |
'skip_words_file' |
#
Skip words file |
string |
OPTION_SPLIT_SENTENCES |
'split_sentences' |
#
Split text into sentences |
string |
OPTION_CASE_SENSITIVE |
'case_sensitive' |
#
Case sensitive |
integer |
DEFAULT_MIN_SENTENCE_LENGTH |
50 |
#
Default value for minimum sentence length |
integer |
DEFAULT_MIN_WORD_LENGTH |
4 |
#
Default value for minimum word length |
float |
DEFAULT_TRESHOLD |
0.7 |
#
Default value for treshold |
integer |
DEFAULT_FIRST_BEST |
10 |
#
Default value for number of best lines to return |
boolean |
DEFAULT_SPLIT_SENTENCES |
true |
#
Default value for split sentences |
boolean |
DEFAULT_HTML |
true |
#
Default value for html |
string |
DEFAULT_SKIP_WORDS_FILE |
'skip.txt' |
#
Default value for skip words file |
boolean |
DEFAULT_CASE_SENSITIVE |
false |
#
Default case sensitive |
protected
array
|
$_options | array() |
#
Options |
protected
string
|
$_text |
|
#
Text to summarize |
protected
array
|
$_sentences | array() |
#
Split sentences |
protected
integer
|
$_currentSentence | 1 |
#
Current sentence index |
protected
array
|
$_skipWords | array() |
#
List of common words to skip |
protected
array
|
$_words | array() |
#
Words extracted from sentences |
protected
array
|
$_sentwords | array() |
#
Sentence words |
protected
integer
|
$_maxWordsFrequency | 0 |
#
Maximum words frequency |
protected
array
|
$_summary | array() |
#
Summary |
protected
integer
|
$_totalWords | 0 |
#
Total number of words |
protected
integer
|
$_analyzedWords | 0 |
#
Number of analyzed words |