Hi, I'm studying JBoost 1.4 in this weekend on Windows XP. I succeded in run the demos and my training set. The tree is successfully build.
Now I'd like to use the tree with java since it has the predictor just built in and I don't want to write a generic source in c to manage all types of input. But I cannot understand how to obtain the predictor.java from stem.java (for example).
If I cut the section highlighted in stem.java, javac send me this error:
predict.java:1: 'class' or 'interface' expected
static private jboost.examples.Example ex;
^
predict.java:8: 'class' or 'interface' expected
static public void main(String[] argv) {
^
2 errors
So I added the class name I find at the top of the original file stem.java, but now the I've mach more errors:
-------------------------------
predict.java:27: cannot find symbol
symbol : variable attr
location: class predict
attr = new Object[4];
^
predict.java:29: cannot find symbol
symbol : variable keys
location: class predict
jboost.examples.TextDescription.setTokenSet(keys);
^
predict.java:45: cannot find symbol
symbol : variable real_attr
location: class predict
for (j = 0; j < real_attr.length; j++) {
^
predict.java:46: cannot find symbol
symbol : variable real_attr
location: class predict
a = real_attr[j];
^
predict.java:48: cannot find symbol
symbol : variable attr
location: class predict
attr[a] = (at.isDefined()
^
predict.java:52: cannot find symbol
symbol : variable disc_attr
location: class predict
for (j = 0; j < disc_attr.length; j++) {
^
predict.java:53: cannot find symbol
symbol : variable disc_attr
location: class predict
a = disc_attr[j];
^
predict.java:55: cannot find symbol
symbol : variable attr
location: class predict
attr[a] = (at.isDefined()
^
predict.java:59: cannot find symbol
symbol : variable text_attr
location: class predict
for (j = 0; j < text_attr.length; j++) {
^
predict.java:60: cannot find symbol
symbol : variable text_attr
location: class predict
a = text_attr[j];
^
predict.java:63: cannot find symbol
symbol : variable attr
location: class predict
attr[a] = "";
^
predict.java:66: cannot find symbol
symbol : variable tokens
location: class predict
Arrays.fill(tokens[a], false);
^
predict.java:68: cannot find symbol
symbol : variable tokens
location: class predict
tokens[a][set[k]] = true;
^
predict.java:71: cannot find symbol
symbol : variable attr
location: class predict
attr[a] = null;
^
predict.java:74: cannot find symbol
symbol : method predict_int()
location: class predict
r = predict_int();
^
15 errors
-------------------------------
Please, can you explain step by step what I've to do with stem.java to obtain predict.java under windows? Even if your project is interesting, as you may imagine, it's not usefull for me without prediction. :-)
Thank you very much for your help!
Filippo
---------------------------------
---------------------------------
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail |