Posted on March 25, 2008 by mrtextminer
When using JMenuItem in JMenuBar to cut/copy/paste/select all text from a JTextPane, a focus from JTextPanel is temporarily lost to JMenuItem. The loss of focus causes isFocusOwner() of JTextPane to return false. As a result, the cut/copy/paste/select all methods using JMenuItem do not work.
For example, I use JMenuItems for cut/copy/paste/select all methods with the following [...]
Filed under: Java | Leave a Comment »
Posted on March 24, 2008 by mrtextminer
I am implementing a user-interface where there is a main JPanel called centerPanel containing two smaller JPanels, source panel and target panel. The source panel contains a JTextPane, and the target panel also contains a JTextPane and another JPanel for holding JButtons. The structure of this user-interface is described below.
centerPanel (JPanel with GridLayout)
sourceWindowPanel (JPanel)
JTextPane
targetSourceWindowPanel (JPanel)
jTextPane
JPanel
JButton1
JButton2
JList
JTextField
The issues are:
If I set centerPanel layout as [...]
Filed under: Java | Leave a Comment »
Posted on March 16, 2008 by mrtextminer
When we try to use LIBSVM through WEKA, we might encounter the problem of libsvm.jar not in the classpath. Here, I’d like to describe how to set up Weka and LIBSVM for weka.
1) Download weka-3.5.7.zip from http://www.cs.waikato.ac.nz/ml/weka/, and unzip it to /path/to/weka-3.5.7
2) Download libsvm-2.85.zip from http://www.csie.ntu.edu.tw/~cjlin/libsvm/, and unzip it into /path/to/libsvm-2.85
3) Copy weka.gif in the [...]
Filed under: Java, Linux, text mining | Leave a Comment »
Posted on March 3, 2008 by mrtextminer
This exercise comes from “A Practical Guide to Support Vector Classification” paper by Chih-WEi Hsu, Chih-Chung Chang and Chih-Jen Lin. It can be downloaded from http://www.csie.ntu.edu.tw/~cjlin/libsvm/index.html.
The goal for writing this page is to record step-by-step instructions of an example in the paper above using Java version in Debian Etch. So, this record will be used [...]
Filed under: Java, text mining | 2 Comments »