Open-Tamil for Java
A simple package containing 2-3 functions for Tamil text processing, is proposed for Java. It is available from open-tamil project repository, using the MIT license.
Using this project you can get utf8.get_letters, utf8.get_length API in Java. This code is, as always, tested using JUint.
Building Jar file from sources
Before you start you need the following,
- Download the source of open-tamil from github using the link
- cd open-tamil/java/OpenTamil
- Open this directory in your ‘Eclipse’ or ‘NetBeans’ IDE, and setup a library project
- Build the ‘JAR’ file
- Close open-tamil project
- On command line copy the jar file into your project (this is not open-tamil) directory
- You can being using the jar file like the following example, and as long as the JAR file is on your path, it should compile and run just fine.
Example:
import com.opentamil.tamil.*; public class Petti { public static void main() { List<String> chars = utf8.get_letters("கட்டளை"); //strange fruit System.out.print("கட்டளை -> "+chars.size()); } } You should see an output like, கட்டளை -> 4