[Spell checking] How to ignore CJK Characters?

Oxygen general issues.
293799
Posts: 5
Joined: Thu Apr 16, 2020 4:42 am

[Spell checking] How to ignore CJK Characters?

Post by 293799 »

When writing documents in both English and Chinese, I need spell checking to check for English misspellings.

However, Chinese characters are incorrectly treated as misspellings.

Snipaste_2020-04-15_22-11-59.png
Snipaste_2020-04-15_22-11-59.png (121.1 KiB) Viewed 1379 times

Is it possible to let the spell checker ignore CJK (Chinese, Japanese, Korean) characters?
Attachments
image.png
image.png (143.08 KiB) Viewed 1379 times
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: [Spell checking] How to ignore CJK Characters?

Post by Radu »

Hi,

Our automatic spell checker looks for xml:lang attributes on DITA elements to see in what language it should check. The default language is English but if you set the language code for the Chinese and Korean paragraphs like this:

Code: Select all

<p xml:lang="zh-CN">Chinese text here</p>
Oxygen's spell checker will skip those elements because it does not have a default Chinese spell checker installed.
You can install extra dictionaries in our spell checker based on the Open Office set of dictionaries:

https://www.oxygenxml.com/doc/versions/ ... onary.html

but unfortunately there does not seem to be available dictionaries for Chinese or Korean.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
293799
Posts: 5
Joined: Thu Apr 16, 2020 4:42 am

Re: [Spell checking] How to ignore CJK Characters?

Post by 293799 »

Hello Radu,

Thank you for your reply! That was helpful.

However, if a single paragraph contains both English and Chinese content, setting the lang attribute to Chinese will disable spell checking for English content.

Image

It seems like I have to apply another element specifically to contain any Chinese content in order to let the spell checker ignore those Chinese content.

It would be nice if Oxygen's spell checker can automatically ignore any CJK (Chinese, Japanese, Korean) characters without having to use a special element to contain them. There are other editors that have this feature (spell check for English while ignoring CJK characters), for example, Microsoft Word, Adobe Framemaker, VS code. (Also there are lots of editors that do not seem to support this feature, for example, Atom).
Attachments
Untitled.png
Untitled.png (12.38 KiB) Viewed 1359 times
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: [Spell checking] How to ignore CJK Characters?

Post by Radu »

Hi,

I had no idea MS Word somehow skips over Chinese (and probably also other more complex) characters when spell checking. In a way this makes sense, I added an internal issue to consider doing the same. From what I tested the spell checker in a web browser's text area seems to do the same. If we manage to add this improvement in a future Oxygen version we'll update this form thread.
If you have any other suggestions for us related to using Chinese content with Oxygen XML Editor please do not hesitate to tell us.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply