Newsgroup: it.comp.java
Titolo: searching java class dictionary

Hi
Im at the end. Im searching now for hours on the internet to find a java
class that can translate languages. For example english to german and
vica verca. But I only find webpages that have theyr translaters build
in.
I need a java class so I can include it in my java application.  What I
have in mind is that I just can call a function like
german_word = Dictionary.translate( english_word );
I need to have the translated string as String, and not just printed by
a foreign window on the screen.
This application would be for my semester thesis which has to be
finished soon. I am very thankfull for every little hint or help.
Thank you folks very much
Flo

german_word = Dictionary.translate( english_word );
A very simple word-to-word translation can be obtained by putting in a
dictionary.txt file all the entries you want to translate in a way
like:
 
	bread=broth
	water=wasser
	thanks=danke
Then you can load the dictionary file as properties this fashion:
	java.util.Properties translation=new java.util.Properties();
	java.io.FileInputStream file=new java.io.FileInputStream
					("dictionary.txt");
	translation.load(file);
Now you can obtain the translation of a word simply calling:
	String english="bread";
	String german=translation.getProperty(english);
As you can see, the problem here is all in the completeness of your
dictionary; another important issue is that you have to compile a
*formary* more than a *dictionary*, that is to say you have to have
singular and plural for all substantives, and full coniugation of all
verbs.
For a true *syntactical* translator, the work is very much harder,
having you to formalize and implement the *phrase constructs* of the
two languages...
I have never heard of something similar (in any *computer* language)
out for free, but I have ceased looking for, having I abandoned that
project.
Good luck,
Mauri.
P.s.: *it* in it.comp.java stands for *italy*, so please try to use
your fantastic *inner* syntactical translator to post in italian, here
:-} .
P.p.s.: mi sono riletto, e mi applaudirei da solo... sembravo quasi
*vero*!
-- 
La forza di gravitŕ č un falso mito,
č la Terra che succhia!

 vica verca. But I only find webpages that have theyr translaters build
Language translation is (still) very complex. Anyone who writes translation 
software undoubtedly wants $$$ for it, and won't give the code away. I 
don't know of any GPL translation software.


Language translation is (still) very complex.
Not so complex, my dear, to prevent YOU to post in italian on THIS
italian newsgroup :-} (qui non vedo il crosspost...)
Thanks,
Mauri.
-- 
La forza di gravità è un falso mito,
è la Terra che succhia!

Florian Kaufmann aka Sensorflo wrote:

At
 
http://www.tu-chemnitz.de/dict
is a downloadable plain-text dictionary (english<->german)
You can perhaps put it into a jar-File and write a simple Java
class by yourself that reads it into a user defined data structure
and offers you the desired methods
Bye
Thorsten

 wrote in message
news:3C5D38E4...@freesurf.ch...

Hi,
Another  option are the files available from the Internet Dictionary Project
http://www.june29.com/IDP/IDPfiles.html
it should be a trivial matter to write your dictionary search class based on
the format of these files.
Success
Darryl

 wrote in message
news:3C5D38E4...@freesurf.ch...


 anyway, wouldn't you?
Don't jump to conclusions... The OP might be doing a degree in Plagarism :-)
Tom

ciao ognuno
I thank you very much for your help. It worked!!! Juchuuu. With the
java.util.Properties I can indeed read in a big dictionary text file I
retreived from the net. Both Informations came from you guys and helped me
very much. I just had the presentation of my thesis and I could show my
translator service.
Apropos 'mine'. Of course my thesis is not about the translator itself. My
thesis is about "service deployment for heterogenous active network nodes".
Active network nodes, in contrast to regular routers, can not only forward
packets but also process the data contained in them. The thesis was about
writing an implementation of such a active node, which can install an
arbitrary service on the node. You see that the main point lies in
installing the service and not in the service itselt. As an example for a
service I now took this translator, which I could finish because of you
guys. Grazie molot!!
Yes, indeed,  I didnt know that it stands for italia. Unfortuntly I cant
speak this language, altough I live in the contry just north to it.
Saluti
Sensorflo