nltk.stem.ISRIStemmer

class nltk.stem.ISRIStemmer[source]

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.

Methods

__init__()
end_w5(word) ending step (word of length five)
end_w6(word) ending step (word of length six)
norm(word[, num]) normalization:
pre1(word) normalize short prefix
pre32(word) remove length three and length two prefixes in this order
pro_w4(word) process length four patterns and extract length three roots
pro_w53(word) process length five patterns and extract length three roots
pro_w54(word) process length five patterns and extract length four roots
pro_w6(word) process length six patterns and extract length three roots
pro_w64(word) process length six patterns and extract length four roots
stem(token) Stemming a word token using the ISRI stemmer.
suf1(word) normalize short sufix
suf32(word) remove length three and length two suffixes in this order
waw(word) remove connective ‘و’ if it precedes a word beginning with ‘و’