Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CJK Character Descriptions and Definitions #635

Closed
nvaccessAuto opened this Issue Apr 27, 2010 · 38 comments

Comments

Projects
None yet
1 participant
@nvaccessAuto
Copy link

nvaccessAuto commented Apr 27, 2010

Reported by m11chen on 2010-04-27 08:09
Specific to the Chinese language (possibly also Japanese and Korean), allows for the review previous/current/next character script to initiate a query of a database containing definitions and nouns constructed from the character. This is important to blind users of the Chinese language in order to distinguish different characters with the same pronunciation.

I have made a very crude implementation of this functionality in the default.py appModule by tagging the character with five "" characters and then defining the correspondingly desired speech information in the builtin.dic speech dictionary.

Here are the changes I made to the review previous/current/next character scripts. Note that I also defined a "chtNounConstruct" variable in the config file for toggling on/off the functionality. The appended builtin.dic is a bit large, so I did not include it here.

def script_review_previousCharacter(self,keyPress):
    lineInfo=api.getReviewPosition().copy()
    lineInfo.expand(textInfos.UNIT_LINE)
    charInfo=api.getReviewPosition().copy()
    charInfo.expand(textInfos.UNIT_CHARACTER)
    charInfo.collapse()
    res=charInfo.move(textInfos.UNIT_CHARACTER,-1)
    if res==0 or charInfo.compareEndPoints(lineInfo,"startToStart")<0:
        speech.speakMessage(_("left"))
        reviewInfo=api.getReviewPosition().copy()
        reviewInfo.expand(textInfos.UNIT_CHARACTER)
        if config.conf[= reviewInfo._get_text()
            speech.speakMessage(_(c + "_____"))
        else:
            speech.speakTextInfo(reviewInfo,unit=textInfos.UNIT_CHARACTER,reason=speech.REASON_CARET)
    else:
        api.setReviewPosition(charInfo.copy())
        charInfo.expand(textInfos.UNIT_CHARACTER)
        if config.conf["speech"]("speech"]["chtNounConstruct"]:
            c)[= charInfo._get_text()
            speech.speakMessage(_(c + "_____"))
        else:
            speech.speakTextInfo(charInfo,unit=textInfos.UNIT_CHARACTER,reason=speech.REASON_CARET)
script_review_previousCharacter.__doc__=_("Moves the review cursor to the previous character of the current navigator object and speaks it")

def script_review_currentCharacter(self,keyPress):
    info=api.getReviewPosition().copy()
    info.expand(textInfos.UNIT_CHARACTER)
    if scriptHandler.getLastScriptRepeatCount()==0:
        if config.conf["speech"]("chtNounConstruct"]:
            c)[= info._get_text()
            speech.speakMessage(_(c + "_____"))
        else:
            speech.speakTextInfo(info,unit=textInfos.UNIT_CHARACTER,reason=speech.REASON_CARET)
    elif scriptHandler.getLastScriptRepeatCount()==1:
        if config.conf["speech"]("chtNounConstruct"]:
            c)[= info._get_text()
            speech.speakMessage(_(c + "_____"))
    else:
        try:
            c = ord(info._get_text())
            speech.speakMessage("%d," % c)
            speech.speakSpelling(hex(c))
        except:
            speech.speakTextInfo(info,unit=textInfos.UNIT_CHARACTER,reason=speech.REASON_CARET)
script_review_currentCharacter.__doc__=_("Reports the character at the current review cursor pressed twice will toggle on and off between phonetic spelling of alphabet or Chinese noun construct functionality pressed three times will report decimal and hexadecimal representation of the character encoding")

def script_review_nextCharacter(self,keyPress):
    lineInfo=api.getReviewPosition().copy()
    lineInfo.expand(textInfos.UNIT_LINE)
    charInfo=api.getReviewPosition().copy()
    charInfo.expand(textInfos.UNIT_CHARACTER)
    charInfo.collapse()
    res=charInfo.move(textInfos.UNIT_CHARACTER,1)
    if res==0 or charInfo.compareEndPoints(lineInfo,"endToEnd")>=0:
        speech.speakMessage(_("right"))
        reviewInfo=api.getReviewPosition().copy()
        reviewInfo.expand(textInfos.UNIT_CHARACTER)
        if config.conf["speech"]("chtNounConstruct"]:
            config.conf["speech"]["chtNounConstruct"]=False
            speech.speakTextInfo(info,unit=textInfos.UNIT_CHARACTER,reason=speech.REASON_CARET)
        else:
            config.conf["speech"]["chtNounConstruct"]=True
            c)[= reviewInfo._get_text()
            speech.speakMessage(_(c + "_____"))
        else:
            speech.speakTextInfo(reviewInfo,unit=textInfos.UNIT_CHARACTER,reason=speech.REASON_CARET)
    else:
        api.setReviewPosition(charInfo.copy())
        charInfo.expand(textInfos.UNIT_CHARACTER)
        if config.conf["speech"]("chtNounConstruct"]:
            c)["chtNounConstruct"]:
            c = charInfo._get_text()
            speech.speakMessage(_(c + "_____"))
        else:
            speech.speakTextInfo(charInfo,unit=textInfos.UNIT_CHARACTER,reason=speech.REASON_CARET)
script_review_nextCharacter.__doc__=_("Moves the review cursor to the next character of the current navigator object and speaks it")

Here are the 26 English alphabets and a few of the first chinese characters appended to the builtin.dic file for demonstration.

Phonetic spelling of alphabet

A_____ alpha 0 0
B_____ bravo 0 0
C_____ charlie 0 0
D_____ delta 0 0
E_____ echo 0 0
F_____ fox trot 0 0
G_____ golf 0 0
H_____ hotel 0 0
I_____ india 0 0
J_____ juliet 0 0
K_____ kilo 0 0
L_____ lima 0 0
M_____ mike 0 0
N_____ november 0 0
O_____ oscar 0 0
P_____ papa 0 0
Q_____ quebec 0 0
R_____ romeo 0 0
S_____ sierra 0 0
T_____ tango 0 0
U_____ uniform 0 0
V_____ victor 0 0
W_____ whiskey 0 0
X_____ x ray 0 0
Y_____ yankee 0 0
Z_____ zulu 0 0

Chinese character definition and noun construction

一_____ 一 數字 一言九鼎 一帆風順;第一名 百密一疏 百聞不如一見 0 0
乙_____ 乙 天干的第二位 乙等 乙醇 乙醚 乙等特考;太乙 聚乙烯 0 0
厂_____ 厂 山邊可以居住人的崖洞 0 0
匚_____ 匚 古代一種盛物的器具 0 0
刀_____ 刀 刀子 刀槍不入;菜刀 瑞士刀 0 0
乂_____ 乂 乂安 ; 俊乂 0 0
卜_____ 卜 卜卦 卜筮;占卜 求神問卜 賣卜測字 0 0
入_____ 入 入門 入迷 入埸券;進入 出入口 羊入虎口 0 0

I am not an expert programmer, so I am guessing this kind of crude implementation would not be on-par with what the NVDA Project expects from its contributers. If someone could reorganize the described functionality into something more acceptable, that would be great.

Thanks.

Blocked by #55

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented May 3, 2010

Comment 2 by m11chen on 2010-05-03 08:31


@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Nov 17, 2010

Comment 3 by m11chen on 2010-11-17 04:48
I have made a binary patch for a temporary solution to this ticket. The modified source code can be downloaded in the attachment. If you wish to test and use the function but you cannot run from source, please email me and I can provide you with the compiled binary library which works with the installed and portable version of the offical 2010.2 release. Note that you will need to make your own speech dictionary if you wish to use this with identifying Chinese characters. I am still in the process of making a full library, and I will be happy to include it when I am done.

Modified files:

..\source\appModules_default.py - Line 901:
Added a script to toggle on and off the noun construction functionality.
..\source\appModules_default_desktop.kdb - Line 90 and default_laptop.kdb - Line 128:
Assigned the toggle NounConstruction script the key combination NVDA+0.
..\source\config__init
_.py - Line 60:
Added a boolean variable for storing the state of the noun construction functionality.
..\source\speech.py - Line 171 in function speakSpellingGen:
Modified this function with a conditional statement to check whether the noun construction functionality is turned on. If turned on, the character to be spoken will be tagged with five "
" characters, which is used as a pointer to the location where the definitions and nouns are stored in the speech dictionary.
..\source\builtin.dict - Line 9:
Added phonetic replacements of alphabet as an example of how to format the speech dictionary entries to work with the chtNounConstruct functionality.

Note that the definitions and nouns of characters can be stored in either the builtin.dic, default.dic, or any other speech dictionaries specific to synthesizers. The advantage of storing in voice dictionaries or default dictionary instead of builtin.dic is the ability to modify entries through the NVDA menu on the fly.

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Nov 17, 2010

Attachment 2010.2_Ticket635_Source_code_modifications.rar added by m11chen on 2010-11-17 07:04
Description:
Modified source code for the releases/2010.2 branch to include noun construction functionality. Demenstration of this function through phonetic spelling of alphabet.

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Jan 20, 2011

Comment 4 by mdcurran on 2011-01-20 23:47
Firstly thanks very much for the code. Work on a new symbol framework for all languages is under way. Once this is completed the code in this ticket will certainly be used in some form or another, even if it is only as a reference.
Changes:
Milestone changed from None to near-term

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Feb 24, 2011

Attachment default.dic added by m11chen on 2011-02-24 05:14
Description:
A dictionary which can be used with the chtNounConstruct.py global plugin with phonetic spelling of alphabet and support for about 4000 Chinese characters. Courtesy by coscell@molerat.net

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Feb 24, 2011

Comment 5 by m11chen on 2011-02-24 05:29
I have attached a global plugin which consolidates all the required modifications for this functionality to work both when moving the caret and review cursor, but as Jamie pointed out, this is fairly hacky monkey patching, so any suggestions for imporvement would be greatly appreciated. Also, a default.dic dictionary containing about 4000 Chinese characters has been provided, courtesy by coscell@molerat.net .

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Mar 16, 2011

Attachment chtNounConstruct.py added by m11chen on 2011-03-16 05:55
Description:
A global plugin allowing toggling on and off speaking of Chinese character definitions and noun constructions to be announced by both caret and review cursor movement.

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Mar 31, 2011

Comment 7 by m11chen on 2011-03-31 08:21
Hi Jamie and Mick,

Thanks for making this enhancement a priority. There are many users in the blind Chinese community waiting for this functionality from NVDA. Would the support of Chinese input frameworks be within the scope of the upcoming work? Please let me know if there are any testing that I can do to help with the development.

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Apr 6, 2011

Comment 8 by m11chen on 2011-04-06 09:10
Hi,

I have written a new global plugin utilizing the new modifications from Character Description branch. This plugin will limit the verbosity of Chinese character descriptions to one noun at a time, and sequential calls to the getCharacterDescription function on the same character will enumerate through the list of nouns available from the dictionary. After the last noun is spoken, the function loops back to the first noun from the list.

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Apr 6, 2011

Comment 9 by m11chen on 2011-04-06 12:19
Updated attachment "chtEnumerateNoun.py". Sorry, the previous attachment was a debugging version and it does not work.

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Apr 6, 2011

Attachment chtNounConstruct_with_characterDescription.py added by m11chen on 2011-04-06 13:15
Description:
Updated the "chtNounConstruct" global plugin to reflect the changes in speech._speakSpellingGen function. The speaking of character descriptions can be toggled on and off for both system caret and review cursor movement. This is especially useful when proof reading Chinese documents for users using phonetic input methods.

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Apr 6, 2011

Attachment chtEnumerateNoun.py added by m11chen on 2011-04-06 13:27
Description:
This is a new plugin specifically designed for the Chinese language. The verbosity of the character descriptions for Chinese has been limited to one "noun" at each call to the getCharacterDescription function. Sequential calls to the getCharacterDescription function on the same character will enumerate through the list of available "nouns" in the dictionary, and loops back to the first "noun" when the list is exhausted.

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Apr 10, 2011

Comment 10 by m11chen (in reply to comment description) on 2011-04-10 04:30
Thanks to the hard work from the developers, this ticket now has a solution implemented in the core with the new characterProcessing module.
For Chinese as a special case, I have a few suggestions to the general user experience for retrieving character descriptions.
Since most Chinese characters have more than one character description, it would be desirable if the user can configure the number of descriptions spoken at a given time. This is especially useful if the character is very common, since the list of descriptions can be quite long for these characters.
Also, when proof reading Chinese text entries, it would be desirable if the character description can be spoken automatically when the caret or review cursor is moved. This is because for blind users using a phonetic input method, NVDA does not yet have the ability to read the candidate list for distinguishing characters with the same pronunciation.
Anew global plugin, “chtEnhancedUI.py”, has been added which demonstrates some of these enhancements that I have in mind. Note that this plugin overrides some of the same functions that were also modified in the other plugins that I attached to this ticket, so in order for it to function properly, all these other plugins needs to be removed first.
Comments and suggestions are very much appreciated.Replying to m11chen:

Specific to the Chinese language (possibly also Japanese and Korean), allows for the review previous/current/next character script to initiate a query of a database containing definitions and nouns constructed from the character. This is important to blind users of the Chinese language in order to distinguish different characters with the same pronunciation.

I have made a very crude implementation of this functionality in the default.py appModule by tagging the character with five "" characters and then defining the correspondingly desired speech information in the builtin.dic speech dictionary.

Here are the changes I made to the review previous/current/next character scripts. Note that I also defined a "chtNounConstruct" variable in the config file for toggling on/off the functionality. The appended builtin.dic is a bit large, so I did not include it here.

def script_review_previousCharacter(self,keyPress):

  lineInfo=api.getReviewPosition().copy()

  lineInfo.expand(textInfos.UNIT_LINE)

  charInfo=api.getReviewPosition().copy()

  charInfo.expand(textInfos.UNIT_CHARACTER)

  charInfo.collapse()

  res=charInfo.move(textInfos.UNIT_CHARACTER,-1)

  if res==0 or charInfo.compareEndPoints(lineInfo,"startToStart")<0:

      speech.speakMessage(_("left"))

      reviewInfo=api.getReviewPosition().copy()

      reviewInfo.expand(textInfos.UNIT_CHARACTER)

      if config.conf[             c = reviewInfo._get_text()

          speech.speakMessage(_(c + "_____"))

      else:

          speech.speakTextInfo(reviewInfo,unit=textInfos.UNIT_CHARACTER,reason=speech.REASON_CARET)

  else:

      api.setReviewPosition(charInfo.copy())

      charInfo.expand(textInfos.UNIT_CHARACTER)

      if config.conf["speech"]("speech"]["chtNounConstruct"]:

)[ c = charInfo._get_text()

          speech.speakMessage(_(c + "_____"))

      else:

          speech.speakTextInfo(charInfo,unit=textInfos.UNIT_CHARACTER,reason=speech.REASON_CARET)

script_review_previousCharacter.doc=_("Moves the review cursor to the previous character of the current navigator object and speaks it")

def script_review_currentCharacter(self,keyPress):

  info=api.getReviewPosition().copy()

  info.expand(textInfos.UNIT_CHARACTER)

  if scriptHandler.getLastScriptRepeatCount()==0:

      if config.conf["speech"]("chtNounConstruct"]:

)[ c = info._get_text()

          speech.speakMessage(_(c + "_____"))

      else:

          speech.speakTextInfo(info,unit=textInfos.UNIT_CHARACTER,reason=speech.REASON_CARET)

  elif scriptHandler.getLastScriptRepeatCount()==1:

      if config.conf["speech"]("chtNounConstruct"]:

)[ config.conf["speech"]("chtNounConstruct"]:

)[ speech.speakTextInfo(info,unit=textInfos.UNIT_CHARACTER,reason=speech.REASON_CARET)

      else:

          config.conf["speech"]("chtNounConstruct"]=False

)[ c = info._get_text()

          speech.speakMessage(_(c + "_____"))

  else:

      try:

          c = ord(info._get_text())

          speech.speakMessage("%d," % c)

          speech.speakSpelling(hex(c))

      except:

          speech.speakTextInfo(info,unit=textInfos.UNIT_CHARACTER,reason=speech.REASON_CARET)

script_review_currentCharacter.doc=_("Reports the character at the current review cursor pressed twice will toggle on and off between phonetic spelling of alphabet or Chinese noun construct functionality pressed three times will report decimal and hexadecimal representation of the character encoding")

def script_review_nextCharacter(self,keyPress):

  lineInfo=api.getReviewPosition().copy()

  lineInfo.expand(textInfos.UNIT_LINE)

  charInfo=api.getReviewPosition().copy()

  charInfo.expand(textInfos.UNIT_CHARACTER)

  charInfo.collapse()

  res=charInfo.move(textInfos.UNIT_CHARACTER,1)

  if res==0 or charInfo.compareEndPoints(lineInfo,"endToEnd")>=0:

      speech.speakMessage(_("right"))

      reviewInfo=api.getReviewPosition().copy()

      reviewInfo.expand(textInfos.UNIT_CHARACTER)

      if config.conf["speech"]("chtNounConstruct"]=True

)[ c = reviewInfo._get_text()

          speech.speakMessage(_(c + "_____"))

      else:

          speech.speakTextInfo(reviewInfo,unit=textInfos.UNIT_CHARACTER,reason=speech.REASON_CARET)

  else:

      api.setReviewPosition(charInfo.copy())

      charInfo.expand(textInfos.UNIT_CHARACTER)

      if config.conf["speech"]("chtNounConstruct"]:

)["chtNounConstruct"]:

          c = charInfo._get_text()

          speech.speakMessage(_(c + "_____"))

      else:

          speech.speakTextInfo(charInfo,unit=textInfos.UNIT_CHARACTER,reason=speech.REASON_CARET)

script_review_nextCharacter.doc=_("Moves the review cursor to the next character of the current navigator object and speaks it")

Here are the 26 English alphabets and a few of the first chinese characters appended to the builtin.dic file for demonstration.

#Phonetic spelling of alphabet

A_____ alpha 0 0

B_____ bravo 0 0

C_____ charlie 0 0

D_____ delta 0 0

E_____ echo 0 0

F_____ fox trot 0 0

G_____ golf 0 0

H_____ hotel 0 0

I_____ india 0 0

J_____ juliet 0 0

K_____ kilo 0 0

L_____ lima 0 0

M_____ mike 0 0

N_____ november 0 0

O_____ oscar 0 0

P_____ papa 0 0

Q_____ quebec 0 0

R_____ romeo 0 0

S_____ sierra 0 0

T_____ tango 0 0

U_____ uniform 0 0

V_____ victor 0 0

W_____ whiskey 0 0

X_____ x ray 0 0

Y_____ yankee 0 0

Z_____ zulu 0 0

#Chinese character definition and noun construction

一_____ 一 數字 一言九鼎 一帆風順;第一名 百密一疏 百聞不如一見 0 0

乙_____ 乙 天干的第二位 乙等 乙醇 乙醚 乙等特考;太乙 聚乙烯 0 0

厂_____ 厂 山邊可以居住人的崖洞 0 0

匚_____ 匚 古代一種盛物的器具 0 0

刀_____ 刀 刀子 刀槍不入;菜刀 瑞士刀 0 0

乂_____ 乂 乂安 ; 俊乂 0 0

卜_____ 卜 卜卦 卜筮;占卜 求神問卜 賣卜測字 0 0

入_____ 入 入門 入迷 入埸券;進入 出入口 羊入虎口 0 0

I am not an expert programmer, so I am guessing this kind of crude implementation would not be on-par with what the NVDA Project expects from its contributers. If someone could reorganize the described functionality into something more acceptable, that would be great.

Thanks.

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Apr 10, 2011

Comment 11 by m11chen on 2011-04-10 04:32
Changes:
Changed title from "Chinese Character Definition and Noun Construction" to "Chinese Character Descriptions and Definitions"

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Apr 15, 2011

Comment 12 by m11chen on 2011-04-15 13:13
Hi,
I am thinking that maybe we should make a special case for the zh_TW locale, since most of the characters have more than one description. In my global plugin "chtEnhancedUI.py", I have some functionality that I would like to implement, maybe as a global plugin after the stable 2011.2 release, if the character descriptions branch gets merged into the release.

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Apr 15, 2011

Comment 13 by jteh on 2011-04-15 13:22
Why does that make zh_tw a special case? There will probably be other languages that are similar and have multiple examples for many characters. Special cases are generally a bad thing.

When reading descriptions for a single character, if you need to hear further examples, you just keep listening. When spelling, only the first example for each character is now spoken to avoid insane length. You can then move character by character if you really need further examples for one of the characters.

I think this ticket is satisfied by character descriptions and should be closed as fixed. If you have further requirements, please make them clear. Alternatively, if you choose to implement additional functionality in a plugin, you are of course welcome to do that, but it will be provided as a third party plugin and therefore isn't relevant to the core project.

Btw, character descriptions has already been merged into main, so it will be included in 2011.2.

Thanks for your input.

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Apr 15, 2011

Comment 14 by jteh on 2011-04-15 13:26
The one request i see isn't satisfied is the ability to have descriptions read by default when moving by character. Mick, do you think we should add an option for this?

Note that we will eventually implement support for TSF, so the candidate list will be read.

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Apr 16, 2011

Comment 15 by m11chen (in reply to comment 14) on 2011-04-16 02:00
Replying to jteh:

The one request i see isn't satisfied is the ability to have descriptions read by default when moving by character. Mick, do you think we should add an option for this?

Note that we will eventually implement support for TSF, so the candidate list will be read.

Another functionality is the ability to read the list of multiple descriptions one description at a time. Currently, when the user presses numpad2 twice quickly, the entire list is spoken. I was thinking maybe only the first description should be read on the first key press, the second description on the second key press, and so on.

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Apr 16, 2011

Comment 16 by jteh (in reply to comment 15) on 2011-04-16 04:21
Replying to m11chen:

Another functionality is the ability to read the list of multiple descriptions one description at a time. Currently, when the user presses numpad2 twice quickly, the entire list is spoken. I was thinking maybe only the first description should be read on the first key press, the second description on the second key press, and so on.

Why? I imagine that if you want the second description, you're only going to know that after you realise the first isn't enough. If you already know the first isn't enough, you probably don't need to hear the descriptions at all. Also, this breaks pressing review current character three times to get the decimal and hexadecimal character codes and there's no way of implementing it if you want it to be enabled by default when reading by character.

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Apr 16, 2011

Comment 17 by m11chen (in reply to comment 16) on 2011-04-16 05:30
Replying to jteh:

Replying to m11chen:

Another functionality is the ability to read the list of multiple descriptions one description at a time. Currently, when the user presses numpad2 twice quickly, the entire list is spoken. I was thinking maybe only the first description should be read on the first key press, the second description on the second key press, and so on.

Why? I imagine that if you want the second description, you're only going to know that after you realise the first isn't enough. If you already know the first isn't enough, you probably don't need to hear the descriptions at all. Also, this breaks pressing review current character three times to get the decimal and hexadecimal character codes and there's no way of implementing it if you want it to be enabled by default when reading by character.

Yeah, I know this might sound trivial in English, as the analogy is something like "a as in alpha, a as in apple, a as in after... But since the characterDescriptions.py for Chinese has a long list of descriptions for many of the more common characters, allowing the user to cycle through the list one description at a time is very useful for some of the more ambiguous characters. Anyways, if this doesn't seem like something that might make it into the core, I am happy to write a global plugin after the code stabilizes. I think reading candidates in TSF and IME are of much higher priority. Thanks for the hard work to help the blind Chinese community. =)

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Jun 9, 2011

Comment 18 by jteh on 2011-06-09 03:04
Changes:
Milestone changed from near-term to None

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Oct 25, 2012

Attachment chtEnhancedUI.py added by m11chen on 2012-10-25 23:07
Description:
Updated to work with main 5588

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Feb 13, 2013

Comment 19 by jteh on 2013-02-13 08:32
I assume this is fixed by the input composition support?

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented May 30, 2013

Comment 20 by nishimotz on 2013-05-30 10:36
Review previous/current/next character scripts should be configurable for the use with Japanese language as well.
Japanese users want to know the descriptions without pressing numpad2 or NVDA+period twice for each character.

In NVDAJP, Japanese team has modified their behaviors as written in the document:
http://www.nvda.jp/nvda2013.1jp/en/readmejp.html#toc12
The implementation is similar to the plugin shown above.

We are using "pressing numpad2 or NVDA+period twice" as the enabling or disabling the description mode, rather than the description announcement itself.

Japanese team is now thinking that we should return to the original specification, so we may change the toggle operation to "numpad2 or NVDA+period four-times".

Anyway, we should discuss with other Asian language users regarding this.

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Aug 11, 2013

Attachment chtEnhancedUI.nvda-addon added by m11chen on 2013-08-11 08:35
Description:
This add-on allows the user to listen to the first description of the character when moving the review and input cursor. Pressing NVDA+0 toggles on and off the added functionalities. NumPad2 and Shift+numpad2 enumerates through the list with the hexadecimal representation appended at the end of the list.

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Aug 11, 2013

Comment 21 by m11chen on 2013-08-11 08:41
Currently, when the system default language is set to English, the character descriptions for the Chinese characters are not loaded into the NVDA dictionary. The result is that even when switching to the PinYin input method, no character descriptions are spoken in the candidate list. How might I be able to automatically load the "zh" characterDescriptions.dic file either when the input method switches to Chinese or when my plugin loads at the start of NVDA?

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Aug 11, 2013

Comment 22 by jteh on 2013-08-11 10:13
The language for character descriptions is determined from the speech synthesiser or the NVDA user interface language if the synth doesn't report a language or auto language switching is disabled. Are you using a broken synth or do you ahve auto language switching disabled?

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented May 29, 2014

Comment 23 by nvdakor on 2014-05-29 05:44
Hi,
Personally, I'd go with the original code (Korean users are asking for announcement of jamo characters when numpad 2 is pressed twice). If only we can query Unicode ranges...
At least for Korean, a simple fix is to modify the character descriptions dictionary to include jamo characters (it'll take several weeks to do it; possibly less since LibLouis Korean table contains all the characters used in Korean script, so we can borrow this somehow)).
Thanks.

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Aug 8, 2014

Comment 24 by m11chen on 2014-08-08 02:12
Changes:
Changed title from "Chinese Character Descriptions and Definitions" to "CJK Character Descriptions and Definitions"

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Aug 8, 2014

Attachment CJKEnhancedUI_v1.2.nvda-addon added by m11chen on 2014-08-08 02:32
Description:
Added Braille support.

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Aug 8, 2014

Comment 25 by m11chen on 2014-08-08 02:40
Changes:
State: closed

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Aug 8, 2014

Comment 26 by nvdakor (in reply to comment 25) on 2014-08-08 05:16
Replying to m11chen:
Hi,
No, it's not fixed. Submitting an add-on does not mean the ticket should be closed as fixed. I've reopened it just in case someone wants to review your code. Thanks.
Changes:
State: reopened

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Aug 8, 2014

Comment 27 by nvdakor on 2014-08-08 05:37
Hi, mostly Mick, Takuya and other CJK users:
Would it be possible to incorporate this add-on into core? There are certain things that should be cleaned out in the add-on code.
@m11chen: could you please send a message to either nvda-devel or nvda-addons list so others can review and test your add-on? And next time, please don't close the ticket just because an add-on has been posted. Thanks.

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Aug 8, 2014

Comment 28 by m11chen (in reply to comment 26) on 2014-08-08 05:45
Sorry, I thought to close this because James commented to have this close a while ago when most of the related functionalities were implemented. I just thought maybe the additional features seemed more suitable as an add-on instead of part of core, so there's no point keeping this open.

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Aug 8, 2014

Comment 29 by nvdakor (in reply to comment 28) on 2014-08-08 05:54
eReplying to m11chen:

Sorry, I thought to close this because James commented to have this close a while ago when most of the related functionalities were implemented. I just thought maybe the additional features seemed more suitable as an add-on instead of part of core, so there's no point keeping this open.

Hi,
I see. If Jamie said it should be closed, then let's close it (thanks for the add-on, I'm reviewing it).
Thanks.

Changes:
State: closed

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Aug 8, 2014

Comment 30 by jteh on 2014-08-08 05:59
I said it should be closed if the requirements are satisfied. It sounds like they aren't, but this ticket is getting very confusing and it's difficult to determine what the requirements actually are. Are we just dealing with two requirements (comment:14 and comment:15) or are there others? Are these both requirements that are desired by many users or very few?

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Aug 8, 2014

Comment 31 by m11chen (in reply to comment 30) on 2014-08-08 06:41
Initially when I opened this ticket, there was only one general requirement, namely the ability for CJK users to identify characters with the same phonetic pronunciation. But as time went on, the requirements became more complex and specific. I apologize in that I probably should have opened other tickets for each added feature to better organize them instead of keep changing the descriptions/comments so the developers would have an easier time managing the development process.

Personally, as a Traditional Chinese user, I think the three main requirements are satisfied:

  1. Ability to identify characters in editable text fields.
  2. Ability to identify characters at the review cursor.
  3. Ability to identify characters in the input composition window for various input methods.

Unless other CJK users encounter problems with the above three, I think we should just leave this closed before it gets more confusing.

@nvaccessAuto

This comment has been minimized.

Copy link
Author

nvaccessAuto commented Aug 8, 2014

Comment 32 by nishimotz on 2014-08-08 10:39
Thank you for making this add-on.
CJKEnhancedUI_v1.2.nvda-addon is working mostly fine with Japanese,
however, this behavior is too verbose for pre-edit strings of Japanese input methods:
i.e. we just want to hear what we typed as phonetic characters,
rather than the descriptions of phonetic characters,
before transliterating into ideographic characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.