Skip to main content

Etymology

If someone approached me a couple of months ago and claimed that I would soon be relishing the new dimension of vocabulary enhancement, I would have undoubtedly replied that there was a zero probability of it happening. I could not be more incorrect.
Perhaps, the thought of mugging up some five thousand words sounded very tedious. But, once I set the ball rolling, I realized that the words have certain salient patterns to them. That meant, I need not learn their definitions, but instead, scrupulously explore for those patterns.

The purpose behind writing this app was to study the etymology of words.

The source: http://www.etymonline.com/







I also decided to add a TextView that reports the request status from AsyncTask's onProgressUpdate method.




The pith of the program:

1
2
3
4
5
doc = Jsoup.connect("http://www.etymonline.com/index.php?allowed_in_frame=0&search=" + request + "&searchmode=term").get();
Elements info = doc.select("div#dictionary");    
String html = info.toString();
doc = Jsoup.parse(html);
result = doc.body().text();

Getting rid of the keyboard once Submit button is pressed:


1
2
InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
mgr.hideSoftInputFromWindow(editText.getWindowToken(), 0);

This project is very similar to one of my previous projects. Click here.

Popular posts from this blog

SalsaNight

Zorgania

The Zorganian Republic has some very strange customs. Couples only wish to have female children as only females can inherit the family's wealth, so if they have a male child they keep having more children until they have a girl. If they have a girl, they stop having children. What is the ratio of girls to boys in Zorgania?
The ratio of girls to boys in Zorgania is 1:1. This might be a little counter-intuitive at first. Here are some ways of tackling this problem. 1. Monte Carlo Simulation: Although, Monte Carlo simulation does not necessarily show why the result is 1:1, it is appropriate because of the very counter-intuitive nature of the problem. At the very least, it helps us see that the result is indeed 1:1. Therefore, this is a good start.
The following R code estimates the probability of a child being a boy in Zorgania. 
couples <-100000 boycount <-0for (i in1:couples){ # 0: boywhile (sample(c(0,1),1) ==0) { boycount=boycount+1 } } probability <- boycount/(co…

Simple Launcher

A simple minimal launcher application for Android devices that shows battery percentage using lzyzsd's CirclProgress library (ArchProgress used in this case) and BroadcastReciever for battery state, Android's clock widgets, a built-in flash light switch and an app list view that can be toggled. Currently, the toggle simply filters all the app that I am working on at present. Future implementation can allow users to select their favorite apps or populate second toggle based on the most used applications.