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

Class: Arabic

Source Location: /Arabic.class.php

Class Overview




Variables

Methods



Class Details

[line 57]


[ Top ]


Class Variables

$ArAutoSummarize =

[line 180]

Arabic Auto Summarize Object

Automatic keyphrase extraction to provide a quick mini-summary for a long Arabic document




Tags:

access:  public

Type:   mixed


[ Top ]

$ArCharsetC =

[line 78]

Arabic Charset Converter Object

Convert a given Arabic string from one Arabic character set to another, those available character sets includes the most popular three: Windows-1256, ISO 8859-6, and UTF-8




Tags:

access:  public

Type:   mixed


[ Top ]

$ArCharsetD =

[line 88]

Detect Arabic String Character Set Object

This class will return Arabic character set that used for a given Arabic string passing into this class, those available character sets that can be detected by this class includes the most popular three: Windows-1256, ISO 8859-6, and UTF-8




Tags:

access:  public

Type:   mixed


[ Top ]

$ArDate =

[line 95]

Arabic Date Object

Arabic customization for PHP date function




Tags:

access:  public

Type:   mixed


[ Top ]

$ArGender =

[line 127]

Arabic Gender Guesser Object

This class attempts to guess the gender of Arabic names




Tags:

access:  public

Type:   mixed


[ Top ]

$ArGlyphs =

[line 154]

Arabic Glyphs is a simple class to render Arabic text Object

This class takes Arabic text (encoded in Windows-1256 character set) as input and performs Arabic glyph joining on it and outputs a UTF-8 hexadecimals stream that is no longer logically arranged but in a visual order which gives readable results when formatted with a simple Unicode rendering just like GD and UFPDF libraries that does not handle basic connecting glyphs of Arabic language yet but simply outputs all stand alone glyphs in left-to-right order




Tags:

access:  public

Type:   mixed


[ Top ]

$ArIdentifier =

[line 120]

Identify Arabic Text Segments Object

This class will identify Arabic text in a given UTF-8 multi language document, it will return array of start and end positions for Arabic text segments




Tags:

access:  public

Type:   mixed


[ Top ]

$ArKeySwap =

[line 141]

Arabic Keyboard Swapping Language Object

Convert keyboard language programmatically (English - Arabic)




Tags:

access:  public

Type:   mixed


[ Top ]

$ArMktime =

[line 195]

Arabic Maketime Object

Arabic customization for PHP mktime function




Tags:

access:  public

Type:   mixed


[ Top ]

$ArNumbers =

[line 134]

Spell numbers in the Arabic idiom Object

Spell numbers in the Arabic idiom




Tags:

access:  public

Type:   mixed


[ Top ]

$ArQuery =

[line 188]

Arabic Queary Object

Build WHERE condition for SQL statement using MySQL REGEXP and Arabic lexical rules




Tags:

access:  public

Type:   mixed


[ Top ]

$ArSoundex =

[line 163]

Arabic Soundex Object

Arabic soundex algorithm takes Arabic word as an input and produces a character string which identifies a set words that are (roughly) phonetically alike




Tags:

access:  public

Type:   mixed


[ Top ]

$ArTransliteration =

[line 103]

English-Arabic Transliteration Object

Transliterate English words into Arabic by render them in the orthography of the Arabic language




Tags:

access:  public

Type:   mixed


[ Top ]

$ArWordTag =

[line 172]

Tagging Arabic Word Object

Arabic grammarians describe Arabic as being derived from three main categories: noun, verb and particle. This class built to recognize the class of a given Arabic word




Tags:

access:  public

Type:   mixed


[ Top ]

$EnTransliteration =

[line 111]

Arabic-English Transliteration Object

Transliterate Arabic words into English by render them in the orthography of the English language




Tags:

access:  public

Type:   mixed


[ Top ]

$Salat =

[line 69]

Muslim Prayer Times Object

The five Islamic prayers are named Fajr, Zuhr, Asr, Maghrib and Isha. The timing of these five prayers varies from place to place and from day to day. It is obligatory for Muslims to perform these prayers at the correct time




Tags:

access:  public

Type:   mixed


[ Top ]



Class Methods


constructor __construct [line 201]

Arabic __construct( )

Load all objects



Tags:

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


[ Top ]

method a4_lines [line 503]

Integer a4_lines( $string, Integer $font, String $str)

Calculate the lines number of given Arabic text and font size that will fit in A4 page size



Tags:

return:  Number of lines for a given Arabic string in A4 page size
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

String   $str   Arabic string you would like to split it into lines
Integer   $font   Font size
   $string  

[ Top ]

method ar2en [line 382]

String ar2en( String $string)

Transliterate Arabic string into English by render them in the orthography of the English language



Tags:

return:  Out of vocabulary Arabic string in English characters using the format set by method setInputCharset
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

String   $string   Arabic string you want to Transliterate

[ Top ]

method convert [line 284]

String convert( String $str)

Convert Arabic string from one format to another



Tags:

return:  Arabic string in the format set by method setOutputCharset
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

String   $str   Arabic string in the format set by setInputCharset

[ Top ]

method date [line 332]

String date( String $format, [Integer $timestamp = time])

Format a local time/date in Arabic string



Tags:

return:  Format Arabic date string according to given format string using the given integer timestamp or the current local time if no timestamp is given (using the format set by method setOutputCharset).
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

String   $format   Format string (same as PHP date function)
Integer   $timestamp   Unix timestamp (default is current local time)

[ Top ]

method doRateSummarize [line 736]

String doRateSummarize( String $str, Integer $rate, String $keywords)

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

[ Top ]

method doSummarize [line 698]

String doSummarize( String $str, Integer $int, String $keywords)

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

[ Top ]

method en2ar [line 357]

String en2ar( String $string)

Transliterate English string into Arabic by render them in the orthography of the Arabic language



Tags:

return:  Out of vocabulary English string in Arabic characters using the format set by method setOutputCharset
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

String   $string   English string you want to Transliterate

[ Top ]

method getInputCharset [line 265]

String getInputCharset( )

Get the charset used in the input Arabic strings



Tags:

return:  return current setting for class input Arabic charset
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


[ Top ]

method getMetaKeywords [line 853]

String getMetaKeywords( String $str, Integer $int)

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)

[ Top ]

method getOutputCharset [line 274]

String getOutputCharset( )

Get the charset used in the output Arabic strings



Tags:

return:  return current setting for class output Arabic charset
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


[ Top ]

method getWhereCondition [line 891]

String getWhereCondition( String $arg)

Build WHERE section of the SQL statement using defind lex's rules, search mode [AND | OR], and handle also phrases (inclosed by "") using normal LIKE condition to match it as it is.



Tags:

return:  The WHERE section in SQL statement (MySQL database engine format)
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

String   $arg   String that user search for in the database table

[ Top ]

method highlightRateSummary [line 815]

String highlightRateSummary( String $str, Integer $rate, String $keywords)

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

[ Top ]

method highlightSummary [line 775]

String highlightSummary( String $str, Integer $int, String $keywords)

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

[ Top ]

method highlightText [line 661]

String highlightText( String $str)

Highlighted all nouns in a given Arabic string



Tags:

return:  Arabic string in HTML format where all nouns highlighted
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

String   $str   Arabic string you want to highlighted all its nouns

[ Top ]

method int2str [line 428]

String int2str( Integer $number)

Spell integer number in Arabic idiom



Tags:

return:  The Arabic idiom that spells inserted number
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

Integer   $number   The number you want to spell in Arabic idiom

[ Top ]

method isFemale [line 405]

Boolean isFemale( String $string)

Check if Arabic word is feminine



Tags:

return:  Return true if input Arabic word is feminine
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

String   $string   Arabic word you want to check if it is feminine

[ Top ]

method isNoun [line 593]

TRUE isNoun( String $word, String $word_befor)

Check if given rabic word is noun or not



Tags:

return:  if given word is Arabic noun
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

String   $word   Word you want to check if it is noun (windows-1256)
String   $word_befor   The word before word you want to check

[ Top ]

method setInputCharset [line 226]

TRUE setInputCharset( String $charset)

Set charset used in class input Arabic strings



Tags:

return:  if success, or FALSE if fail
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

String   $charset   Input charset [utf-8|windows-1256|iso-8859-6]

[ Top ]

method setOutputCharset [line 246]

TRUE setOutputCharset( String $charset)

Set charset used in class output Arabic strings



Tags:

return:  if success, or FALSE if fail
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

String   $charset   Output charset [utf-8|windows-1256|iso-8859-6]

[ Top ]

method soundex [line 558]

String soundex( String $word)

Arabic soundex algorithm takes Arabic word as an input and produces a character string which identifies a set words that are (roughly) phonetically alike.



Tags:

return:  Soundex value for a given Arabic word
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

String   $word   Arabic word you want to calculate its soundex

[ Top ]

method swap_ae [line 453]

String swap_ae( String $string)

Make conversion to swap that odd Arabic text by original English sentence you meant when you type on your keyboard (if keyboard language was not correct)



Tags:

return:  Normal English string
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

String   $string   Odd Arabic string

[ Top ]

method swap_ea [line 478]

String swap_ea( String $string)

Make conversion to swap that odd English text by original Arabic sentence you meant when you type on your keyboard (if keyboard language was not correct)



Tags:

return:  Normal Arabic string
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

String   $string   Odd English string

[ Top ]

method tagText [line 621]

Array tagText( String $str)

Tag all words in a given Arabic string if they are nouns or not



Tags:

return:  Two dimension array where item[i][0] represent the word i in the given string, and item[i][1] is 1 if that word is noun and 0 if it is not
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

String   $str   Arabic string you want to tag all its words

[ Top ]

method utf8Glyphs [line 533]

String utf8Glyphs( $string, [Integer $max_chars = 50], [Boolean $hindo = true], String $str)

Convert Arabic Windows-1256 charset string into glyph joining in UTF-8 hexadecimals stream (take care of whole the document including English sections as well as numbers and arcs etc...)



Tags:

return:  Arabic glyph joining in UTF-8 hexadecimals stream (take care of whole document including English sections as well as numbers and arcs etc...)
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

String   $str   Arabic string in Windows-1256 charset
Integer   $max_chars   Max number of chars you can fit in one line
Boolean   $hindo   If true use Hindo digits else use Arabic digits
   $string  

[ Top ]


Documentation generated on Thu, 21 Feb 2008 13:58:50 +0200 by phpDocumentor 1.4.0