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

Class: ArWordTag

Source Location: /sub/ArWordTag.class.php

Class Overview


This PHP class to tagging Arabic Word


Author(s):

Copyright:

  • 2009 Khaled Al-Shamaa

Methods



Class Details

[line 119]
This PHP class to tagging Arabic Word



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


static method highlightText [line 251]

static string highlightText( string $str, [string $bg = '#FFEEAA'], [string $inputCharset = null], [string $outputCharset = null], [object $main = null])

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
string   $bg   Background color of the highlight Arabic text
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 ]

static method isNoun [line 137]

static boolean isNoun( string $word, string $word_befor, [string $inputCharset = null], [object $main = null])

Check if given rabic word is noun or not



Tags:

return:  TRUE 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
string   $inputCharset   (optional) Input charset [utf-8|windows-1256|iso-8859-6] default value is NULL (use set input charset)
object   $main   Main Ar-PHP object to access charset converter options

[ Top ]

static method tagText [line 200]

static array tagText( string $str, [string $inputCharset = null], [string $outputCharset = null], [object $main = null])

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
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 ]


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