Package com.jgaap.util

Examples of com.jgaap.util.EventBagging


  @Override
  public void train(List<Document> knownDocuments) throws AnalyzeException {
    Map<String, EventBagging> authorBags = new HashMap<String, EventBagging>();
    for(Document knownDocument : knownDocuments){
      for (EventSet eventSet : knownDocument.getEventSets().values()) {
        EventBagging eventBag = authorBags.get(knownDocument.getAuthor());
        if (eventBag == null) {
          eventBag = new EventBagging(eventSet);
          authorBags.put(knownDocument.getAuthor(), eventBag);
        } else {
          eventBag.addAll(eventSet);
        }
      }
    }
    int samples = getParameter("samples", 5);
    int sampleSize = getParameter("sampleSize", 500);
View Full Code Here

TOP

Related Classes of com.jgaap.util.EventBagging

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.