Split text into sentences in C#

前端 未结 4 505
栀梦
栀梦 2020-12-14 12:39

I want to divide a text into sentences. A sentence ends with (dot) or ? or ! followed by one or more whitespace characters followed and the next sentence starts with an uppe

4条回答
  •  遥遥无期
    2020-12-14 13:09

    What languages do you want to support? For example, in Thai there are no spaces between words and sentences are separated with space. So, in general, this task is very complex. Also consider the useful comment by Fredrik Mörk.

    So, at first you need to define set of rules on what "sentence" is. Then you are welcome to use one of the suggested solutions.

提交回复
热议问题