docs: public DataSet getDataSet()
      {
          if(!noMoreAdding)
          {
              initialLoad();
              finishAdding();
          }
          
          List<DataPoint> dataPoints= new ArrayList<DataPoint>(vectors.size());
          
          for(SparseVector vec : vectors)
              dataPoints.add(new DataPoint(vec, new int[0], new CategoricalData[0]));
          
          return new SimpleDataSet(dataPoints);
      }
      
      /**
       * To be called after all original texts have been loaded. 
       * 
       * @param text the text of the document to create a document vector from
       * @return the sparce vector representing this document 
       */
      @Override
      public Vec newText(String text)
      {
          if(!noMoreAdding)
              throw new RuntimeException("Initial documents have not yet loaded");
          return getTextVectorCreator().newText(text);
      }
  
      @Override
      public Vec newText(String input, StringBuilder workSpace, List<String> storageSpace)
      {
          if(!noMoreAdding)
              throw new RuntimeException("Initial documents have not yet loaded");
          return getTextVectorCreator().newText(input, workSpace, storageSpace);
      }
      
      /**
       * Returns the {@link TextVectorCreator} used by this data loader to convert
       * documents into vectors. 
       * 
       * @return the text vector creator used by this class
       */
      public TextVectorCreator getTextVectorCreator()
      {
          if(!noMoreAdding)
              throw new RuntimeException("Initial documents have not yet loaded");
          else if(tvc == null)
              tvc = new BasicTextVectorCreator(tokenizer, wordIndex, weighting);
          return tvc;
      }
      
      /**
       * Returns the original token for the given index in the data set
       * @param index the numeric feature index
       * @return the word token associated with the index
       */
      public String getWordForIndex(int index)
      {
          //lazy population of allWords array
          if(allWords.size() != wordIndex.size())//we added since this was done
          {
              while(allWords.size() < wordIndex.size())
                  allWords.add("");
              for(Map.Entry<String, Integer> entry : wordIndex.entrySet())
                  allWords.set(entry.getValue(), entry.getKey());
          }
          if(index >= 0 && index < allWords.size())
              return allWords.get(index);
          else
              return null;
      }
      
      /**
       * Return the number of times a token has been seen in the document
       * @param index the numeric feature index 
       * @return the total occurrence count for the feature
       */
      public int getTermFrequency(int index)
      {
          return termDocumentFrequencys.get(index).get();
      }
      
      /**
       * Creates a new transform factory to remove all features for tokens that 
       * did not occur a certain number of times
       * @param minCount the minimum number of occurrences to be kept as a feature
       * @return a transform factory for removing features that did not occur 
       * often enough
       */
      @SuppressWarnings("unchecked")
      public RemoveAttributeTransform getMinimumOccurrenceDTF(int minCount)
      {
          
          final Set<Integer> numericToRemove = new IntSet();
          for(int i = 0; i < termDocumentFrequencys.size(); i++)
              if(termDocumentFrequencys.get(i).get() < minCount)
                  numericToRemove.add(i);
          
          return new RemoveAttributeTransform(Collections.EMPTY_SET, numericToRemove);
      }
  }