Search code examples
algorithmprogramming-languagesdictionary

What programming language, algorithm should I use for dictionary translation?


I need to translate (or rather, map) the words in an English document to Bengali using an English-to-Bengali dictionary. I have a huge collection of these documents. What algorithm should I use, and what language? The documents and dictionary are UTF-8 encoded text files. The translation is naive and straightforward, as words will be blindly replaced with whatever the dictionary says, be it a single-word meaning or a phrase or a sentence.


Solution

  • You can use any mainstream language you want. Just check what sort of support it has for unicode and whether it has a built in associative data structure (e.g. stl::map in C++, HashMap/TreeMap in Java, dict in Python etc.). Pretty much any modern language has them, or has a freely available library for them.