• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

is there any possibility to store parse tee in database

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am new to java. is there any possibility to store parse tee in database such as mqsql, oracle, etc. My requirement is http://ieee-projects10.com/incremental-information-extraction-using-relational-databases/. I found some code about generating parse tree. my next step is store that tree in database. please help.

Thanks in advance
satya
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A "parse tree" of what? What are you parsing?
 
t sathya narayana
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here I have to generate parse tree of a document, each node represents an element in the document which can be a section, a sentence. They also given some example diagram in above given link.
 
Marshal
Posts: 79240
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should be able to store parse trees anywhere if you can record their structure.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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) ?
 
t sathya narayana
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

t sathya narayana wrote:They have given requirement like this...


Then I think you need to ask them why, because it sounds to me like they are not only telling you what to do, but how to do it; and that's almost always a recipe for disaster (too many 'cooks'...).

If this is part of a course, then they might be trying to see how you solve the problem; but if they are paying you to program, then my response would be to tell them to mind their own business (but I was never much of a diplomat ).

If it's the former, then you might want to look at Serializable (java.io.Serializable); but I warn you: there's quite a lot to know.

Winston
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are different things you might do here, and which one is the best depends on the requirements about which we know very little. I still think you'd do best to ask "them" -whoever "they" are- what they're trying to accomplish, and then you can implement the best way to do that.
 
Ranch Hand
Posts: 77
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could store the entire output as one record in the database (which i suspect is not part of your assignment). Or, you could look up any data structure book and see how a parse tree is stored (there will be a data structure for each node, and this node info can constitute one record in your database). I also suspect that it is a requirement that your program should be able to read the info "from the database", and be able to reconstruct the sentence/para.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic