Package nltk :: Package stem :: Module isri :: Class ISRIStemmer
[hide private]
[frames] | no frames]

type ISRIStemmer

source code

  object --+    
           |    
api.StemmerI --+
               |
              ISRIStemmer

ISRI Arabic stemmer based on algorithm: Arabic Stemming without a root dictionary. Information Science Research Institute. University of Nevada, Las Vegas, USA.

A few minor modifications have been made to ISRI basic algorithm. See the source code of this module for more information.

isri.stem(token) returns Arabic root for the given token.

The ISRI Stemmer requires that all tokens have Unicode string types. If you use Python IDLE on Arabic Windows you have to decode text first using Arabic '1256' coding.

Instance Methods [hide private]
 
__init__(self) source code
 
stem(self, token)
Stemming a word token using the ISRI stemmer.
source code
 
norm(self, num)
normalization: num=1 normalize diacritics num=2 normalize initial hamza num=3 both 1&2
source code
 
pre32(self)
remove length three and length two prefixes in this order
source code
 
suf32(self)
remove length three and length two suffixes in this order
source code
 
waw(self)
remove connective ‘و’ if it precedes a word beginning with ‘و’
source code
 
pro_w4(self)
process length four patterns and extract length three roots
source code
 
pro_w53(self)
process length five patterns and extract length three roots
source code
 
pro_w54(self)
process length five patterns and extract length four roots
source code
 
end_w5(self)
ending step (word of length five)
source code
 
pro_w6(self)
process length six patterns and extract length three roots
source code
 
pro_w64(self)
process length six patterns and extract length four roots
source code
 
end_w6(self)
ending step (word of length six)
source code
 
suf1(self)
normalize short sufix
source code
 
pre1(self)
normalize short prefix
source code
Method Details [hide private]

__init__(self)
(Constructor)

source code 
Overrides: object.__init__
(inherited documentation)

stem(self, token)

source code 

Stemming a word token using the ISRI stemmer.

Parameters:
  • token - The token that should be stemmed.
Overrides: api.StemmerI.stem