Back

Automatic Example Sentence creation

#1
Is there a way to extract EVERY example sentence from 研究社新和英大辞典 and New 斉藤和英大辞典 into an excel document? Even if the japanese and english is both in one column this will be very useful.
I would like to have each example sentence for a vocab as an anki card and i think if i was able to get them into exel this would be the easist way.
Reply
#2
That'd be kinda nice actually. Using the EPWING dictionaries on android, one can freely search for all the example sentences, but to have everything in an excel document where you can mess around with it, easily copy/paste sentences into anki or copy/paste sentences into creating "islands" of conversations and so on would be nice.
Reply
#3
Install EBWin4 and AutoHotkey.

Overwrite %Appdata%\EBWin4\GAIJI\WADAI5.map with (edit) this:
Run (edit) this autohotkey script.

Start EBWin4. Configure the 研究社和英大辞典 and select WADAI5 for its GaijiMap in Edit Dictionaries. Set Settings->Max Hit = 999999. Do a full text search for "." without the quotes, press Ctrl+R once the results are visible, wait for the save file dialog to pop up.

Lines starting with ・ or ▶ will be example sentences. I tried to remove all others, but either my regex-fu is lacking or AutoHotkey doesn't like characters like ・ in regexes, and it's getting late.
Edited: 2014-08-09, 3:23 am
Reply
May 16 - 30 : Pretty Big Deal: Save 31% on all Premium Subscriptions! - Sign up here
JapanesePod101
#4
what encoding do i save the map in? and what encoding for the macro?

I get this error message when i run whatever.ahk

Error at line 2.

Line Text:#if WinActive(#ahk_exe EBWin4.exe")
Error:This linedoes not contain a recognized action.

The program will exit.
Reply
#5
Looks like the forum converted tabs in the map file into spaces. Also now using #ifWindowActive instead of #if:

https://www.dropbox.com/s/7e0ofd5zl5usszv/Examples.ahk
https://www.dropbox.com/s/goicwqqsrnd5cwk/WADAI5.map

If the ahk still doesn't work, here's a compiled version:

https://www.dropbox.com/s/7fm1jxwalt2f5af/Examples.exe
Edited: 2014-08-09, 3:35 am
Reply
#6
Thanks so much. This is awesome

So close. When i click Ctrl+R nothing happens thoSad

btw how did you figure out how to do this?

edit: I tried it again and now i get a 'select file - examples.exe' window that has the option to open a file.
I created an empty txt document and xls document but it doesnt save anything.
Edited: 2014-08-10, 3:04 am
Reply
#7
https://www.dropbox.com/s/0arsr95ngadsipq/Examples2.exe

Quote:btw how did you figure out how to do this?
I looked at EBWin4 with AutoIt3 Window Spy (comes with AutoHotkey), moused over the result list, saw that the control was called <stuff>.SysListView32.<more stuff>, and read about how to get text from a ListView in AutoHotkey's documentation for ControlGet.
Reply
#8
Awesome got it to work Smile Hopefully this would be useful to everyone
Reply