Re: Word detection without separating spaces


 



On Sep 27, 2018, at 5:21 AM, Sandor Szatmari <admin.szatmari.net@...> wrote:

I’d like to be able to take something like AREALLYLONGSTRING and turn it into ‘a really long string’ or ‘a_really_long_string’ or basically insert whatever separator I want.

NSLinguisticTagger provides a lot of operations like finding word boundaries and identifying parts of speech. I don’t know if it can be made to identify English words without spaces between them.* Apple has added some newer APIs that use machine-learning to analyze natural language, but I can’t remember what the framework is called; maybe it has some support for that?

—Jens

* It does, however, detect word breaks in East Asian languages that don’t put any separator characters between words.

Join cocoa@apple-dev.groups.io to automatically receive all group messages.