<commit_before>package controllers

import scala.collection.mutable
import controllers.util.MoroConfig

/**
 * Maintain a list of compilers, which is used for constructing an application
 * @author sameer
 */
class Compilers extends mutable.Traversable[Compiler] {
  val _map = new mutable.LinkedHashMap[String, Compiler]

  def apply(name: String): Compiler = _map(name)

  def get(name: String): Option[Compiler] = _map.get(name)

  def +=(c: Compiler) = {
    _map(c.name) = c
  }

  def foreach[U](f: (Compiler) => U): Unit = _map.valuesIterator.foreach(f(_))
}

class AllCompilers(config: MoroConfig) extends Compilers {
  this += new TwitterEvalServer(config)
  this += new WolfeEvalServer(config)
  this += new PegdownCompiler
  this += new SectionCompiler
  this += new LatexCompiler
  for (i <- 1 to 5) this += new HeadingCompiler(i)
  this += new HTMLCompiler
  this += new ImageURLCompiler
  this += new GoogleDocsViewer
  this.foreach(_.start)
}<commit_msg>revert to Acturius<commit_after>package controllers

import scala.collection.mutable
import controllers.util.MoroConfig

/**
 * Maintain a list of compilers, which is used for constructing an application
 * @author sameer
 */
class Compilers extends mutable.Traversable[Compiler] {
  val _map = new mutable.LinkedHashMap[String, Compiler]

  def apply(name: String): Compiler = _map(name)

  def get(name: String): Option[Compiler] = _map.get(name)

  def +=(c: Compiler) = {
    _map(c.name) = c
  }

  def foreach[U](f: (Compiler) => U): Unit = _map.valuesIterator.foreach(f(_))
}

class AllCompilers(config: MoroConfig) extends Compilers {
  this += new TwitterEvalServer(config)
  this += new WolfeEvalServer(config)
  this += new ActuriusCompiler
  this += new SectionCompiler
  this += new LatexCompiler
  for (i <- 1 to 5) this += new HeadingCompiler(i)
  this += new HTMLCompiler
  this += new ImageURLCompiler
  this += new GoogleDocsViewer
  this.foreach(_.start)
}
{'fraction_non_alphanumeric': 0.11213991769547325, 'fraction_numerical': 0.00205761316872428, 'mean_word_length': 4.509915014164306, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '101500', 'n_tokens_mistral': 631, 'n_tokens_neox': 613, 'n_words': 178}