You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I call setDataFromText function using the following tree representation ((ROOT (S (NP (NNP KeLP)) (VP (VBZ is) (ADJP (JJ very amazing)))))
it works fine but a few extra spaces here and there(shown using asteriks *) e.g. as shown below (ROOT (S (NP (NNP****** KeLP)) (VP (VBZ is) (ADJP (JJ very amazing)))))
gives the error that parentheses are not equal and following is printed
Error in analyzing: (ROOT(S(NP(NNP((((((KeLP))))(VP(VBZ(is))(ADJP(JJ(very(amazing))))))))))
Another example: ((ROOT (S (NP (NNP KeLP)) (VP******(VBZ is) (ADJP (JJ very amazing)))))
Error in analyzing: (ROOT(S(NP(NNP(KeLP)))(VP(((VBZ(((is))(ADJP(JJ(very(amazing)))))))))).
So extra spaces are replaced by arbitrary number of parenthesis which creates a problem during analysis. Since I have source code lines i.e. entire sentences instead of words I cannot control the spaces. Hence any workaround or suggestions welcome. thanks
The text was updated successfully, but these errors were encountered:
So the following statement would raise an exception
t2.setDataFromText("(ROOT (S (NP (NNP KeLP)) (VP (VBZ is) (ADJP (JJ very amazing)))))");
Error in analyzing: (ROOT(S(NP(NNP(((((((KeLP))))(VP(VBZ(is))(ADJP(JJ(very(amazing)))))))))).
The number of opened and close parentheses are different.
When I call setDataFromText function using the following tree representation
((ROOT (S (NP (NNP KeLP)) (VP (VBZ is) (ADJP (JJ very amazing)))))
it works fine but a few extra spaces here and there(shown using asteriks *) e.g. as shown below
(ROOT (S (NP (NNP****** KeLP)) (VP (VBZ is) (ADJP (JJ very amazing)))))
gives the error that parentheses are not equal and following is printed
Error in analyzing: (ROOT(S(NP(NNP((((((KeLP))))(VP(VBZ(is))(ADJP(JJ(very(amazing))))))))))
Another example:
((ROOT (S (NP (NNP KeLP)) (VP******(VBZ is) (ADJP (JJ very amazing)))))
Error in analyzing: (ROOT(S(NP(NNP(KeLP)))(VP(((VBZ(((is))(ADJP(JJ(very(amazing)))))))))).
So extra spaces are replaced by arbitrary number of parenthesis which creates a problem during analysis. Since I have source code lines i.e. entire sentences instead of words I cannot control the spaces. Hence any workaround or suggestions welcome. thanks
The text was updated successfully, but these errors were encountered: