JavaScript - Verb Dictionary...
I am writing a script which deals with reading text and extracting information from it. What I want this script to accomplish is outlined below:
1.) The user uploads a .txt file containing an article in a newspaper or a expert from a book etc. 2.) The text is then printed onto the page 3.) After a button is clicked, all the verbs in the article are highlighted (This doesn't have to be very precise, and will involve the script reading from a verb dictionary/list and highlighting any matches if finds.) 4.) The total amount of verbs is printed at the bottom. The issues I am having is planning a way to set up this verb dictionary. I was thinking of using an array but would like to avoid it if at all possible as I am dealing with strings not numbers, and I do not want to go into creating a database if it can be avoided. Does anyone have suggestions on how I can go about setting up some kind of verb list that the script can read from? (On a side note, if there is another language that may be better suited for this kind of program, I have experience in Java and C but would prefer to use JavaScript.) Thanks. Similar Tutorialshi guys, How could I make this useful dictionary bookmarklet open in a new window? javascript:var%20t=((window.getSelection&&window.getSelection())||(document.getSelection&&document.g etSelection())||(document.selection&&document.selection.createRange&&document.selection.createRange( ).text));var%20e=(document.charset||document.characterSet);if(t!=''){location.href='http://translate.google.com/translate_t?text='+t+'&hl=en&langpair=auto|en&tbb=1&ie='+e;}else{location.href='http://translate.google.com/translate?u='+escape(location.href)+'&hl=en&langpair=auto|en&tbb=1&ie='+e;}; Its the "To English" bookmarklet as featured on lifehacker. Thanks! |