Hyphenopoly icon indicating copy to clipboard operation
Hyphenopoly copied to clipboard

Intl.Segmenter

Open mnater opened this issue 3 years ago • 2 comments

There's a TC39 proposal (currently at stage 3) for an text segmentation API: https://github.com/tc39/proposal-intl-segmenter This could replace the current implementation that uses RegEx to find words. May be worth having a look at it, although browser support is still unsure...

mnater avatar Oct 09 '20 20:10 mnater

Chrome and Safari implement it. https://bugs.chromium.org/p/v8/issues/detail?id=6891#c42 https://webkit.org/blog/11648/new-webkit-features-in-safari-14-1/ FF not yet: https://bugzilla.mozilla.org/show_bug.cgi?id=1423593

mnater avatar Apr 29 '21 21:04 mnater

FF (122 nightly, since January 23, 2024) has Intl.Segmeter enabled (https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/122).

And its at stage 4 since Jan 21, 2022 (https://github.com/tc39/proposal-intl-segmenter/commit/f419484d5faad428624559bedea064a3b38a898d).

mnater avatar Apr 05 '24 20:04 mnater