def get_sn(unit):
    """获取文本行的句子数量

    Keyword arguments:
    unit                    -- 文本行
    Return:
        sn                  -- 句数
    """
    sn = 0
    match_re = re.findall(str(sentence_delimiters), unit)
    if match_re:
        string = ''.join(match_re)
        sn = len(string)
    return int(sn)
def get_sn ( unit ) : sn = 0 match_re = re . findall ( str ( sentence_delimiters ) , unit ) if match_re : string = '' . join ( match_re ) sn = len ( string ) return int ( sn )
获取文本行的句子数量

    Keyword arguments:
    unit                    -- 文本行
    Return:
        sn                  -- 句数