# Verbeter woord\_aantal berekening voor CJK berichten, of gebruik teken\_aantal

**URL:** https://meta.discourse.org/t/improve-word-count-calculation-for-cjk-posts-or-use-char-count/380085
**Category:** Bug
**Created:** [24 augustus 2025 om 15:10 UTC](https://meta.discourse.org/t/improve-word-count-calculation-for-cjk-posts-or-use-char-count/380085 "2025-08-24T15:10:01Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [24 augustus 2025 om 23:37 UTC](https://meta.discourse.org/t/improve-word-count-calculation-for-cjk-posts-or-use-char-count/380085/4 "2025-08-24T23:37:52Z")

</div>

Hmm, if we are smart about our pipeline we could use cppjieba.

> <https://github.com/discourse/discourse/blob/a8ed5b19f95107a0dafc463e4cbf99d84ea42311/lib/search.rb#L137-L132>

It would require that update\_index! would take care of this:

> <https://github.com/discourse/discourse/blob/a8ed5b19f95107a0dafc463e4cbf99d84ea42311/app/services/search_indexer.rb#L32-L32>

* * *

char count is probably the simplest thing though, given that reading the word `bla` is far faster than reading `supercalifragilisticexpialidocious`

I wonder if you can make some PR that changes so we lean on char count, then we can divide char count by 4 say for English and 2 for Chinese? (via some setting)

@lindsey this is an interesting topic for you.

---

_[View the full topic](https://meta.discourse.org/t/improve-word-count-calculation-for-cjk-posts-or-use-char-count/380085)._
