Jump to content
Chinese-Forums
  • Sign Up

Mass Generation of Monolingual Definitions from .cvs file


uni419

Recommended Posts

Do you mean, you have a list of Chinese words in one column of a csv file,

and you want to output a csv file with the words in one column, and the Chinese definitions in another column?

I don't know any tool that does this. But if you have a C-C dictionary file in text format, it should not be difficult to create a small program to read the words, search the dictionary, and output the entries...

For instance if you wanted entries from CEDICT, it would be a simple matter of selecting the input column with sed or awk (there are examples of csv column selection on the internet), grep-ing the word in the CEDICT file to obtain the definition line, etc. But CEDICT is not monolingual.

  • Like 1
Link to comment
Share on other sites

I'm pretty sure that 现代汉语规范词典 is included in the dictionary app in OSX (since I have it as well and I've never installed/imported any external dictionaries), you just have to manually enable it (and maybe download it, I don't remember).

  • Like 1
Link to comment
Share on other sites

Ah, cool. So circling back around to the original topic, lets say I wanted to do a pull request on around 3-4k of words, with split definitions, example sentences and part of speech exported to a csv. Import file is also a cvs. Dictionary used is the copy of 现代汉语规范词典 which is apparently included with OSX, does anyone know how I'd either

 

A.) How to do that (guessing unlikely)

B.) Where I can find resources to educate myself enough to hack some together myself (feeling this is probably more likely) 

 

?

Link to comment
Share on other sites

If you can get the dictionary as a CSV format, you could do it in Excel.  

 

=VLOOKUP(column of 3-4k words, table of dictionary, column # of definition in dictionary, TRUE) should do the trick.

  • Like 1
Link to comment
Share on other sites

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...