【问题标题】:Javascript implementation of UAX 29 Unicode Text Segmentation? [closed]UAX 29 Unicode 文本分割的 Javascript 实现? [关闭]
【发布时间】:2014-06-21 14:42:04
【问题描述】:

有人知道UAX #29, Unicode Text Segmentation 的任何JavaScript 实现吗?我对Word Boundaries特别感兴趣。

当我遇到XRegExp 时,我是满怀希望的,但它似乎使用了\b 的标准JavaScript 实现。

【问题讨论】:

    标签: javascript unicode text-segmentation


    【解决方案1】:

    https://github.com/orling/grapheme-splitter是UAX #29 Grapheme Cluster Boundaries的纯js实现。

    还有一个关于使用 UAX #29 实现 Intl.Segmenter 的 ES 提案,请参阅https://github.com/tc39/proposal-intl-segmenter。

    【讨论】:

      【解决方案2】:

      https://www.npmjs.com/package/node-word-boundaries 是其中之一,但对于某些 unix 原生 unicode 库,它需要 Node;不是纯js。

      【讨论】:

        猜你喜欢
        • 2018-12-14
        • 1970-01-01
        • 1970-01-01
        • 2013-07-16
        • 2012-04-23
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多