English - French dictionary - Ideas?

Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Oct 2004
Posts: 4,155
Reputation: vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice 
Solved Threads: 952
Moderator
vegaseat's Avatar
vegaseat vegaseat is online now Online
DaniWeb's Hypocrite
 
0
  #11
Oct 9th, 2009
The dictionary container is highly optimized (for search speed and memory usage) in Python, and is used internally by the interpreter.

You can create an 'english_word: french_word' dictionary and easily swap it to a 'french_word: english_word' dictionary for speedy lookups in either language. However you have to make sure that words are unique in either language so they can form the keys.
Last edited by vegaseat; Oct 9th, 2009 at 2:03 pm. Reason: unique
May 'the Google' be with you!
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 16,273
Reputation: jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all 
Solved Threads: 544
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator
 
-7
  #12
Oct 9th, 2009
. However you have to make sure that words are unique in either language so they can form the keys.
yeah thats not going to work seeing as many english words dont actually exist in french, and many english words all mean the same thing... also some french words are long strings (e.g if you translate potato into french youll get pomme dé terre... if yoi translate that back into english youll get "apple of ground" which makes no sense.....
If i am helpful, please give me reputation points.
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 4,155
Reputation: vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice 
Solved Threads: 952
Moderator
vegaseat's Avatar
vegaseat vegaseat is online now Online
DaniWeb's Hypocrite
 
1
  #13
Oct 9th, 2009
In a dictionary container the 'potato' : 'pomme dé terre'
key:value pair will work well after the language swap.

If you have several English words for one French word you need to use a tuple container as a value. Tuples can be used for keys on a swap. Then in your key search you have to go through the items in the tuple one by one, if the key type is a tuple.

This project can quickly become rather complex, no matter what approach you pick. If you have a choice of words to pick from, you need the know the language by heart, or at least the meaning of the word in the sentence it is used in!

George Carlin used to make a lot of money explaining the quirks of the English language. I imagine he had a counterpart in France.
Last edited by vegaseat; Oct 9th, 2009 at 3:50 pm.
May 'the Google' be with you!
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 1,499
Reputation: evstevemd has a spectacular aura about evstevemd has a spectacular aura about evstevemd has a spectacular aura about 
Solved Threads: 128
evstevemd's Avatar
evstevemd evstevemd is online now Online
Nearly a Posting Virtuoso
 
0
  #14
Oct 11th, 2009
Originally Posted by vegaseat View Post
This project can quickly become rather complex, no matter what approach you pick. If you have a choice of words to pick from, you need the know the language by heart, or at least the meaning of the word in the sentence it is used in!
I agree.
What about English to English dictionary?
Atheist: God is man made imagination, he doesn't exist!
Theist: It's okay, can you imagine anything else that doesn't exist?
---- Python, C++ PHP and Java ----
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 984
Reputation: Gribouillis is a jewel in the rough Gribouillis is a jewel in the rough Gribouillis is a jewel in the rough 
Solved Threads: 223
Gribouillis's Avatar
Gribouillis Gribouillis is offline Offline
Posting Shark
 
1
  #15
Oct 12th, 2009
I'm using an online dictionary. This is what I get for potato
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Python Forum


Views: 562 | Replies: 14
Thread Tools Search this Thread



Tag cloud for Python
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC