RE: [Classifier4j-devel] SimpleHTMLTokenizer should use decorator pattern
Status: Beta
Brought to you by:
nicklothian
From: Nick L. <nl...@es...> - 2004-09-02 03:53:46
|
> > > Hi, > > Now, SimpleHTMLTokenizer inherits from DefaultTokenizer. If I make a > new ITokenizer implement, I have to rewrite a HTML tokenizer. > > If SimpleHTMLTokenizer use decorator pattern, it can be re-used in > other ITokenizer implements. > > --------------------> ITokenizer > | | | > -- SimpleHTMLTokenizer DefaultTokenizer > > Why would you want to use any of the functionality of SimpleHTMLTokenizer without also using DefaultTokenizer? SimpleHTMLTokenizer doesn't really do a great deal more than DefaultTokenizer, and I would like to understand which parts of it you want to reuse. Nick |