Jump to content
Chinese-forums.com
Learn Chinese in China
  • Why you should look around

    Since 2003, Chinese-forums.com has been helping people learn Chinese faster and get to China sooner. Our members can recommend beginner textbooks, help you out with obscure classical vocabulary, and tell you where to get the best street food in Xi'an. And we're friendly about it too. 

    Have a look at what's going on, or search for something specific. We hope you'll join us. 
imron

Pinyinput - Type Pinyin with Tone Marks

Recommended Posts

imron

Unfortunately it's either one or the other, and I don't really want to have to maintain two different versions. I don't know how many other keyboard layouts you use, but keyboard shortcuts could potentially solve most of your hassles. e.g.

alt-shift will swap between countries/regions, and ctrl-shift will change between layouts for that country/region. (note, you need to use the alt/ctrl/shift on the left hand side of the keyboard)

So if you put Traditional Chinese and US keyboard under the layout for Taiwan, and pinyinput under the layout for PRC, then you can use ctrl-shift for swapping between traditional characters and english, and alt-shift for swapping into pinyinput. This is almost as painless as if you had Pinyinput grouped together with the other Taiwanese layouts, as you'd still need to typing ctrl-shift to swap into it anyway.

Share this post


Link to post
Share on other sites
Site Sponsors:
Pleco for iPhone / Android iPhone & Android Chinese dictionary: camera & hand- writing input, flashcards, audio.
Study Chinese in Kunming 1-1 classes, qualified teachers and unique teaching methods in the Spring City.
Learn Chinese Characters Learn 2289 Chinese Characters in 90 Days with a Unique Flash Card System.
Hacking Chinese Tips and strategies for how to learn Chinese more efficiently
Popup Chinese Translator Understand Chinese inside any Windows application, website or PDF.
Chinese Grammar Wiki All Chinese grammar, organised by level, all in one place.

imron

Uploaded a new version that fixes a bug with function keys (see here). Previously when pinyinput was selected, none of the functions keys (F1, F2, F3, etc) were being passed though to the application. This is now fixed. See the original post to download the latest version.

Share this post


Link to post
Share on other sites
imron

Uploaded a new version fixing a bug when typing ü in checked-mode. Sometimes it wasn't recognising this as valid pinyin.

Share this post


Link to post
Share on other sites
woliveri

There is a simple pattern which I learned when in school here in Shanghai.. It turned out that I stumped all of my teachers with this question and none could give a reasonable answer when it came to the proper vowel when two or more vowels are in the same word. I later found out from a elementry school teacher (Chinese) that the pattern goes like this:

A-O-E-I-U-U(fish eyes) -- A has the heaviest weight, fish eyes the lightest

hao - the tone would go over the 'a'

shuang - the tone would go over the 'a'

guo - the tone would go over the 'o'

hui - the tone would go over the 'i'

etc.......

The reasoning behind this pattern, she said, was the formation of the mouth from most open to most closed (A being most open, fish eyes being most closed).

Anywhoo, I checked it on every piece of pinyin I could find and it panned out fully.

Perhaps this is a good model for your tone placement algorithm, very simple and effective.

hth,

bill

Share this post


Link to post
Share on other sites
imron

I'm not sure that works in all cases. Take for example diū, where the tone mark should go over the U. Assuming I understand your explanation correctly, then if you were to follow the order listed, then then tone mark would appear over the I which is incorrect.

The simplest method I found for correctly determining which vowel to place the tone mark on is as follows:

1. If there is more than one vowel and the first vowel is i, u, or ü, then the tone mark appears on the second vowel.

2. In all other cases, the tone mark appears on the first vowel

Share this post


Link to post
Share on other sites
woliveri

oh, nice..

Thank you for exposing a hole in my method.....

Share this post


Link to post
Share on other sites
woliveri

Imron,

I've found a bug. When I type: lan3 long2 I get lan with a 3rd tone but long has no tone mark on it.

I'm not sure if you've developed for multiple word entries or single word entries. This is a problem with multiple word entries.

Let me know if I'm not being clear enough..

Thanks,

Bill

Share this post


Link to post
Share on other sites
imron

Hi Bill,

That input sequence seems to work fine on my machine, using a variety of different programs. A couple of quick questions that'll help me identify what's going on:

1) What program are you using when this problem occurs?

2) Does the same input sequence always produce the error, or does it only happen sometimes?

3) Are there any other input sequences that exhibit the same behaviour?

4) Before you press enter, does the second tone appear in the input window? i.e does the tone only disappear after you press enter?

5) Does pinyinput fail to accept the 2 as input (if this is the case, you will hear a beep).

As for the design, tone substitution works at a syllable level. So when you press a number, it applies the appropriate tone to whatever the previous pinyin syllable was (assuming there was one), and then treats any following input as part of the next syllable (or as whitespace/punctuation/etc). It then allows for multiple syllables to be typed after each other.

Share this post


Link to post
Share on other sites
woliveri
1) What program are you using when this problem occurs?

2) Does the same input sequence always produce the error, or does it only happen sometimes?

3) Are there any other input sequences that exhibit the same behaviour?

4) Before you press enter, does the second tone appear in the input window? i.e does the tone only disappear after you press enter?

5) Does pinyinput fail to accept the 2 as input (if this is the case, you will hear a beep).

Hi imron,

ANSWERS:

1) Yeah, It's happening to me in MS Word 2000. If I do it in Notepad I don't have the same problem.

2) It always happens. I found it happens if I type two words then hit enter or one word, hit enter, then another word it still happens

3) before I was just using NJStar to get the pinyin over, copy and paste, so no, I haven't experienced this with other things.

4) Yes, the second tone over the second word is there before transferring to the word doc (in the IME window). After it goes to Word the second tone disappears.

5) no, it accepts the second tone over the second word fine, only after hitting enter to transfer it to word does it disappear.

Please let me know if you have any more questions. I hope you can reduplicate this error. Like I said this (so far) is only in Word 2000. It doesn't happen in Notepad so probably has something to do with Word's formatting krap.

Share this post


Link to post
Share on other sites
imron

Unfortunately I don't have MS Word 2000 installed, and the problem doesn't occur in Word 2003, which is going to make it a pain to test.

Regarding question 3) I was referring to other phrases besides lan3 long2 that cause the problem, or is it only long2 that causes the problem? and are there any other patterns to types of input that cause the problem (i.e. it only happens with 2 tones and not 3 tones etc)

Also, can you confirm that you are using the latest version of Pinyinput? (the version uploaded on the first of june).

Share this post


Link to post
Share on other sites
woliveri

So far it has only been with lan3 long2 order of words. Some kind of special combination that seems to be causing this problem. I was typing out a big list of words and only this combination so far has caused the problem (so far).

According to the properties of the exe, it was created June 1st. I couldn't find other properties of the exe which would confirm that but I believe I first downloaded it June 10th so we should be safe in that respect.

Another queer thing I just noticed is if I use it to type pinyin in an MSN Messenger window the IME window will not appear but as soon as I hit enter after typing something the pinyin will transfer to the IM window... so it seems to be running in a 'ghost' mode. I just confirmed that after a fresh restart.

Are you able to recreate this problem?

I will see if I can find any formatting properties in MS Word which could be causing the problem.

Share this post


Link to post
Share on other sites
pazu

I just got the June newsletter of this forum and I found your link there, just installed this program, like it a lot! It's always a trouble to input the pinyin, now it's hassle free! :mrgreen:

Share this post


Link to post
Share on other sites
hunxueer

thanks--a lot! you've saved a lot of people a lot of time, stress, and headache, i'm sure. or at least me.

Share this post


Link to post
Share on other sites
drahnier

Thanks so much for this. - I've just installed Pinyinput on Windows Vista 33bit and it appears to work flawlessly.

Share this post


Link to post
Share on other sites
imron

I'm glad to hear it runs on Vista without issues. I've not yet had the chance to test it on a Vista machine myself.

Share this post


Link to post
Share on other sites
m.fardream

It is a very useful pinyin input tool. thank you for your fantastic work.

and I just have a little suggestion:

when I input a pinyin, i have to click the Enter to finish it. could you replace the Enter with the space. actually, the most of other chinese IME input tool use the space to finish the input. there is a little in-convinence.

Share this post


Link to post
Share on other sites
imron

Actually, when I first started developing pinyinput that was the way I had it, but then I found when typing pinyin you regularly need to type spaces, compared to typing characters, when you rarely if ever need to type them. What this results in is either having to press space twice all the time, or having to automatically stick in a space at the end of every word (which is also not desirable).

In the end I decided to change it so that you could type long sentences in the input window instead, and use enter to confirm the input.

Anyway, it'll be simple to put in an option where you can choose what key you would like to use to confirm the input, but I'm about to head off to Inner Mongolia for a few days so I won't get on to it until after I get back.

Share this post


Link to post
Share on other sites
m.fardream

thank you very much. I understand your thinking. I hope to get the new version.

thanks again.

Share this post


Link to post
Share on other sites
ep1200

Hi Imron,

You maybe could do the following: When SPACE is pressed, send the pinyin to the application - including the space character. This would avoid to have to frequently type space 2 times. I guess the need to delete this space will not arise that often. Besides space You could also accept comma and full-stop as a delimiter.

I recently installed the pinyinput method. Thank you for this work. What troubles me is the fact that it always switches to chinese script. This has already been discussed before here. But i am confident, it is possible to avoid this. E.g i have also installed the IME "Chinese(simplified) - US Keyboard", it is listed under Chinese IMEs, but does not switch to chinese script. It leaves the font/script unchanged.

Share this post


Link to post
Share on other sites
ABCinChina

For pinyin tones, I just use MSPY 2003 (4.0). All you have to do is right click on the little menu bar, pick soft keyboard, then click pinyin letters. Very simple, yet works for me.

But I am sure that the Pinyin tool has much better functions. :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×