hexo-theme-aurora icon indicating copy to clipboard operation
hexo-theme-aurora copied to clipboard

English Article Word Count Incorrect

Open HarryWangATX opened this issue 3 years ago • 4 comments

Right now the word count for english counts the characters. I think we can define what language in the front matter and have a different way to count words for Chinese and English.

HarryWangATX avatar Apr 16 '21 14:04 HarryWangATX

Currently there are no filtering for language, it just count the string length. If you think it's wrong, just because the counter filter out all the HTML or special characters. That's why it might seem different from your local word count, but I do think filtering out all the article unrelated character makes more sense.

bennyxguo avatar Apr 17 '21 02:04 bennyxguo

I think you should for english split the array up into different chunks with a " " for English and just count number of characters for Chinese.

HarryWangATX avatar Apr 17 '21 03:04 HarryWangATX

I think you should for english split the array up into different chunks with a " " for English and just count number of characters for Chinese.

I might consider improving the character count later on versions.

bennyxguo avatar Apr 17 '21 06:04 bennyxguo

sure!

HarryWangATX avatar Apr 17 '21 06:04 HarryWangATX