''

def cut(self, text):

    text = text.decode('utf-8', 'ignore')
    p = self.d
    ln = len(text)
    i = ln
    j = 0
    z = ln
    q = 0
    recognised = []
    mem = None
    mem2 = None
    while ((i - j) > 0):
        t = text[((i - j) - 1)].lower()
        if (not (t in p)):
            if ((mem != None) or (mem2 != None)):
                if (mem != None):
                    (i, j, z) = mem
                    mem = None
                elif (mem2 != None):
                    delta = (mem2[0] - i)
                    if (delta >= 1):
                        if ((delta < 5) and (re.search(u'[\\w\u2e80-\u9fff]', t) != None)):
                            pre = text[(i - j)]
                            if (not (pre in self.specialwords)):
                                (i, j, z, q) = mem2
                                del recognised[q:]
                        mem2 = None
                p = self.d
                if ((i < ln) and (i < z)):
                    unreg_tmp = self._pro_unreg(text[i:z])
                    recognised.extend(unreg_tmp)
                recognised.append(text[(i - j):i])
                i = (i - j)
                z = i
                j = 0
                continue
            j = 0
            i -= 1
            p = self.d
            continue
        p = p[t]
        j += 1
        if (chr(11) in p):
            if (j <= 2):
                mem = (i, j, z)
                if (((z - i) < 2) and (text[(i - 1)] in self.specialwords) and ((mem2 == None) or ((mem2 != None) and ((mem2[0] - i) > 1)))):
                    mem = None
                    mem2 = (i, j, z, len(recognised))
                    p = self.d
                    i -= 1
                    j = 0
                continue
            p = self.d
            if ((i < ln) and (i < z)):
                unreg_tmp = self._pro_unreg(text[i:z])
                recognised.extend(unreg_tmp)
            recognised.append(text[(i - j):i])
            i = (i - j)
            z = i
            j = 0
            mem = None
            mem2 = None
    if (mem != None):
        (i, j, z) = mem
        recognised.extend(self._pro_unreg(text[i:z]))
        recognised.append(text[(i - j):i])
    else:
        recognised.extend(self._pro_unreg(text[(i - j):z]))
    return recognised
