What you want is far from trivial, and most solutions require complex machine learning algorithms. The following is the only java library I know of written exclusively in java, and I have not tried...