def make_pl_si_lists(lst, plending, siendingsize, dojoinstem=True):
    """
    given a list of singular words: lst
    an ending to append to make the plural: plending
    the number of characters to remove from the singular
        before appending plending: siendingsize
    a flag whether to create a joinstem: dojoinstem

    return:
    a list of pluralised words: si_list (called si because this is what you need to
                                         look for to make the singular)
    the pluralised words as a dict of sets sorted by word length: si_bysize
    the singular words as a dict of sets sorted by word length: pl_bysize
    if dojoinstem is True: a regular expression that matches any of the stems: stem
    """
    if siendingsize is not None:
        siendingsize = -siendingsize
    si_list = [w[:siendingsize] + plending for w in lst]
    pl_bysize = bysize(lst)
    si_bysize = bysize(si_list)
    if dojoinstem:
        stem = joinstem(siendingsize, lst)
        return si_list, si_bysize, pl_bysize, stem
    else:
        return si_list, si_bysize, pl_bysize
def make_pl_si_lists ( lst , plending , siendingsize , dojoinstem = True ) : if siendingsize is not None : siendingsize = - siendingsize si_list = [ w [ : siendingsize ] + plending for w in lst ] pl_bysize = bysize ( lst ) si_bysize = bysize ( si_list ) if dojoinstem : stem = joinstem ( siendingsize , lst ) return si_list , si_bysize , pl_bysize , stem else : return si_list , si_bysize , pl_bysize
given a list of singular words: lst
    an ending to append to make the plural: plending
    the number of characters to remove from the singular
        before appending plending: siendingsize
    a flag whether to create a joinstem: dojoinstem

    return:
    a list of pluralised words: si_list (called si because this is what you need to
                                         look for to make the singular)
    the pluralised words as a dict of sets sorted by word length: si_bysize
    the singular words as a dict of sets sorted by word length: pl_bysize
    if dojoinstem is True: a regular expression that matches any of the stems: stem