[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]
Re: [zzdev] java.text.BreakIterator
- To: Benjamin Fallenstein <b.fallenstein@xxxxxx>
- Subject: Re: [zzdev] java.text.BreakIterator
- From: Tuomas Lukka <lukka@xxxxxxxxxx>
- Date: Wed, 22 Nov 2000 00:21:35 +0200 (EET)
- Cc: ZZ Development <zzdev@xxxxxxxxxx>
- In-reply-to: <3A1AB8FD.F5D1B7F@xxxxxx>
> Just noted: why don't we use java.text.BreakIterator? It can break lines
> as well as words and sentences, and it can do so in a localized way.
> Plus, it's standard JDK 1.1. As long as we stay on the Java platform,
> why not use the intelligence that's there?
No, it can only break strings. Breaking by lines is only in 1.2.
Also, we want special definition of sentence: the separator of sentences
is two spaces.
Breaking at these is the simple part. The complicated part is figuring out
how to make it easy for the user to manipulate objects at these levels.
> If we want user-defined
> splitting points just based on the text, not additional structural
> considerations, we can write own subclasses of BreakIterator. We'll also
> need to write an own underlying CharacterIterator, but that should be trivial.
> (Where to use it? Well, in FText and in Nile1Div implementations, obviously.)
I'm considering an API a little like BreakIterator but with more
intelligence, related to splicing stuff together the right way.