I
Ike
I have a seemingly unusual data structure and I was hoping someone could
suggest how best to "hold" it in memory, in Java.
Essentially, I am parsing swaths of text, into sentences, where each word is
labelled with it's part of speech (noun, verb, etc), and the sentence then
"diagrammed," much as you may have done in grade school. Not diagrammed on
the screen, per se, but, broken down into a tree (I am actually using a
JTree for this at the moment), where, say, the sentence branches into both a
subject and a predicate, and under the predicate branch, there is a verb,
and under the verb branch, there may be one or more 'qualifiers' - in the
case of a verb, a qualifier would be an adverb.
The tree can therefore, depending on home much text is input, become huge.
I also need to traverse and search the tree, i.g., find all sentences that
use a certain noun, etc.
As I said, I presently hold this in a JTree, and cannot do that for long. I
also would like to be able to store the tree from one session to the next.
How would a seasoned Java programmer appraoch this? Thank you, Ike
suggest how best to "hold" it in memory, in Java.
Essentially, I am parsing swaths of text, into sentences, where each word is
labelled with it's part of speech (noun, verb, etc), and the sentence then
"diagrammed," much as you may have done in grade school. Not diagrammed on
the screen, per se, but, broken down into a tree (I am actually using a
JTree for this at the moment), where, say, the sentence branches into both a
subject and a predicate, and under the predicate branch, there is a verb,
and under the verb branch, there may be one or more 'qualifiers' - in the
case of a verb, a qualifier would be an adverb.
The tree can therefore, depending on home much text is input, become huge.
I also need to traverse and search the tree, i.g., find all sentences that
use a certain noun, etc.
As I said, I presently hold this in a JTree, and cannot do that for long. I
also would like to be able to store the tree from one session to the next.
How would a seasoned Java programmer appraoch this? Thank you, Ike