Ulf Dittmer wrote:My first question would be: why store the parse tree when you can store the document (from which you can regenerate the parse tree any time you please) ?
They have given requirement like this. I am trying and trying. I think by using following code we can generate parse tree.
InputStream is = new FileInputStream("en-parser-chunking.bin");
ParserModel model = new ParserModel(is);
Parser parser = ParserFactory.create(model);
String sentence ="An Inverted Index is a data structure used to create full text search.";
Parse topParses[] = ParserTool.parseLine(sentence, parser, 1);
for (Parse p : topParses)
{
p.show();
}
is.close();
Output is like this:
(TOP (S (NP (DT An) (NNP Inverted) (NNP Index)) (VP (VBZ is) (NP (NP (DT a) (NN data) (NN structure)) (VP (VBN used) (S (VP (TO to) (VP (VB create) (NP (JJ full) (NN text)))))))) (. search.)))
Q: How to store it into Mysql..
any one Please help us.
Thanks in advance