Support » Fixing WordPress » WP2.6 word count malfunctioning in Chinese

  • peterwongpp

    (@peterwongpp)


    I was upgraded to 2.6 recently. But I immediately found that the new feature ‘word count’ worked incorrectly.

    It works perfectly in English. But it counts a paragragh of Chinese words as 1 instead of a Chinese word as 1. For example, the following words quoted shoule be 13 words, but the ‘word count’ counts it only two words.

    這是測試用的

    但顯示卻不正常

    Do anyone have this problem like me? And do anyone know how to solve this problem?

    Thanks for answering.

Viewing 7 replies - 1 through 7 (of 7 total)
  • peterwongpp

    (@peterwongpp)

    Also the Version Comparing malfunctioned like Word Count. It counts a paragragh of Chinese Words as one word.

    Moderator Andrew Ozz

    (@azaozz)

    WordPress Dev

    Unfortunately, I think only a Chinese speaking developer would be able to fix that…

    peterwongpp

    (@peterwongpp)

    Are there any resources about how word count works or where are those source codes for the function? I would like to take a look at the source code to see if I make any improvements for it.

    rawalex

    (@rawalex)

    peterwongpp, I am not sure how wordpress counts them exactly, but the standard for counting “words” in english is every 5 characters is a word, plus or minus. Some people do it by counting a solid grouping as a single word, which may be more what wordpress is doing here.

    Moderator Andrew Ozz

    (@azaozz)

    WordPress Dev

    Sure, the code is in wp-admin/js/word-count.js and on trac here:
    http://trac.wordpress.org/browser/trunk/wp-admin/js/word-count.js

    However as rawalex mentions, there are different standards for different languages. Also the script should be very fast, shouldn’t interfere with the user typing a long post even on a slower computer.

    TTK

    (@ttk_2k)

    Is there anyway to turn this feature COMPLETELY OFF?!

    Moderator Nikolay Bachiyski

    (@nbachiyski)

    There is a plugin, which counts thw words properly in Chinese:

    http://www.charlestang.cn/chinese-wordcount.htm

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘WP2.6 word count malfunctioning in Chinese’ is closed to new replies.