From: Eero Saynatkari Date: 2005-12-15T06:55:03+09:00 Subject: Re: English Ruby Home as a second class citizen Jacob Fugal wrote: > On 12/14/05, Wilson Bilkovich wrote: >> input = CGI.escape(ARGV[0]) >> trans = URI("http://babelfish.altavista.com/tr?doit=done&intl=1&tt=urltext&trtext=#{input}&lp=ja_en&btnTrTxt=Translate").read >> output = trans[/
(.*)<\/div>/, 1] >> puts output > > I tried integrating that, but the 150 char limit meant that most -- if > not all -- of the bodies couldn't be translated. Having translated > titles would be a slight improvement, but not enough. Thanks for the > direction though! You could split the strings into 150-char sections and loop over them sending a new request for each. A Google translation might not have such limits (quality of translation notwithstanding). > Jacob Fugal E -- Posted via http://www.ruby-forum.com/.