code: function Corpus(data, typeOfCorpus, SentenceClass) {
    this.wordCount = 0;
    this.sentences = [];
    if (data) {
      // For other types of corpora add a case here and supply a parsing method
      switch (typeOfCorpus) {
        case BROWN:
          this.parseBrownCorpus(data, SentenceClass);
          break;
        case JSON:
          // Assume it is a JSON object of a corpus
          var that = this;
          data.sentences.forEach(function(s) {
            var taggedSentence = new SentenceClass(s.taggedWords);
            that.sentences.push(taggedSentence);
            that.wordCount += s.taggedWords.length;
          });
          break;
      }
    }
  }
docs: sentences: an array of annotated sentences A sentence is an array of annotated tokens A token is an object with (token, tag, testTag, ruleList)