(self)
process length five patterns and extract length three roots
process length five patterns and extract length three roots
process length five patterns and extract length three roots
def pro_w53(self):
        """process length five patterns and extract length three roots"""
        if ((self.stm[2] in self.pr53[0]) & (self.stm[0] == '\u0627')):    #  افتعل   -  افاعل
            self.stm = self.stm[1] + self.stm[3:]
            return self.stm
        elif ((self.stm[3] in self.pr53[1]) & (self.stm[0] == '\u0645')):     # مفعول  -   مفعال  -   مفعيل
            self.stm = self.stm[1:3] + self.stm[4]
            return self.stm
        elif ((self.stm[0] in self.pr53[2]) & (self.stm[4] == '\u0629')):      #  مفعلة  -    تفعلة   -  افعلة
            self.stm = self.stm[1:4]
            return self.stm
        elif ((self.stm[0] in self.pr53[3]) & (self.stm[2] == '\u062a')):        #  مفتعل  -    يفتعل   -  تفتعل
            self.stm = self.stm[1] + self.stm[3:]
            return self.stm
        elif ((self.stm[0] in self.pr53[4]) & (self.stm[2] == '\u0627')):      #مفاعل  -  تفاعل
            self.stm = self.stm[1] + self.stm[3:]
            return self.stm
        elif ((self.stm[2] in self.pr53[5]) & (self.stm[4] == '\u0629')):    #     فعولة  -   فعالة
            self.stm = self.stm[:2] + self.stm[3]
            return self.stm
        elif ((self.stm[0] in self.pr53[6]) & (self.stm[1] == '\u0646')):     #     انفعل   -   منفعل
            self.stm = self.stm[2:]
            return self.stm
        elif ((self.stm[3] == '\u0627') & (self.stm[0] == '\u0627')):     #   افعال
            self.stm = self.stm[1:3] + self.stm[4]
            return self.stm
        elif ((self.stm[4] == '\u0646') & (self.stm[3] == '\u0627')):      #   فعلان
            self.stm = self.stm[:3]
            return self.stm
        elif ((self.stm[3] == '\u064a') & (self.stm[0] == '\u062a')):        #    تفعيل
            self.stm = self.stm[1:3] + self.stm[4]
            return self.stm
        elif ((self.stm[3] == '\u0648') & (self.stm[1] == '\u0627')):       #     فاعول
            self.stm = self.stm[0] + self.stm[2] + self.stm[4]
            return self.stm
        elif ((self.stm[2] == '\u0627') & (self.stm[1] == '\u0648')):             #     فواعل
            self.stm = self.stm[0] + self.stm[3:]
            return self.stm
        elif ((self.stm[3] == '\u0626') & (self.stm[2] == '\u0627')):     #  فعائل
            self.stm = self.stm[:2] + self.stm[4]
            return self.stm
        elif ((self.stm[4] == '\u0629') & (self.stm[1] == '\u0627')):           #   فاعلة
            self.stm = self.stm[0] + self.stm[2:4]
            return self.stm
        elif ((self.stm[4] == '\u064a') & (self.stm[2] == '\u0627')):     # فعالي
            self.stm = self.stm[:2] + self.stm[3]
            return self.stm
        else:
            self.suf1()   # do - normalize short sufix
            if len(self.stm) == 5:
                self.pre1()   # do - normalize short prefix
            return self.stm
def pro_w53 ( self ) : if ( ( self . stm [ 2 ] in self . pr53 [ 0 ] ) & ( self . stm [ 0 ] == '\u0627' ) ) : #  افتعل   -  افاعل self . stm = self . stm [ 1 ] + self . stm [ 3 : ] return self . stm elif ( ( self . stm [ 3 ] in self . pr53 [ 1 ] ) & ( self . stm [ 0 ] == '\u0645' ) ) : # مفعول  -   مفعال  -   مفعيل self . stm = self . stm [ 1 : 3 ] + self . stm [ 4 ] return self . stm elif ( ( self . stm [ 0 ] in self . pr53 [ 2 ] ) & ( self . stm [ 4 ] == '\u0629' ) ) : #  مفعلة  -    تفعلة   -  افعلة self . stm = self . stm [ 1 : 4 ] return self . stm elif ( ( self . stm [ 0 ] in self . pr53 [ 3 ] ) & ( self . stm [ 2 ] == '\u062a' ) ) : #  مفتعل  -    يفتعل   -  تفتعل self . stm = self . stm [ 1 ] + self . stm [ 3 : ] return self . stm elif ( ( self . stm [ 0 ] in self . pr53 [ 4 ] ) & ( self . stm [ 2 ] == '\u0627' ) ) : #مفاعل  -  تفاعل self . stm = self . stm [ 1 ] + self . stm [ 3 : ] return self . stm elif ( ( self . stm [ 2 ] in self . pr53 [ 5 ] ) & ( self . stm [ 4 ] == '\u0629' ) ) : #     فعولة  -   فعالة self . stm = self . stm [ : 2 ] + self . stm [ 3 ] return self . stm elif ( ( self . stm [ 0 ] in self . pr53 [ 6 ] ) & ( self . stm [ 1 ] == '\u0646' ) ) : #     انفعل   -   منفعل self . stm = self . stm [ 2 : ] return self . stm elif ( ( self . stm [ 3 ] == '\u0627' ) & ( self . stm [ 0 ] == '\u0627' ) ) : #   افعال self . stm = self . stm [ 1 : 3 ] + self . stm [ 4 ] return self . stm elif ( ( self . stm [ 4 ] == '\u0646' ) & ( self . stm [ 3 ] == '\u0627' ) ) : #   فعلان self . stm = self . stm [ : 3 ] return self . stm elif ( ( self . stm [ 3 ] == '\u064a' ) & ( self . stm [ 0 ] == '\u062a' ) ) : #    تفعيل self . stm = self . stm [ 1 : 3 ] + self . stm [ 4 ] return self . stm elif ( ( self . stm [ 3 ] == '\u0648' ) & ( self . stm [ 1 ] == '\u0627' ) ) : #     فاعول self . stm = self . stm [ 0 ] + self . stm [ 2 ] + self . stm [ 4 ] return self . stm elif ( ( self . stm [ 2 ] == '\u0627' ) & ( self . stm [ 1 ] == '\u0648' ) ) : #     فواعل self . stm = self . stm [ 0 ] + self . stm [ 3 : ] return self . stm elif ( ( self . stm [ 3 ] == '\u0626' ) & ( self . stm [ 2 ] == '\u0627' ) ) : #  فعائل self . stm = self . stm [ : 2 ] + self . stm [ 4 ] return self . stm elif ( ( self . stm [ 4 ] == '\u0629' ) & ( self . stm [ 1 ] == '\u0627' ) ) : #   فاعلة self . stm = self . stm [ 0 ] + self . stm [ 2 : 4 ] return self . stm elif ( ( self . stm [ 4 ] == '\u064a' ) & ( self . stm [ 2 ] == '\u0627' ) ) : # فعالي self . stm = self . stm [ : 2 ] + self . stm [ 3 ] return self . stm else : self . suf1 ( ) # do - normalize short sufix if len ( self . stm ) == 5 : self . pre1 ( ) # do - normalize short prefix return self . stm