| | |
English - French dictionary - Ideas?
Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
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.
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!
-7
#12 Oct 9th, 2009
•
•
•
•
. However you have to make sure that words are unique in either language so they can form the keys.
If i am helpful, please give me reputation points.
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.
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!
0
#14 Oct 11th, 2009
•
•
•
•
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!
What about English to English dictionary?
![]() |
Similar Threads
- Help with automatic update problem and more (Viruses, Spyware and other Nasties)
- trojans...now nothing opens and I get a paint can't open error (Viruses, Spyware and other Nasties)
- Looking for a Webmaster (Web Development Job Offers)
- Can dictionary keys be list of lists of lists???? (Python)
- Ways to create Dictionary (Python)
Other Threads in the Python Forum
- Previous Thread: Homework Help (Vigenere Cipher)
- Next Thread: Detecting key strokes.
Views: 562 | Replies: 14
| Thread Tools | Search this Thread |
Tag cloud for Python
anti approximation array avogadro beginner builtin cipher clear client code color converter countpasswordentry cturtle curved def dictionary drive dynamic examples excel file float format frange ftp function gui homework import input java lapse library line lines linux list lists loop microcontroller mouse multiple mysqldb mysqlquery newb number numbers output parsing path port prime program programming projects py2exe pygame pymailer pyqt python random recursion recursive redirect script scrolledtext singleton socket sqlite ssh stderr string strings subprocess sum syntax table terminal text textarea thread threading time tkinter tlapse tuple tutorial twoup ubuntu unicode unix urllib urllib2 variable web-scrape wikipedia windows word wxpython






