Done. I agree that this looks better.


On Wed, Aug 7, 2013 at 2:46 PM, Andrew McCallum <notifications@github.com>wrote:

> In src/main/scala/cc/factorie/app/nlp/DocumentAnnotator.scala:
>
> > +  def process(document: Document) = {
> > +    var doc = document
> > +    for (annotator <- annotators; if annotator.postAttrs.forall(!doc.hasAnnotation(_))) {
> > +      doc = annotator.process(doc)
> > +      annotator.postAttrs.foreach(a => document.annotators(a) = annotator.getClass)
> > +    }
> > +    doc
> > +  }
> > +  def tokenAnnotationString(token: Token) = annotators.map(_.tokenAnnotationString(token)).mkString("\t")
> > +}
> > +
> > +class MutableDocumentAnnotatorMap extends collection.mutable.HashMap[Class[_], () => DocumentAnnotator] {
> > +  def +=(annotator: DocumentAnnotator) = annotator.postAttrs.foreach(a => this(a) = () => annotator)
> > +}
> > +
> > +object DocumentAnnotator {
>
> Let's call this DocumentAnnotatorPipeline, since it creates
> DocumentAnnotatorPipeline instances.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/factorie/factorie/pull/21/files#r5639832>
> .
>



-- 
 - Alexandre