Jump to content
Chinese-Forums
  • Sign Up

How to convert CC-CEDICT to a spreadsheet?


Recommended Posts

Posted

I have CC-CEDICT as a single file. How can I import it into a spreadsheet? In the original file, some words show an extra field with simplified characters, so when I try to import the information, some rows have more cells and don't line up.

Posted

[in the CC-CEDIT, all lines have both both simplified and traditional.]

I haven't found a perfect way, because the format does not allow simple parsing based on individual characters. The best way I've found is a two-pass approach: import it once using a space as the column delimiter, and then a second time using "[]" as the column delimiter. Then you will have the characters in the first two columns of the first import, and the pinyin and definitions in the second and third columns of the second import.

Join the conversation

You can post now and select your username and password later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Click here to reply. Select text to quote.

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...