Extend the difference engine to include a string tokenization strategy
Rather than only allowing strings to be differenced at a character level, it would be useful to support differencing at a Word, Sentence and Line level as well.
Moved commits to branch string_token_strategy as part of #28
For visibility, found these helpful specifications for boundaries: Word Breaks, Line Breaks, Sentence Breaks, which provide helpful guidelines and tests which should be used for tokenisation logic.
So what we have here is the proverbial can of worms. After further research there are two key documents. Text Segmentation Unicode® Standard Annex 29 deals with Grapheme, Word and Sentence boundaries, and Line Breaking Unicode® Standard Annex 14 deals with an algorithm for line breaking.
Line breaking even has several approaches suggested, the better probably being the Pair Based Implementation, for which sample code is provided in C++.
Text Segmentation, however, is vastly more complex, and the most commonly used algorithm is implemented by ICU, of which there are several .NET NuGets available, the most useful being ICU-dotnet. However, all these solutions require you to install the ICU code on the target machine. A pure C# implementation appears absent.
As such, a nice enhancement, that appears to be needed by the .NET community is a pure .NET implementation of the above standards.
Probably need to rename UnicodeChar to UChar - as technically char is a UTF-16 (Unicode) character, whereas UChar is a UTF-32 character. Also, need to consider adding a UString implementation.
Ultimately, we may want to consider moving this to a new case.