def cut(x, list, ignore, max_len, is_summ):
    if (isinstance(x, float) and math.isnan(x)):
        if is_summ:
            list.append(WORD[EOS])
        else:
            list.append('')
    else:
        x = x.split()
        if (len(x) > max_len):
            x = x[:max_len]
            ignore[0] += 1
        if is_summ:
            x += [WORD[EOS]]
        list.append(x)
def cut(x, list, ignore, max_len, is_summ):
    if (isinstance(x, float) and math.isnan(x)):
        if is_summ:
            list.append(WORD[EOS])
        else:
            list.append()
    else:
        x = x.split()
        if (len(x) > max_len):
            x = x[:max_len]
            ignore[0] += 1
        if is_summ:
            x += [WORD[EOS]]
        list.append(x)