Arabic
[ class tree: Arabic ] [ index: Arabic ] [ all elements ]

Class: ArAutoSummarize

Source Location: /sub/ArAutoSummarize.class.php

Class Overview


This PHP class do automatic keyphrase extraction to provide a quick mini-summary for a long Arabic document


Author(s):

Copyright:

  • 2009 Khaled Al-Shamaa

Methods



Class Details

[line 144]
This PHP class do automatic keyphrase extraction to provide a quick mini-summary for a long Arabic document



Tags:

author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
copyright:  2009 Khaled Al-Shamaa
link:  http://www.ar-php.org
license:  LGPL


[ Top ]


Class Methods


constructor __construct [line 159]

ArAutoSummarize __construct( )

Loads initialize values



Tags:

access:  public


[ Top ]

method cleanCommon [line 486]

string cleanCommon( string $str, [string $inputCharset = null], [string $outputCharset = null], [object $main = null])

Extracting common Arabic words (roughly) from input Arabic string (document content)



Tags:

return:  Arabic document as a string free of common words (roughly)
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $str   Input normalized Arabic document as a string
string   $inputCharset   (optional) Input charset [utf-8|windows-1256|iso-8859-6] default value is NULL (use set input charset)
string   $outputCharset   (optional) Output charset [utf-8|windows-1256|iso-8859-6] default value is NULL (use set output charset)
object   $main   Main Ar-PHP object to access charset converter options

[ Top ]

method doRateSummarize [line 317]

string doRateSummarize( string $str, integer $rate, string $keywords, [string $inputCharset = null], [string $outputCharset = null], [object $main = null])

Summarize percentage of the input Arabic string (document content) into output



Tags:

return:  Output summary requested
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $str   Input Arabic document as a string
integer   $rate   Rate of output summary sentence number as percentage of the input Arabic string (document content)
string   $keywords   List of keywords higlited by search process
string   $inputCharset   (optional) Input charset [utf-8|windows-1256|iso-8859-6] default value is NULL (use set input charset)
string   $outputCharset   (optional) Output charset [utf-8|windows-1256|iso-8859-6] default value is NULL (use set output charset)
object   $main   Main Ar-PHP object to access charset converter options

[ Top ]

method doSummarize [line 294]

string doSummarize( string $str, integer $int, string $keywords, [string $inputCharset = null], [string $outputCharset = null], [object $main = null])

Summarize input Arabic string (document content) into specific number of sentences in the output



Tags:

return:  Output summary requested
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $str   Input Arabic document as a string
integer   $int   Number of sentences required in output summary
string   $keywords   List of keywords higlited by search process
string   $inputCharset   (optional) Input charset [utf-8|windows-1256|iso-8859-6] default value is NULL (use set input charset)
string   $outputCharset   (optional) Output charset [utf-8|windows-1256|iso-8859-6] default value is NULL (use set output charset)
object   $main   Main Ar-PHP object to access charset converter options

[ Top ]

method getMetaKeywords [line 390]

string getMetaKeywords( string $str, integer $int, [string $inputCharset = null], [string $outputCharset = null], [object $main = null])

Extract keywords from a given Arabic string (document content)



Tags:

return:  List of the keywords extracting from input Arabic string (document content)
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $str   Input Arabic document as a string
integer   $int   Number of keywords required to be extracting from input string (document content)
string   $inputCharset   (optional) Input charset [utf-8|windows-1256|iso-8859-6] default value is NULL (use set input charset)
string   $outputCharset   (optional) Output charset [utf-8|windows-1256|iso-8859-6] default value is NULL (use set output charset)
object   $main   Main Ar-PHP object to access charset converter options

[ Top ]

method highlightRateSummary [line 367]

string highlightRateSummary( string $str, integer $rate, string $keywords, string $style, [string $inputCharset = null], [string $outputCharset = null], [object $main = null])

Highlight key sentences (summary) as percentage of the input string (document content) using CSS and send the result back as an output.



Tags:

return:  Output highlighted key sentences summary (using CSS)
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $str   Input Arabic document as a string
integer   $rate   Rate of highlighted key sentences summary number as percentage of the input Arabic string (document content)
string   $keywords   List of keywords higlited by search process
string   $style   Name of the CSS class you would like to apply
string   $inputCharset   (optional) Input charset [utf-8|windows-1256|iso-8859-6] default value is NULL (use set input charset)
string   $outputCharset   (optional) Output charset [utf-8|windows-1256|iso-8859-6] default value is NULL (use set output charset)
object   $main   Main Ar-PHP object to access charset converter options

[ Top ]

method highlightSummary [line 342]

string highlightSummary( string $str, integer $int, string $keywords, string $style, [string $inputCharset = null], [string $outputCharset = null], [object $main = null])

Highlight key sentences (summary) of the input string (document content) using CSS and send the result back as an output



Tags:

return:  Output highlighted key sentences summary (using CSS)
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $str   Input Arabic document as a string
integer   $int   Number of key sentences required to be highlighted in the input string (document content)
string   $keywords   List of keywords higlited by search process
string   $style   Name of the CSS class you would like to apply
string   $inputCharset   (optional) Input charset [utf-8|windows-1256|iso-8859-6] default value is NULL (use set input charset)
string   $outputCharset   (optional) Output charset [utf-8|windows-1256|iso-8859-6] default value is NULL (use set output charset)
object   $main   Main Ar-PHP object to access charset converter options

[ Top ]

method loadExtra [line 185]

void loadExtra( )

Load enhanced Arabic stop words list



Tags:

access:  public


[ Top ]

method _summarize [line 212]

string _summarize( string $str, string $keywords, integer $int, string $mode, string $output, [ $style = null], [string $inputCharset = null], [string $outputCharset = null], [object $main = null])

Core summarize function that implement required steps in the algorithm



Tags:

return:  Output summary requested
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $str   Input Arabic document as a string
string   $keywords   List of keywords higlited by search process
integer   $int   Sentences value (see $mode effect also)
string   $mode   Mode of sentences count [number|rate]
string   $output   Output mode [summary|highlight]
string   $inputCharset   (optional) Input charset [utf-8|windows-1256|iso-8859-6] default value is NULL (use set input charset)
string   $outputCharset   (optional) Output charset [utf-8|windows-1256|iso-8859-6] default value is NULL (use set output charset)
object   $main   Main Ar-PHP object to access charset converter options
   $style  

[ Top ]


Documentation generated on Tue, 18 Aug 2009 00:12:47 +0300 by phpDocumentor 1.4.0