Package org.apache.mahout.vectorizer.collocations.llr.Gram

Examples of org.apache.mahout.vectorizer.collocations.llr.Gram.Type


    Configuration conf = new Configuration();
    conf.set(CollocMapper.MAX_SHINGLE_SIZE, "2");
    EasyMock.expect(context.getConfiguration()).andReturn(conf);
   
    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


    conf.set(CollocMapper.MAX_SHINGLE_SIZE, "2");
    conf.setBoolean(CollocDriver.EMIT_UNIGRAMS, true);
    EasyMock.expect(context.getConfiguration()).andReturn(conf);
   
    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

    Configuration conf = new Configuration();
    conf.set(CollocMapper.MAX_SHINGLE_SIZE, "2");
    EasyMock.expect(context.getConfiguration()).andReturn(conf);
   
    for (String[] v : values) {
      Type p = v[0].startsWith("h") ? Gram.Type.HEAD : Gram.Type.TAIL;
      int frequency = 1;
      if ("of times".equals(v[1])) {
        frequency = 2;
      }
     
View Full Code Here

    conf.set(CollocMapper.MAX_SHINGLE_SIZE, "2");
    conf.setBoolean(CollocDriver.EMIT_UNIGRAMS, true);
    EasyMock.expect(context.getConfiguration()).andReturn(conf);
   
    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 ("of times".equals(v[1]) || "of".equals(v[1]) || "times".equals(v[1])
          || "the".equals(v[1])) {
        frequency = 2;
View Full Code Here

    Configuration conf = getConfiguration();
    conf.set(CollocMapper.MAX_SHINGLE_SIZE, "2");
    EasyMock.expect(context.getConfiguration()).andReturn(conf);
   
    for (String[] v : values) {
      Type p = v[0].startsWith("h") ? Gram.Type.HEAD : Gram.Type.TAIL;
      int frequency = 1;
      if ("of times".equals(v[1])) {
        frequency = 2;
      }
     
View Full Code Here

    conf.set(CollocMapper.MAX_SHINGLE_SIZE, "2");
    conf.setBoolean(CollocDriver.EMIT_UNIGRAMS, true);
    EasyMock.expect(context.getConfiguration()).andReturn(conf);
   
    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 ("of times".equals(v[1]) || "of".equals(v[1]) || "times".equals(v[1])
          || "the".equals(v[1])) {
        frequency = 2;
View Full Code Here

    Configuration conf = new Configuration();
    conf.set(CollocMapper.MAX_SHINGLE_SIZE, "2");
    EasyMock.expect(context.getConfiguration()).andReturn(conf);
   
    for (String[] v : values) {
      Type p = v[0].startsWith("h") ? Gram.Type.HEAD : Gram.Type.TAIL;
      int frequency = 1;
      if ("of times".equals(v[1])) {
        frequency = 2;
      }
     
View Full Code Here

    conf.set(CollocMapper.MAX_SHINGLE_SIZE, "2");
    conf.setBoolean(CollocDriver.EMIT_UNIGRAMS, true);
    EasyMock.expect(context.getConfiguration()).andReturn(conf);
   
    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 ("of times".equals(v[1]) || "of".equals(v[1]) || "times".equals(v[1])
          || "the".equals(v[1])) {
        frequency = 2;
View Full Code Here

    Configuration conf = getConfiguration();
    conf.set(CollocMapper.MAX_SHINGLE_SIZE, "2");
    EasyMock.expect(context.getConfiguration()).andReturn(conf);
   
    for (String[] v : values) {
      Type p = v[0].startsWith("h") ? Gram.Type.HEAD : Gram.Type.TAIL;
      int frequency = 1;
      if ("of times".equals(v[1])) {
        frequency = 2;
      }
     
View Full Code Here

    conf.set(CollocMapper.MAX_SHINGLE_SIZE, "2");
    conf.setBoolean(CollocDriver.EMIT_UNIGRAMS, true);
    EasyMock.expect(context.getConfiguration()).andReturn(conf);
   
    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 ("of times".equals(v[1]) || "of".equals(v[1]) || "times".equals(v[1])
          || "the".equals(v[1])) {
        frequency = 2;
View Full Code Here

TOP

Related Classes of org.apache.mahout.vectorizer.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.