AutoHotkey Community

It is currently May 27th, 2012, 5:07 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: May 8th, 2010, 4:20 pm 
Offline

Joined: January 24th, 2009, 3:22 pm
Posts: 13
Location: Aldersbach, Germany
Hallo!
I am interested in having a script to translate a list or row of words, from English to German from a simple dictionary I have created. Does anyone have such a script?
I hope to hear from the users of the forum.
regards, forkinpm.

_________________
I am building my platform based on a set of steps to take my English texts through segmenting into phrases, resequencing segments based on German rules, adding head-words and then translating with my dictionary.
Regards, forkinpm.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 17th, 2010, 3:49 pm 
Offline

Joined: May 12th, 2009, 2:37 pm
Posts: 640
Location: Gloucester UK
What form does your dictionary take?
English_word = German_word or something different.
A bit more information on what you wish to ultimately achieve would also help.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 17th, 2010, 8:26 pm 
Offline

Joined: February 27th, 2009, 9:11 am
Posts: 693
Location: Burbank, California
would this help?
Code:
list = one=un,two=deux,three=trois,four=quatre,five=cinq,six=six
InputBox, choice, , enter word,,,,,,, 10,
msgbox % translate(choice, list, ",")
exitapp

translate(pick,array,delimiter){
Loop, Parse, array, %delimiter%
   {
   StringSplit, Word, a_loopfield, =
   if word1 = %pick%
   break
   }
return % word1 " >> " word2
}

_________________
"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom" but let's start to get the data...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 17th, 2010, 10:36 pm 
Here are German to English wordlists that might interest you.

HTH


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 17th, 2010, 11:27 pm 
Offline

Joined: February 27th, 2009, 9:11 am
Posts: 693
Location: Burbank, California
Code:
FileRead, DEDict, %a_scriptdir%\Deutsch-English.txt
;list = one=un,two=deux,three=trois,four=quatre,five=cinq,six=six
InputBox, choice, , enter word
msgbox % translate(choice, DEDict, "`r")
exitapp

translate(pick,array,delimiter){
Loop, Parse, array, %delimiter%
   {
   StringSplit, Word, a_loopfield, =
   if word1 = %pick%
   break
   }
return % word1 " >> " word2
}


I replaced the non-ascii delimiter with an =

_________________
"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom" but let's start to get the data...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 17th, 2010, 11:46 pm 
Offline

Joined: February 27th, 2009, 9:11 am
Posts: 693
Location: Burbank, California
In case you need to show multiple results:

Code:
FileRead, DEDict, %a_scriptdir%\Deutsch-English.txt
InputBox, choice, , enter word
msgbox % translate(choice, DEDict, "`r")
exitapp

translate(pick,array,delimiter){
Loop, Parse, array, %delimiter%
   {
   StringSplit, Word, a_loopfield, =
   if word1 = %pick%
   Engword = %word2%, %Engword%
   }
StringTrimRight, Engword, Engword, 1
return % pick " >> " Engword
}

_________________
"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom" but let's start to get the data...


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google Feedfetcher and 74 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group