I am trying to split a sentence / phrase into words using Regex.
var phrase = "This isn't a test."; var words = Regex.Split(phrase, @"\W+").ToList();
contains "This", "isn", "t", "a", "test"
Obviously, he raises an apostrophe and splits into it. Can I change this behavior? It should also be multilingual, supporting various languages ββ(Spanish, French, Russian, Korean, etc.).
I need to pass words to spellcheck. In particular, Nhunspell.
return (from word in words let correct = _engine[langId].Spell(word) where !correct select word).ToList();
source share