Package org.apache.mahout.utils.nlp.collocations.llr.Gram

Examples of org.apache.mahout.utils.nlp.collocations.llr.Gram.Type


                          {"t_the", "times the"},
                          {"h_worst", "worst of"},
                          {"t_of", "worst of"},};
    // set up expectations for mocks. ngram max size = 2
    for (String[] v : values) {
      Type p = v[0].startsWith("h") ? Gram.Type.HEAD : Gram.Type.TAIL;
      int frequency = 1;
      if (v[1].equals("of times")) {
        frequency = 2;
      }
     
View Full Code Here


                                         {"u_the", "the"}, {"u_best", "best"},
                                         {"u_times", "times"},};

    // set up expectations for mocks. ngram max size = 2
    for (String[] v : values) {
      Type p = v[0].startsWith("h") ? Gram.Type.HEAD : Gram.Type.TAIL;
      p = v[0].startsWith("u") ? Gram.Type.UNIGRAM : p;
      int frequency = 1;
      if (v[1].equals("of times") || v[1].equals("of") || v[1].equals("times")
          || v[1].equals("the")) {
        frequency = 2;
View Full Code Here

TOP

Related Classes of org.apache.mahout.utils.nlp.collocations.llr.Gram.Type

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.