benweet / stackedit

In-browser Markdown editor
https://stackedit.io/
Apache License 2.0
21.8k stars 2.73k forks source link

Feature request: word count for CJK languages #1433

Open Rasphino opened 5 years ago

Rasphino commented 5 years ago

I write a note in Chinese and I found stackedit did not count CJK words.

image

For CJK language, each character is a word, this is quite different from English. So, here is a formula for counting CJK words: words = english words + CJK characters I really hope Stackedit can add this feature, thanks in advance!

EmiLithium commented 5 years ago

I just ran into this issue too with a mixed note written in both English and Chinese. The Chinese strings are counted as one word (and many characters). This is an issue when users want to count English words normally and Chinese characters as words, because in this case both the character count and the word count become useless. I think since Chinese is often used in conjunction with English words, this situation is not totally uncommon.

Counting each Chinese character as a word (as @Rasphino suggested) is not perfect, but is significantly better than counting each string as one word made up of many characters.