Is there a culture-sensitive way of identifying sentences in a string?
Or is 开发者_如何学Cthere a something in the .NET framework (or elsewhere) that provides culture specific sentence terminators
For example where English uses say '.', '!', '?' (and others) to mark the end of sentences, Chinese uses 。 and Thai uses a space.
I can't see how with stuff built into the framework. One thing you could do is to make a series of parsers and choose the correct one based on CultureInfo.CurrentCulture. That is, have a parser that implements a new interface called ISentenceParser and make a bunch of implementations that each handle sentence parsing according to a specific language. Then, when you need to parse, you get the one needed for your language.
A better question, though, is why is this necessary? I can think of very few situations where you would want to parse into sentences (though maybe I'm just not being creative enough :)).
i think that there is no such thing as end of sentence in dot net. so you have to use your own implementation of this. what are you trying to do?
精彩评论