This feels like a dumb question, but what program(s) do people use for making these multi-purpose text files?
2010-03-10, 9:16 am
2010-03-10, 11:46 pm
a little buggy, but it works thanks
Edited: 2010-03-10, 11:50 pm
2010-03-11, 3:04 am
Oh, after installing .NET 3.5 SP1, I no longer get that 'out of bounds' error msg. Excellent.
Advertising (Register to hide)
May 16 - 30 : Pretty Big Deal: Save 31% on all Premium Subscriptions!
- Sign up here
2010-03-26, 7:50 pm
Convenient little program, thanks. What do we do in general with these lookups if the word doesn't have kanji? I have a bunch of 擬音/態語 and some カタカナ words in my deck, and there are some words that just don't seem to have any kanji form.
On a related note, does anybody know how to import a single field into Anki? For example, if I created a tab-separated text file with all the audio references along with their words, would it be possible to import the audio reference into the corresponding cards automatically? I don't really want to select 4200 sound files manually...
Edit: Just having a tab with nothing after it seems to work for the kanji problem.
On a related note, does anybody know how to import a single field into Anki? For example, if I created a tab-separated text file with all the audio references along with their words, would it be possible to import the audio reference into the corresponding cards automatically? I don't really want to select 4200 sound files manually...
Edit: Just having a tab with nothing after it seems to work for the kanji problem.
Edited: 2010-03-26, 8:14 pm
2010-03-26, 8:47 pm
Javizy Wrote:Convenient little program, thanks. What do we do in general with these lookups if the word doesn't have kanji? I have a bunch of 擬音/態語 and some カタカナ words in my deck, and there are some words that just don't seem to have any kanji form.You can try the Overwrite Fields plugin for Anki:
On a related note, does anybody know how to import a single field into Anki? For example, if I created a tab-separated text file with all the audio references along with their words, would it be possible to import the audio reference into the corresponding cards automatically? I don't really want to select 4200 sound files manually...
Edit: Just having a tab with nothing after it seems to work for the kanji problem.
Quote:Title: Overwrite Fields v1.14 20090609
...
overwrite existing fields with data from an external file
uses:
* populating extra fields in a deck from an external source e.g. stories from revtk if you already started reviewing in anki, adding ja keywords to a heisig deck
* bulk editing of fields e.g. find replace, merging, splitting (export, edit, overwrite)
* updating field data to a later version e.g. collaborative sentence mining from textbooks
see http://ichi2.net/anki/wiki/ContribFugoun...ite-fields
2010-03-27, 8:42 am
cb4960 Wrote:You can try the Overwrite Fields plugin for Anki:Thanks for the tip. I can't get it to work though... I used U2WIN to convert the py file, and put it in the plug-in directory along with data.txt. Then I opened Anki, closed my deck and reopened it like it says, but I'm not even getting a log file, so it doesn't seem to be running at all. Any ideas?
Code:
data.txt:
赤らむ [sound:word1.mp3]
上がり [sound:word2.mp3]
諦め [sound:word3.mp3]
間柄 [sound:word4.mp3]
悪しからず [sound:word5.mp3]
顎 [sound:word6.mp3]
Settings:
MODEL_NAME = 'Japanese'
KEY_FIELD = 'Expression'
FIELDS = ['Expression','Audio']
IFS = '\t'
DATA = 'data.txt'
LOGFILE = 'log.txt'
2010-03-28, 1:27 pm
I tried removing my other plugins from the plugins folder, having practically ran out of ideas, and it did the trick. I was using Japanese support and the Jx statistics one. They must have been conflicting somehow.
A relief to put that tedium behind me, but I'm sure there's much more waiting in setting up AnkiMini...
A relief to put that tedium behind me, but I'm sure there's much more waiting in setting up AnkiMini...
2010-04-07, 2:07 am
By the way, I tested this out because I noticed I could directly save-as these links, but Anki, if you set up the card so it says:
[sound:http://assets.languagepod101.com/dictionary/japanese/audiomp3.php?kana=どくしょ&kanji=読書] will play the .mp3 automatically. (Edit: Weird, copy/pasting from this comment seems to break the link, adding a space where it doesn't belong.)
The only problem is I think that somewhere along the way, the Japanese gets encoded wrong so it says 'The audio for this clip is currently not available... ' So if you know a way around this....
[sound:http://assets.languagepod101.com/dictionary/japanese/audiomp3.php?kana=どくしょ&kanji=読書] will play the .mp3 automatically. (Edit: Weird, copy/pasting from this comment seems to break the link, adding a space where it doesn't belong.)
The only problem is I think that somewhere along the way, the Japanese gets encoded wrong so it says 'The audio for this clip is currently not available... ' So if you know a way around this....
Edited: 2010-04-07, 3:51 am
2010-04-07, 1:26 pm
The server expects the kana and kanji to be hex encoded, but anki encodes them in like this: /dictionary/japanese/audiomp3.php?kana=\343\201\251\343\201\217\343\201\227\343\202\207&kanji=\350\252\255\346\233\270
2010-04-07, 2:28 pm
Ohhh. Hmm, know of any way to 'adjust' that? ;p
2010-04-07, 6:27 pm
Almost got it!
I tried this a bit earlier but failed to find the right shortening service that didn't ruin the encoding, but bit.ly works, at least: [sound:http://bit.ly/dsNsRg] -- The only problem is that the .mp3 is cut short--I had the same problem with any regular remote sound file I tried using in Anki, so I think that's a general problem or glitch?
Also, having to use a link shortener for everything... haha.
I tried this a bit earlier but failed to find the right shortening service that didn't ruin the encoding, but bit.ly works, at least: [sound:http://bit.ly/dsNsRg] -- The only problem is that the .mp3 is cut short--I had the same problem with any regular remote sound file I tried using in Anki, so I think that's a general problem or glitch?
Also, having to use a link shortener for everything... haha.
Edited: 2010-04-07, 6:28 pm
2010-04-08, 2:38 am
Well, just for completion's sake, as I can't think of any reason to do this rather than use cb4960 or mistamark's tools, there is this tool for batch shortening URLS in bit.ly: http://blog.labelzone.co.uk/tutorials/ba...ls-bit-ly/
So between that and remote sound files in Anki, you have that option. Well, that's if the sound file doesn't get cut short like it does me, which is weird because that 'The audio for this clip... ' dialogue doesn't get cut short. Anyway. ;p
So between that and remote sound files in Anki, you have that option. Well, that's if the sound file doesn't get cut short like it does me, which is weird because that 'The audio for this clip... ' dialogue doesn't get cut short. Anyway. ;p
2010-04-12, 3:57 pm
EDICT has a .txt that contains 22k of the most common words called edict_sub:
http://ftp.monash.edu.au/pub/nihongo/00I...ml#dic_fil
Just in case anyone wants it for use in programs in this thread, such as mistamark's downloader, or import into Anki.
But perhaps I'm the only person who has a neurotic distrust of the 'cloud' and/or a fear of broken links. (All of these programs dependent upon a single link format and the good graces of Breen/JapanesePod.)
http://ftp.monash.edu.au/pub/nihongo/00I...ml#dic_fil
Just in case anyone wants it for use in programs in this thread, such as mistamark's downloader, or import into Anki.
But perhaps I'm the only person who has a neurotic distrust of the 'cloud' and/or a fear of broken links. (All of these programs dependent upon a single link format and the good graces of Breen/JapanesePod.)
Edited: 2010-04-12, 4:20 pm
2010-04-13, 12:19 pm
thurd Wrote:Just for the record. I've written such plugin and its available through shared plugins in Anki.mygbmygb Wrote:This would be awesome. Might try to do something like this myself if I find the time.mezbup Wrote:Would really love this if it were an Anki plugin that could show up whilst making a card. Say you have a word 遺体 in the question field and could click a button to download and add the sound file would be so awesome.I second that!
Thread about it on RevTK can be found here.
2010-05-23, 2:48 pm
mistamark Wrote:I knocked together a prog that will do the download for you.Thanks for writing the program! I was looking for something like that on the web, and lo and behold I've found it.
...
I would like to customize it a little more now... there are some Yookoso flash card files I have from iFlipr that I would like to use (that's the book my class is using), but they use csv instead of tab separated, and the file has mixed the english meaning and hiragana definitions - so I'll need to strip the english, etc. Anyway... you've inspired me to learn visual basic, and I've downloaded VB 2010 express and been working through tutorials etc. Would you mind sharing your source code? If not that's OK, I'll probably figure it out before too long. I guess it's pretty simple code for anyone with experience.
Thanks again for your contribution.
JJ
2010-05-24, 12:48 am
jjtx300 Wrote:Just out of interest, what makes you think it's written in VB??mistamark Wrote:I knocked together a prog that will do the download for you./.../
...
Anyway... you've inspired me to learn visual basic, and I've downloaded VB 2010 express and been working through tutorials etc. Would you mind sharing your source code? If not that's OK, I'll probably figure it out before too long. I guess it's pretty simple code for anyone with experience.
Thanks again for your contribution.
JJ
Anyway, I'm glad to have sparked your interest, although I'd recommend switching to c# after you get proficient in VB.net. Starting with VB is good as it's easier to learn/less scary looking, as a beginner to programming and provides a good way to learn your way around the framework.
After a few months of using VB, you will find that learning c# is mostly just about picking up a new syntax, at that level. c# will (speaking generally) however open up more professional opportunities if you decide to follow that route (which is the only difference between the two really).
The code is pretty quick and dirty, but I'll email you enough to get you started. It's always good to have pointers when you start out.
Good Luck
2010-05-24, 8:10 am
mistamark Wrote:Just out of interest, what makes you think it's written in VB??VB.net seemed like the most prominent language when it came to windows, but after I wrote the post yesterday I did realize it could be something else. With all the web crawling I did over the weekend I have certainly seen C# mentioned a lot as well, so I appreciate your insight about the differences. I remember seeing one instance where the same code was in VB.net and C#, and it seemed like the C# code required less typing. It basically had more {} braces where VB.net had words. Yeah, it sounds like a good idea to get familiar with it, and I guess the code you're sending me will be the perfect opportunity to do just that!
...
Thank you for helping out Windows programming newbie
.JJ
2010-12-13, 4:54 pm
mistamark Wrote:I knocked together a prog that will do the download for you.Know what would make this perfect? If you could tell this program to ignore mp3s 51.0kb in size.
You just need to feed it a text file in the format
kana [tab] Kanji
eg:
だんだん 段々
だんかい 段階
こうしょう 交渉
しょくじ 食事
it will save the audio named (Kanji) - (kana).mp3
eg:
旅館 - りょかん.mp3
Image here
http://img716.imageshack.us/img716/9800/...wnload.png
Download from here:
http://www.multiupload.com/UJDPIDRTSM
NOTE:
Please note that this performs no kind of validation, error checking, anything even resembling what you'd expect of a professional utility! But I realised I'd knocked together a similar one last week to download the files from a list of filenames in the Kore sheet and it was a simple thing to modify it to do this.
Also, it runs on Windows with the .NET framework.
Please don't do anything bad with this, and no fitness for purpose or stability is in any way implied!
Also, to have the app make a copy of the .txt and then remove the lines as they're successully processed.
Edited: 2010-12-13, 7:54 pm
2010-12-15, 1:50 am
nest0r Wrote:Ok, as people are actually using this and I've got time on my hands, I'll flesh it out a bit.mistamark Wrote:I knocked [ ... snip ...]Know what would make this perfect? If you could tell this program to ignore mp3s 51.0kb in size.
Also, to have the app make a copy of the .txt and then remove the lines as they're successully processed.
Any more suggestions that would make this more useful??
2010-12-20, 7:01 pm
Anyone know what the license is on these files?
@jjtx300: You could just learn Python, which works on all operating systems. It's easier to get started with than C#, and saner than VB.net. Here's a good free book to learn: http://learnpythonthehardway.org/
@jjtx300: You could just learn Python, which works on all operating systems. It's easier to get started with than C#, and saner than VB.net. Here's a good free book to learn: http://learnpythonthehardway.org/
Edited: 2010-12-20, 7:04 pm
2010-12-21, 5:14 pm
mistamark Wrote:Another tip might be to have it so you can input texts with kanji then kana. I know the URL is in a different order, but I think most people probably have their various .txt files with kanji before kana.nest0r Wrote:Ok, as people are actually using this and I've got time on my hands, I'll flesh it out a bit.mistamark Wrote:I knocked [ ... snip ...]Know what would make this perfect? If you could tell this program to ignore mp3s 51.0kb in size.
Also, to have the app make a copy of the .txt and then remove the lines as they're successully processed.
Any more suggestions that would make this more useful??
Also, to clarify, I think all but 3, according to cb4960 (I haven't looked) of the files are below 51.0kb. All those 'no sound' files are 51 and 52 so it's safe to ignore all of those. And by having a copy made and removing lines, I meant, a way to have it stop and resume I guess, and possibly to overwrite/ignore.
Edited: 2010-12-21, 5:16 pm
2010-12-23, 6:42 pm
A better solution would be to hash the file and compare the hash to detect the silent one.
2010-12-24, 5:07 am
wahnfrieden Wrote:A better solution would be to hash the file and compare the hash to detect the silent one.I know where you're coming from with this, and I thought so too, but actually it's not.
(http://stackoverflow.com/questions/21100...management)
(http://stackoverflow.com/questions/13585...-using-net)
If you've got 1000+ files to compare, hashing and then comparing for each one is going to hurt performance, even if you cache 1 side of the comparison.
The obvious optimisation is to compare size equality first to see if it was worth hashing and comparing. Even then, doing a byte by byte equality comparison of the first few bytes would be a faster shortcut option compared to a full hash comparison.
Also, an identical MD5 hash does not absolutely guarantee the files are identical, but this is a bit far out! (http://www.mscs.dal.ca/~selinger/md5collision/)
2010-12-24, 7:16 am
BTW
http://assets.languagepod101.com/diction...&kana=どくしょ
That kanji first order seems to work, though I only tried it with that one URL.
http://assets.languagepod101.com/diction...&kana=どくしょ
That kanji first order seems to work, though I only tried it with that one URL.
2010-12-24, 7:33 am
mistamark Wrote:If you've got 1000+ files to compare, hashing and then comparing for each one is going to hurt performance, even if you cache 1 side of the comparison.You're right. Hashing makes sense if you have to compare all pairs of files; but this is not the case here.

