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:

  • 2006-2010 Khaled Al-Shamaa

Variables

Methods



Class Details

[line 121]
This PHP class to tagging Arabic Word



Tags:

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


[ Top ]


Class Variables

static $normalizeAlef = array('أ','إ','آ')

[line 127]



Tags:

access:  protected

Type:   mixed


[ Top ]

static $normalizeDiacritics = array('َ','ً','ُ','ٌ','ِ','ٍ','ْ','ّ')

[line 128]



Tags:

access:  protected

Type:   mixed


[ Top ]

static $particlePreNouns = array('عن', 'في', 'مذ', 'منذ', 'من', 
                                                  'الى', 'على', 'حتى', 'الا', 
                                                  'غير', 'سوى', 'خلا', 'عدا', 
                                                  'حاشا', 'ليس')

[line 123]



Tags:

access:  protected

Type:   mixed


[ Top ]

$highlightTextInput =  'windows-1256'

[line 170]

"highlightText" method input charset



Tags:

access:  public

Type:   String


[ Top ]

$highlightTextOutput =  'windows-1256'

[line 164]

"highlightText" method output charset



Tags:

access:  public

Type:   String


[ Top ]

$highlightTextVars = array('str')

[line 176]

Name of the textual "highlightText" method parameters



Tags:

access:  public

Type:   Array


[ Top ]

$isNounInput =  'windows-1256'

[line 134]

"isNoun" method input charset



Tags:

access:  public

Type:   String


[ Top ]

$isNounVars = array('word', 'word_befor')

[line 140]

Name of the textual "isNoun" method parameters



Tags:

access:  public

Type:   Array


[ Top ]

$tagTextInput =  'windows-1256'

[line 152]

"tagText" method input charset



Tags:

access:  public

Type:   String


[ Top ]

$tagTextOutput =  'windows-1256'

[line 146]

"tagText" method output charset



Tags:

access:  public

Type:   String


[ Top ]

$tagTextVars = array('str')

[line 158]

Name of the textual "tagText" method parameters



Tags:

access:  public

Type:   Array


[ Top ]



Class Methods


static method highlightText [line 354]

static string highlightText( string $str, [string $style = 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   $style   Name of the CSS class you would like to apply

[ Top ]

static method isNoun [line 195]

static boolean isNoun( string $word, string $word_befor)

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

[ Top ]

static method tagText [line 321]

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

constructor __construct [line 181]

ArWordTag __construct( )

Loads initialize values



Tags:

access:  public


[ Top ]


Documentation generated on Sat, 14 Aug 2010 13:23:58 -0700 by phpDocumentor 1.4.0