vanderlee / phpSyllable

PHP Syllable splitter/counter and Hyphenator for text and HTML. Multi-language, customisable, cached and fast!
http://vanderlee.github.io/phpSyllable/
117 stars 80 forks source link

Request for feedback; deprecated splitWord #57

Closed vanderlee closed 1 year ago

vanderlee commented 1 year ago

Looking into the data splitWord method in Syllable appears to be somewhat useless; it produces incorrect results at times.

When provided with the same single-word input with random punctuation, splitText produces the results expected for splitWord.

Propose to mark splitWord as deprecated and route to splitText internally.

Similarly, the proposed splitWords would be better based on splitText.

alexander-nitsche commented 1 year ago

splitWord is probably faster than splitText if used for a single word. Would keep it.

alexander-nitsche commented 1 year ago

Can this issue be closed?

vanderlee commented 1 year ago

Agreed