Package syntaxLearner.corpus

Examples of syntaxLearner.corpus.Word


      Set<ClusterContext> clusterContexts = learner.getClusterContexts();

      /* Sum every context in every word */

      for (int i : words){
        Word w = vocab.getWord(i);
        double weight =  (1.0*w.frequency)/(totalSize*wordCount);
        for (ClusterContext cc : clusterContexts){
          distribution[cc.type1 + 1][cc.type2 + 1]+= (w.clusterDistribution(cc)*weight);
        }
        learner.registerClusterUpdate(this);
      }
      return distribution;
    }
View Full Code Here


  /* Adds, counts the values and sets parenthood */
  public void add(int i){
    words.add(i);
    wordCount++;
    Word w = vocab.getWord(i);
    totalSize+=w.frequency;
    w.setParent(this);
  }
View Full Code Here

TOP

Related Classes of syntaxLearner.corpus.Word

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.