Studyzy.LearnEnglishBySubtitle.SentenceParse.GetSentences C# (CSharp) 메소드

GetSentences() 개인적인 메소드

把一段话拆分成多个句子
private GetSentences ( string line ) : IList
line string
리턴 IList
        private IList<string> GetSentences(string line)
        {
            return line.Split(new[] {'.', '"', '\r', '\n', '?', '!'},StringSplitOptions.RemoveEmptyEntries)
                .Select(s=>s.Trim()).ToList();//去掉句子前后的空格
        }