Writing code that will take a Symbol and expand it into a sentence using basic grammar rules. I have included a copy of my code in text format (it will not compile because Telnet ate several lines) but it should give you an idea where I am going with the algorithm.
The bug that is sticking me is in my Extract_Category method. Probably in these three lines:
if(nextChar.equals(" ")
int end = i;
break;
The method accepts the String NAME VP and should iterate through the string and extract the substring NAME. However it iterates right through the space character and returns the whole string "NAME VP". Why would it not recognize the space character?
Here is most of my code


Reply With Quote


Bookmarks