LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-17-2012, 10:53 PM   #1
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,357

Rep: Reputation: 213Reputation: 213Reputation: 213
Curl to get word translation (wordnet) and translation from CLI?


Hi,

I would like to know whether this would be possible, to use curl to get sthg similar to :
wn example -over

or translate a word from ex. one language to another one,
this using curl (or wget), linux, ....opensource, and for the command line output (cli)

thank you
 
Old 05-22-2012, 04:22 PM   #2
cheesus
Member
 
Registered: Jan 2005
Location: Munich, Germany
Distribution: SuSE
Posts: 184

Rep: Reputation: 25
well, you can call "curl http://wordnetweb.princeton.edu/perl/webwn?s=drink" to search for drink,
but the HTML output might not help you.
"lynx http://wordnetweb.princeton.edu/perl/webwn?s=drink" (or w3m) would make sense...
Cheers, Tom.
 
Old 05-23-2012, 04:29 PM   #3
romagnolo
Member
 
Registered: Jul 2009
Location: Montaletto
Distribution: Debian GNU/Linux
Posts: 107

Rep: Reputation: 5
Yes this is possible whether with curl or wget. With a small BASH script, you
a) ask for the input world;
b) compose the dictionary URL with the word parametrized;
c) access the URL and retrieve the webpage, parsing the html for static features around the portion of text that contains the translated word;
d) output to terminal the translation.

This is about 10 lines of BASH code.
 
Old 05-24-2012, 12:21 PM   #4
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,357

Original Poster
Rep: Reputation: 213Reputation: 213Reputation: 213
Quote:
Originally Posted by romagnolo View Post
Yes this is possible whether with curl or wget. With a small BASH script, you
a) ask for the input world;
b) compose the dictionary URL with the word parametrized;
c) access the URL and retrieve the webpage, parsing the html for static features around the portion of text that contains the translated word;
d) output to terminal the translation.

This is about 10 lines of BASH code.
That's really cool from them, from wordnet to leave the possibility to get the definition.

wow
gorgeous intentions from them
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
.po translation (((X))) Linux - Newbie 5 03-28-2008 04:42 PM
Help with translation Thakowbbery General 2 01-18-2008 08:00 AM
Translation in Urdu Help abidsiddique Fedora 1 06-30-2006 01:48 PM
translation hammam Linux - Software 2 05-20-2006 08:19 AM
translation? rebelcan Linux - General 1 07-28-2003 02:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration