Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update segmentation method using budoux? #21

Open
paithiov909 opened this issue Dec 21, 2023 · 0 comments
Open

Update segmentation method using budoux? #21

paithiov909 opened this issue Dec 21, 2023 · 0 comments

Comments

@paithiov909
Copy link
Owner

paithiov909 commented Dec 21, 2023

budouxはICU 73.2からすでに組み込まれており、V8経由でモジュールを呼ばなくても、stringi (>=1.8.1, 2023-11-09) から同等の出力を得ることができるっぽい。

audubon::strj_segment("今日はいい天気です。")
#> $`1`
#> [1] "今日は"     "いい"       "天気です。"

stringi::stri_split_boundaries(
  "今日はいい天気です。",
  opts_brkiter = stringi::stri_opts_brkiter(
    locale = "ja@ld=auto;lw=phrase"
  )
)
#> [[1]]
#> [1] "今日は"     "いい"       "天気です。"

Created on 2023-12-21 with reprex v2.0.2

参考

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant