Wednesday, February 2, 2011

Progress

This week has seen a bit of everything. I've done less studying for the AP exam. Instead, I've been working diligently on my Quizbowl application. I was stumped by the task of dividing a paragraph into sentences. It seems easy. You'd think I could just split it by periods. It isn't that easy. To do this yourself you would need to create an Arraylist. Then, you would need to parse that array list for periods. Instead, I tried using break iterators.
The problem I found is that most of the code for the break iterator is private and hidden. I can't edit the code. The break iterator defines a sentence as the string between periods and /n. There are no methods that allow me to ignore the /n boundary. Another student in my class has advised me to try using tokenizers. As it turns out he was right (for the wrong reason). String tokenizers do allow me to specify what boundaries I want to use. I have made significant process in using string tokenizers to automatically analyze files that the user will input. In the process, I've studied strings, boolean algebra, and methodology that will help me on the AP.

No comments:

Post a Comment