Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Having recently come across wordlist and wordnet, two great discoveries on their own, I'm now looking for a similar tool, if simpler, that will take the bare infinitive of a verb and return the simple past and past participle. Example:

$ verbteacher throw

Simple past: threw
Past participle: thrown

Does anybody know where to find verbteacher(1)?

share|improve this question

2 Answers 2

up vote 20 down vote accepted

Seems the easiest way is to write it yourself. At the first look I found pretty good website, that can give us all information we need. Thus all we need to do is to write a function that will parse it. So five minutes with bash and voila:

 $ function verbteacher() { 
    wget -qO - http://conjugator.reverso.net/conjugation-english-verb-$1.html | \
    sed -n "/>Preterite\|>Past</{s@<[^>]*>@ @g;s/\s\+/ /g;/e I/s/.* I \([^ ]*\) you .*/Simple past: \1/;/ Past/s/ Past /Past participle: /;p}" ; 
 }
 $ verbteacher go
Simple past: went
Past participle: gone 
 $ verbteacher throw
Simple past: threw
Past participle: thrown 

So you can put this function to your ~/.bashrc and use it until the site will change its structure. Hope it will never do it.

Obviously it won't work without the internet connection. Hope this is not critical for you.

share|improve this answer
    
Thank you! That will certainly do, though after discovering wordlist and wordnet I was hoping there was something fairly standard I didn't know about. –  sadpluto Jul 4 '12 at 22:45
    
+1 Ingenious solution! –  ams Jul 5 '12 at 12:56

you could use a dictionary file of all the words in the English language. You could find one online. The you could alter the script file a little to get the word from the file and output it to a text file that would hold the output of the reference. Then use that file to make a new version of the function that uses that file/database to look them up.

the easiest way would be for the output of each term to be on it's own line with the results tabbed apart. then you would only need to char match the first word of each line making it more efficient.

If you do do this please upload the results an open source script/database as I think there are more that could benefit from this. I think it would be cool to integrate it with Libra Office and let it be used from the terminal as well.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.