(self)
process length six patterns and extract length three roots
process length six patterns and extract length three roots
process length six patterns and extract length three roots
def pro_w6(self):
        """process length six patterns and extract length three roots"""
        if ((self.stm.startswith('\u0627\u0633\u062a')) or (self.stm.startswith('\u0645\u0633\u062a'))):   #   مستفعل   -    استفعل
            self.stm = self.stm[3:]
            return self.stm
        elif (self.stm[0] == '\u0645' and self.stm[3] == '\u0627' and self.stm[5] == '\u0629'):      #     مفعالة
            self.stm = self.stm[1:3] + self.stm[4]
            return self.stm
        elif (self.stm[0] == '\u0627' and self.stm[2] == '\u062a' and self.stm[4] == '\u0627'):      #     افتعال
            self.stm = self.stm[1] + self.stm[3] + self.stm[5]
            return self.stm
        elif (self.stm[0] == '\u0627' and self.stm[3] == '\u0648' and self.stm[2] == self.stm[4]):      #    افعوعل
            self.stm = self.stm[1] + self.stm[4:]
            return self.stm
        elif (self.stm[0] == '\u062a' and self.stm[2] == '\u0627' and self.stm[4] == '\u064a'):      #     تفاعيل    new pattern
            self.stm = self.stm[1] + self.stm[3] + self.stm[5]
            return self.stm
        else:
            self.suf1()    # do - normalize short sufix
            if len(self.stm) == 6:
                self.pre1()    # do - normalize short prefix
            return self.stm
def pro_w6 ( self ) : if ( ( self . stm . startswith ( '\u0627\u0633\u062a' ) ) or ( self . stm . startswith ( '\u0645\u0633\u062a' ) ) ) : #   مستفعل   -    استفعل self . stm = self . stm [ 3 : ] return self . stm elif ( self . stm [ 0 ] == '\u0645' and self . stm [ 3 ] == '\u0627' and self . stm [ 5 ] == '\u0629' ) : #     مفعالة self . stm = self . stm [ 1 : 3 ] + self . stm [ 4 ] return self . stm elif ( self . stm [ 0 ] == '\u0627' and self . stm [ 2 ] == '\u062a' and self . stm [ 4 ] == '\u0627' ) : #     افتعال self . stm = self . stm [ 1 ] + self . stm [ 3 ] + self . stm [ 5 ] return self . stm elif ( self . stm [ 0 ] == '\u0627' and self . stm [ 3 ] == '\u0648' and self . stm [ 2 ] == self . stm [ 4 ] ) : #    افعوعل self . stm = self . stm [ 1 ] + self . stm [ 4 : ] return self . stm elif ( self . stm [ 0 ] == '\u062a' and self . stm [ 2 ] == '\u0627' and self . stm [ 4 ] == '\u064a' ) : #     تفاعيل    new pattern self . stm = self . stm [ 1 ] + self . stm [ 3 ] + self . stm [ 5 ] return self . stm else : self . suf1 ( ) # do - normalize short sufix if len ( self . stm ) == 6 : self . pre1 ( ) # do - normalize short prefix return self . stm