Tag Archives: java

Serializing Stanford Parser Objects.

Recently, I found the need to serialize Stanford Parser objects to a file. Though I was familiar with the concept of serialization, I had never done such a thing in Java before. The following is an example on how to do just that: serializing Stanford Parser Tree objects to a file. The example accomplishes the [...]

Posted in NLP, Programming | Also tagged , | Comments closed

Sorting methods in Java.

I made this during school and have used it many a times while preparing for an interview or checking my new work in new languages. The class has static methods for all of the classic sorting methods like selection sort, bubble sort, insertion sort, heap sort, merge sort and quick sort. public class Sorts { [...]

Posted in Programming | Also tagged , | Leave a comment

Print string permutations with Java.

I wrote this just to exercise my old java skills. If you find a use for it, let me know what you did with it! import java.util.*;   public class Permute { LinkedList<String> orig;   public Permute(LinkedList<String> _orig) { orig = _orig; }   public LinkedList<String> BuildPerms(LinkedList<String> thisOrig) { Iterator<String> itr = thisOrig.iterator(); LinkedList<String> thisSol [...]

Posted in Programming | Also tagged , | Leave a comment