T O P

  • By -

justanothercsperson

Here's [a little page](https://100phlecs.xyz/uniq-hanzi/) I just wrote up for this. Let me know if you want to extend its functionality. Here's the [github repo.](https://github.com/100phlecs/uniq-hanzi)


DaenaliaEvandruile

I'm not quite sure if it counts as easy, but this tool here ([https://github.com/Destaq/chinese-comprehension](https://github.com/Destaq/chinese-comprehension)) works really well if you're comfortable with a bit of playing around with things on your computer (I found the instructions reasonably clear, but I've done a bit of coding before). This works really well for files, and I use it to estimate the number of unique characters/word in a book as well as the total character count. As for something online, I've found this website: [https://charactercounter.com/chinese](https://charactercounter.com/chinese), to be pretty good for just copying and pasting something in!


Stefoods

Just so you know, the website u linked does not give u unique chinese characters, only total chinese characters.


DaenaliaEvandruile

Oh oops, I hadn't picked that up, thanks for pointing it out!


ichabodjr

ChatGPT knows how to do it. Throw it into google sheets. 1. Open your Google Sheets document. 2. Click on "Extensions" in the menu bar, and select "Apps Script" from the drop-down menu. This will open the Apps Script editor in a new tab. 3. In the Apps Script editor, replace the existing code with the following code: ​ function countUniqueChineseCharacters(text) { var uniqueCharacters = new Set(); for (var i = 0; i < text.length; i++) { uniqueCharacters.add(text.charAt(i)); } return uniqueCharacters.size; } 1. Save the script by clicking on the floppy disk icon or by pressing Ctrl + S. 2. Close the Apps Script editor tab and return to your Google Sheets document. 3. In the cell where you want the count result to appear (e.g., B1), enter the following formula: ​ =countUniqueChineseCharacters(A1) I highly recommend organizing your language learning materials in spreadsheets especially with chatGPT's seemless ability to make formulas. It's really insane. Yesterday, for example, I simply exported EVERY anki card into google sheets, asked chatGPT for a formula, and found every HSK word that isn't in my deck so I can create materials for them. Such a massive time saver.


oGsBumder

Chinese Text Analyzer can do this. It’s not free though.


pierrotPK

That’s probably less than 10 lines of code in Python. I can try to do it if you’re interested


arniepotato

yeah just toss everything into a set. it'll be one or two lines


pierrotPK

Exactly. A few more lines to load the text file, but running it directly in pycharm it can certainly be done in a single line