[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: English Ruby Home as a second class citizen

james_b

12/14/2005 4:19:00 PM

slonik.az@gmail.com wrote:
> Hi Everyone,
> I just noticed that Japanese Ruby Home http://www.ruby-la...
> announces availability of Ruby-1.8.4 preview 2 and in general contains
> much more news and announcements that English Language Ruby Home
> http://www.ruby-la... that has not been updated since early October.
>
> I hope it should be possible to keep both web sites in sync so that
> those of us who do not speak Japanese can benefit from up-to-date
> information regarding Ruby.

Of course it is possible, but it currently depends on native
English-speaking site editors to a) know of the Japanese additions, and
b) have the time to go add the new item to the English version, assuming
c) the English-speaking editor can figure out the Japanese.

It's mainly a matter of time and energy, and yes, the announcement of
the 1.8.4 previews should have been put up on the English version site,
but sometimes thing slip by. It's a volunteer world.

It's there now, though, thanks to David A. Black.

James
(Now subscribing to the RDF feed for the Japanese version of the Ruby
home page ...)

--

http://www.ru... - Ruby Help & Documentation
http://www.artima.c... - Ruby Code & Style: Writers wanted
http://www.rub... - The Ruby Store for Ruby Stuff
http://www.jame... - Playing with Better Toys
http://www.30seco... - Building Better Tools


18 Answers

cap

12/14/2005 4:24:00 PM

0

I use

http://www.google.com/language_t...

to guess what did they say

james_b

12/14/2005 4:38:00 PM

0

cap wrote:
> I use
>
> http://www.google.com/language_t...
>
> to guess what did they say

Thanks. I can use that, or Alta Vista's Babel.

What I could use is a tool that takes the Japanese RDF feed, runs it
though a translator, and emits a new feed, to which I can subscribe.

Hmm ...

James


--

http://www.ru... - Ruby Help & Documentation
http://www.artima.c... - Ruby Code & Style: Writers wanted
http://www.rub... - The Ruby Store for Ruby Stuff
http://www.jame... - Playing with Better Toys
http://www.30seco... - Building Better Tools


Jacob Fugal

12/14/2005 5:56:00 PM

0

On 12/14/05, James Britt <james_b@neurogami.com> wrote:
> cap wrote:
> > I use
> >
> > http://www.google.com/language_t...
> >
> > to guess what did they say
>
> Thanks. I can use that, or Alta Vista's Babel.
>
> What I could use is a tool that takes the Japanese RDF feed, runs it
> though a translator, and emits a new feed, to which I can subscribe.
>
> Hmm ...

I've got a framework running at "http://jacob.fugal.net/... (ERA =
English Ruby Annoucements). The only portion lacking is the
translation. I couldn't find a web service that does japanese to
english and I didn't want to do screenscraping. If you can point me at
an appropriate webservice or write your own bit of screen scraping
code, I'll plug it in and you've got your feed! :)

Jacob Fugal


Austin Ziegler

12/14/2005 6:29:00 PM

0

On 14/12/05, James Britt <james_b@neurogami.com> wrote:
> slonik.az@gmail.com wrote:
> > Hi Everyone,
> > I just noticed that Japanese Ruby Home http://www.ruby-la...
> > announces availability of Ruby-1.8.4 preview 2 and in general contains
> > much more news and announcements that English Language Ruby Home
> > http://www.ruby-la... that has not been updated since early October.
> >
> > I hope it should be possible to keep both web sites in sync so that
> > those of us who do not speak Japanese can benefit from up-to-date
> > information regarding Ruby.
>
> Of course it is possible, but it currently depends on native
> English-speaking site editors to a) know of the Japanese additions, and
> b) have the time to go add the new item to the English version, assuming
> c) the English-speaking editor can figure out the Japanese.
>
> It's mainly a matter of time and energy, and yes, the announcement of
> the 1.8.4 previews should have been put up on the English version site,
> but sometimes thing slip by. It's a volunteer world.
>
> It's there now, though, thanks to David A. Black.
>
> James
> (Now subscribing to the RDF feed for the Japanese version of the Ruby
> home page ...)

Now, what I *really* want to know is what happened to the website
redesign effort.

-austin
--
Austin Ziegler * halostatue@gmail.com
* Alternate: austin@halostatue.ca


Wilson Bilkovich

12/14/2005 9:21:00 PM

0

On 12/14/05, Jacob Fugal <lukfugl@gmail.com> wrote:
> On 12/14/05, James Britt <james_b@neurogami.com> wrote:
> > cap wrote:
> > > I use
> > >
> > > http://www.google.com/language_t...
> > >
> > > to guess what did they say
> >
> > Thanks. I can use that, or Alta Vista's Babel.
> >
> > What I could use is a tool that takes the Japanese RDF feed, runs it
> > though a translator, and emits a new feed, to which I can subscribe.
> >
> > Hmm ...
>
> I've got a framework running at "http://jacob.fugal.net/... (ERA =
> English Ruby Annoucements). The only portion lacking is the
> translation. I couldn't find a web service that does japanese to
> english and I didn't want to do screenscraping. If you can point me at
> an appropriate webservice or write your own bit of screen scraping
> code, I'll plug it in and you've got your feed! :)

Does this lame little snippet help? Heh. Unfortunately, babelfish is
limited to 150 words.
Also, ruby-lang.org/ja uses EUC encoding, so if you're grabbing it
directly, rather than in Unicode form, you'll want $KCODE="E"

#jp.rb
require 'open-uri'
require 'cgi'
$KCODE="u"
exit unless ARGV[0]
input = CGI.escape(ARGV[0])
trans = URI("http://babelfish.altavista.com/tr?doit=done&intl=1&tt=urltext&am...{input}&lp=ja_en&btnTrTxt=Translate").read
output = trans[/<div style=padding:10px;>(.*)<\/div>/, 1]
puts output


Jacob Fugal

12/14/2005 9:47:00 PM

0

On 12/14/05, Wilson Bilkovich <wilsonb@gmail.com> wrote:
> Does this lame little snippet help? Heh. Unfortunately, babelfish is
> limited to 150 words.
> Also, ruby-lang.org/ja uses EUC encoding, so if you're grabbing it
> directly, rather than in Unicode form, you'll want $KCODE="E"
>
> #jp.rb
> require 'open-uri'
> require 'cgi'
> $KCODE="u"
> exit unless ARGV[0]
> input = CGI.escape(ARGV[0])
> trans = URI("http://babelfish.altavista.com/tr?doit=done&intl=1&tt=urltext&am...{input}&lp=ja_en&btnTrTxt=Translate").read
> output = trans[/<div style=padding:10px;>(.*)<\/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!

Jacob Fugal


Kevin Brown

12/14/2005 9:51:00 PM

0

On Wednesday 14 December 2005 15:21, Wilson Bilkovich wrote:
> On 12/14/05, Jacob Fugal <lukfugl@gmail.com> wrote:
> > On 12/14/05, James Britt <james_b@neurogami.com> wrote:
> > > cap wrote:
> > > > I use
> > > >
> > > > http://www.google.com/language_t...
> > > >
> > > > to guess what did they say
> > >
> > > Thanks. I can use that, or Alta Vista's Babel.
> > >
> > > What I could use is a tool that takes the Japanese RDF feed, runs it
> > > though a translator, and emits a new feed, to which I can subscribe.
> > >
> > > Hmm ...
> >
> > I've got a framework running at "http://jacob.fugal.net/... (ERA =
> > English Ruby Annoucements). The only portion lacking is the
> > translation. I couldn't find a web service that does japanese to
> > english and I didn't want to do screenscraping. If you can point me at
> > an appropriate webservice or write your own bit of screen scraping
> > code, I'll plug it in and you've got your feed! :)
>
> Does this lame little snippet help? Heh. Unfortunately, babelfish is
> limited to 150 words.

Babelfish will also let you plug in a site and just translate that. So why
not just plug in the site and then scrape the actual page with just
translated text?


Eero Saynatkari

12/14/2005 9:55:00 PM

0

Jacob Fugal wrote:
> On 12/14/05, Wilson Bilkovich <wilsonb@gmail.com> wrote:
>> input = CGI.escape(ARGV[0])
>> trans = URI("http://babelfish.altavista.com/tr?doit=done&intl=1&tt=urltext&am...{input}&lp=ja_en&btnTrTxt=Translate").read
>> output = trans[/<div style=padding:10px;>(.*)<\/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-....


Alan Garrison

12/14/2005 10:25:00 PM

0

Kevin Brown wrote:

>Babelfish will also let you plug in a site and just translate that. So why
>not just plug in the site and then scrape the actual page with just
>translated text?
>
>
>

FWIW, it appears that Google also supports pulling a URL and doing
Japanese->English translation (marked as Beta):

http://www.google.com/language_t...


--
Alan Garrison
Cronosys, LLC <http://www.cronos...
Phone: 216-221-4600 ext 308




Jacob Fugal

12/14/2005 10:29:00 PM

0

On 12/14/05, Eero Saynatkari <ruby-forum-reg@mailinator.com> wrote:> Jacob Fugal wrote:> > 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).Well, truth be told, I couldn't even get the snippet working for me,regardless of the 150ish-char limit[1]. The oddity is this: I can echoout the URI I'm going to request, past that URI into my browser andget a page with a decent translation. However, if I take that same URIand run it through wget (or Ruby's open-uri) I get a different result.And the difference isn't just in encoding, there are differences inthe returned HTML!For instance, the URIhttp://babelfish.altavista.com/tr?doit=done&intl=1&tt=urltext&trtext=Webrick+DoS%E8%84%86%E5%BC%B1%E6%80%A7%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6&lp=ja_en&btnTrTxt=Translat... to the Japanese string: "Webrick DoS???????". If I put thatURI in my browser, the resulting page says "About Webrick DoSvulnerability". Perfect.If I fetch that same URI via wget, the HTML returned has "Webrick DoS^@ <86> ^@ ± ^@ SECT. ^@ ^@ ^@ ^@ ^@ <84> ^@ ^@" instead (looking atit in a non-unicode vim over putty). Even stranger, the page in mybrowser has a hidden input with name="q" and value="About Webrick DoSvulnerability". The HTML returned by wget has a hidden input in thesame position (surrounding HTML identical) but with name="kls" andvalue="0".Any one have any ideas what's going on?Jacob Fugal[1] The limit imposed by bablefish is actually 150 *words*. However,as a GET request, URI raises an exception about the URL being too longfar before 150 words are actually reached.