Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Stardict English-Chinese (pinyin)?

    Reply
    Page 1 of 2 | 1   2   | Next
    ctennenh | # 1 | 2009-04-01, 14:41 | Report

    I'm looking for an English-Chinese dictionary for a trip to China. I'm not interested in characters, and would be happy with something where I can type in English and get the pinyin. From reading these forums and elsewhere it looks like Stardict will be my best option, but I can't seem to find a dictionary with what I want. Does anyone know if there is one out there? I've checked at http://stardict.sourceforge.net/Dictionaries.php and it's probably there but I'm having trouble navigating.

    Also, any other software anyone could give me advice on would be great, even Windows/Tablet PC specific stuff.
    Thanks.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    pawpawyoung | # 2 | 2009-04-02, 08:42 | Report

    For Dictionaries:
    please go to http://stardict.sourceforge.net/Dictionaries_zh_CN.php, at least it works for me.
    For Online dict, you can go to:
    http://www.dict.cn/
    http://www.iciba.com/
    For free dict software for Windows go to:
    http://g.iciba.com/
    And if you need need a free guide/translate, you can contact me at: pawpawyoung(at)gmail(dot)com, I'm in Beijing, China.
    Happy trip.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    ctennenh | # 3 | 2009-04-02, 13:36 | Report

    Thanks.
    I looked at that page but don't know which dictionary to use. There are quite a few on that page and don't need characters. I'd rather not use a dictionary with Chinese characters, actually, to avoid having to install Chinese support in Maemo. Maybe I'll try them all out and see which works best for me.

    Also, thank you for the offer to help.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    fast1 | # 4 | 2009-04-02, 13:59 | Report

    i can read chinese, hit me up if you need help

    Edit | Forward | Quote | Quick Reply | Thanks

     
    ctennenh | # 5 | 2009-04-02, 14:17 | Report

    Thanks, guys.
    I tried all the dictionaries at pawpawyoung's link and none translate en->zh with pinyin. They are either zh->en or en->zh with only characters and no pronunciation.

    Are there are e-book dictionaries I could use with FBReader? Even a 2-column text file with english on the left and pinyin/pronunciation on the right would do.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to ctennenh For This Useful Post:

     
    ctennenh | # 6 | 2009-04-02, 14:57 | Report

    I think I've found an acceptable solution.
    I downloaded the latest CEDICT .u8 file from http://www.mdbg.net/chindict/chindict.php?page=cedict
    I opened it in notepad and replaced every [ and ] with /
    I then opened the file in Excel using / as a delimiter, so my columns were:
    A: character (I don't have Chinese support in Excel so this is unreadable)
    B: pinyin. CEDICT uses numbers for tones, so it's not as nice as having the tone above the vowel
    C: English

    Then it's just a matter of deleting column A, reordering the columns and sorting by the English, and I have an alphabetical English->Pinyin dictionary. I'll try loading it onto the IT as a text file and see how FBReader handles it.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    phyre90 | # 7 | 2009-08-21, 08:48 | Report

    I spent a lot of time looking for an English to Chinese (pinyin) solution for my N810. I ended using stardict with a custom dictionary based on the cedict 1.0 file. Using the bash script below to convert cedict to babylon format. Then stardict tools to convert the babylon file to stardict format (google for current cedict file and stardict-tools). Works fine for me.

    I'm not very good at bash, so use at your own risk. If you know how to optimize the script, let me know.

    Code:
    #!/bin/sh
    # Converts cedict to English -> Chinese babylon file
    # using cedict_1_0_ts_utf8_mdbg.  Use stardict-tools
    # to convert $OUTFILE to stardict format.
    
    CEDICT_FILE=$1
    OUTFILE=$2
    COUNTER=35
    ENDLINE=`cat $CEDICT_FILE | wc -l`
    
    touch $OUTFILE
    while [ $COUNTER -le $ENDLINE ]
    do
    	WLINE=`sed -n ${COUNTER}p $CEDICT_FILE`
    	echo $WLINE | sed 's/.* \///' | sed 's/\/.$//' | tr "/" "|" >> $OUTFILE
    	echo $WLINE | awk -F / '{print $1 "\n"}' >> $OUTFILE
    	((COUNTER++))
    done

    Edit | Forward | Quote | Quick Reply | Thanks

     
    jukzh | # 8 | 2010-10-23, 23:10 | Report

    PHP Code:
    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>
    #define MAX 300

    int parser(char string[])
    {
     
    int c, i;
     for (
    i=0; i < MAX && (c=getchar()) != EOF && c != '\n'; ++i)
         
    string[i] = c;
     if (
    c == '\n') {
        
    string[i] = c;
        ++
    i;
     }
     
    string[i] = '\0';
     return 
    i;
    }

    int split(const char src[], char prt[], int del, int idx)
    {
     
    int i = 0, j = 0;
     if (!
    idx) { 
         while ((
    prt[j++] = src[i++]) != '\0' && src[i] != '\n' && src[i] != del && i < MAX);
         
    prt[i] = '\0';
     } 
     else {
        
    int n = 0;
        while (
    src[i++] != '\0' && src[i] != '\n' && i < MAX) {
           if (
    src[i] == del) {
               if (++
    n == idx) {
                   
    i++; 
                while ((
    prt[j++]=src[i++]) != '\0' && src[i] != '\n' && src[i] != del && i < MAX);
               
    prt[j] = '\0';
               }
           }
        }
     }
     return 
    j;
    }

    int get_range(const char *str, int del) {
     
    int i=0, j = 0;
     while (*
    str++ != '\0' && i++ < MAX) {
        if (*
    str == del) 
            
    j++;
     }
     return 
    j; 
    }

    int main()
    {
     
    char prt[300], def[300], line[300];
     
    int i, j, len, range;
     while ((
    len = parser(line)) > 0) {
           
    range = get_range(line, '/');
        
    j = split(line, def, '/', 0);
           for (
    i=1; i < range; i++) {
                
    j = split(line, prt, '/', i);
                   
    printf("%s\t%s\n", prt, def);
           }
      }
     return 
    0;
    } 
    Sample build:
    Code:
    cc ce2ec.c
    cat cedict_ts.u8 | ./a.out > ecdict.tab
    sudo apt-get install stardict-tools
    /usr/lib/stardict-tools/tabfile ecdict.tab
    sudo mkdir /usr/share/stardict/dic/ecdict
    sudo mv ecdict.* /usr/share/stardict/dic/ecdict
    sudo -hr root:root /usr/share/stardict/dic/ecdict
    stardict
    echo 'Everything should be just ok xD';

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by jukzh; 2010-10-24 at 00:09.

     
    Anthuzad | # 9 | 2010-11-28, 21:00 | Report

    Hey guys,

    I'm new here (this is actually my first post) and still pretty green with linux (the only instance of linux i run is on my n900 :P )

    I'm also on the search for an english to chinese (with pinyin) dictionary for stardict. From what I've gathered here cedict seems to be the way to go, but I have absolutely NO idea how to convert the u8 file into stardict format. I've found mveplus's converted version here but that still is chinese (with pinyin) to english. Could somebody point me into the right direction on how to swap the entries and turn it into english to chinese (with pinyin)?

    I would be ever so grateful!

    Best regards,

    Anthu

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by Anthuzad; 2010-11-28 at 21:01. Reason: typos

     
    s331234 | # 10 | 2010-12-20, 06:09 | Report

    I wrote a small .net prog and have reversed the CEDICT ch-en dictionary to en-ch.

    I then used the stardict convert tool to output it into the Startdict format, copied it to my N900 and now using msdict can translate english to chinese (both trad/sim characters and pinyin).

    I'll be happy to share it with anyone who needs it, just let me know where I can upload it (around 4mb compressed).

    I'm currently in Beijing, so not all file sharing servers might be accessible by me.

    Cheers,

    Steve.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to s331234 For This Useful Post:
    cheve

     
    Page 1 of 2 | 1   2   | Next
vBulletin® Version 3.8.8
Normal Logout