public class DependencyConverter extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
DependencyConverter.Node |
| Modifier and Type | Field and Description |
|---|---|
static HashSet<String> |
femaleNames |
static KB |
kb |
static HashSet<String> |
maleNames |
static List<String> |
MONTHS |
static StringBuffer |
output |
| Constructor and Description |
|---|
DependencyConverter() |
| Modifier and Type | Method and Description |
|---|---|
void |
addNode(String dep,
HashMap<String,DependencyConverter.Node> index) |
DependencyConverter.Node |
createGraph(ArrayList<String> deps) |
DependencyConverter.Node |
findRoot(HashMap<String,DependencyConverter.Node> index) |
static String |
formatSUMO(HashSet<String> SUMO) |
static String |
getArg(int argnum,
String line) |
static ArrayList<String> |
getDependencies(String input)
Get the output of the Stanford Dependency Parser for the given
input file.
|
static boolean |
isModal(String arg) |
static void |
main(String[] args) |
static HashMap<String,String> |
processDependency(DependencyConverter.Node n)
Process one grammatical dependency statements from the Stanford
parser into a logical expression using SUMO terms.
|
static void |
readFirstNames()
Read the FirstNames.cvs file into maleName and femaleNames
|
static ArrayList<String> |
splitSentences(String infile)
Run the Stanford NLP tools on the given text file to split a
text into sentences.
|
static void |
test(String input)
Take in a single quoted sentence from the command line and
print out its dependency parse.
|
void |
traverseNodes(DependencyConverter.Node root) |
public static KB kb
public static StringBuffer output
public static boolean isModal(String arg)
public static ArrayList<String> getDependencies(String input) throws IOException
IOExceptionpublic static ArrayList<String> splitSentences(String infile) throws IOException
infile - the fully qualified filename of the input fileIOExceptionpublic static void readFirstNames()
public static HashMap<String,String> processDependency(DependencyConverter.Node n)
public void traverseNodes(DependencyConverter.Node root)
public void addNode(String dep, HashMap<String,DependencyConverter.Node> index)
public DependencyConverter.Node findRoot(HashMap<String,DependencyConverter.Node> index)
public DependencyConverter.Node createGraph(ArrayList<String> deps)
public static void test(String input)
public static void main(String[] args)
Copyright © 2015. All rights reserved.