
edu.upenn.seas.mstparser.Util Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jcore-mstparser-ae Show documentation
Show all versions of jcore-mstparser-ae Show documentation
Slightly modified version of the MST parser to fit into the UIMA framework.
This dependency parser determines all syntactic dependencies between words within a sentence. Certain level of
adaptation of the original source code was necessary to neatly integrate the parser in UIMA.
The newest version!
package edu.upenn.seas.mstparser;
/**
* Utility methods that may be generally useful.
*
* @author Jason Baldridge
* @created August 27, 2006
*/
public class Util {
// Assumes input is a String[] containing integers as strings.
public static int[] stringsToInts(String[] stringreps) {
int[] nums = new int[stringreps.length];
for(int i = 0; i < stringreps.length; i++)
nums[i] = Integer.parseInt(stringreps[i]);
return nums;
}
public static String join (String[] a, char sep) {
StringBuffer sb = new StringBuffer();
sb.append(a[0]);
for (int i=1; i
© 2015 - 2025 Weber Informatics LLC | Privacy Policy