I received this source code: http://www.sbbic.org/split.zip under the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0
It came to me from the author without documentation or support (the author doesn't have the time right now, he is writing a book). My knowledge of Java is very limited.
Can someone tell me how to run the application in order to split the words in columns.txt file that is included in the source?
I've looked around in TextSegmenter.java trying to find how it should be called on the command line, but I have not been successful.
If I call: java com\whitemagicsoftware\dictionary\TextSegmenter lexicon.csv columns.txt I get this error:
Exception in thread "main" java.lang.NoClassDefFoundError: com\whitemagicsoftwar e\dictionary\TextSegmenter (wrong name: com/whitemagicsoftware/dictionary/TextSe gmenter) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12 4) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$000(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
I tried putting it into a .jar (again with limited experience, I only zipped the files with manually created manifest files included), but it is unable to load.
I am a newbee - sorry if this is a dumb question, but I would appreciate your help!
The purpose of the script is to break words that are joined (ex. "addresstype") into separate words (ex. "address" and "type"). The hope is to use this script in breaking words for the Khmer language which uses no spaces between words.
Thank you!
You are missing external libraries on the CLASSPATH. You have to set the CLASSPATH environment variable, or pass a classpath to the java command via the -cp option, like
java -cp externallib.jar:otherlib.jar -jar myjar.jar