Package org.fnlp.nlp.pipe.seq

Examples of org.fnlp.nlp.pipe.seq.Sequence2FeatureSequence


    //类别集合
    LabelAlphabet labels = factory.DefaultLabelAlphabet();
    // 特征集合
    IFeatureAlphabet features = factory.DefaultFeatureAlphabet();

    featurePipe = new Sequence2FeatureSequence(templets, features, labels);

    Pipe pipe = new SeriesPipes(new Pipe[] { new Target2Label(labels), featurePipe });

    return pipe;
  }
View Full Code Here


    }

    factory = getClassifier().getAlphabetFactory();
    labels = factory.DefaultLabelAlphabet();
    IFeatureAlphabet features = factory.DefaultFeatureAlphabet();
    featurePipe = new Sequence2FeatureSequence(templets, features,
        labels);
  }
View Full Code Here

   
    setClassifier(tagger.getClassifier());
    factory = getClassifier().getAlphabetFactory();
    labels = factory.DefaultLabelAlphabet();
    IFeatureAlphabet features = factory.DefaultFeatureAlphabet();
    featurePipe = new Sequence2FeatureSequence(templets, features,
        labels);
  }
View Full Code Here

     * 特征字典
     */
    IFeatureAlphabet features = factory.DefaultFeatureAlphabet();
    // 将样本通过Pipe抽取特征
   
    featurePipe = new Sequence2FeatureSequence(templets, features, labels);

    Pipe pipe = new SeriesPipes(new Pipe[] { new Target2Label(labels), featurePipe });


    System.out.print("读入训练数据 ...");
View Full Code Here

    //TODO: 修改字典类型
    AlphabetFactory.defaultFeatureType = Type.String;
    // 将样本通过Pipe抽取特征
    features = factory.DefaultFeatureAlphabet();
    featurePipe = new Sequence2FeatureSequence(templets, features, labels);
    AddCharRange typePip = new AddCharRange();
    Pipe weightPipe = new WeightPipe(true);
    Pipe pipe = new SeriesPipes(new Pipe[] { new Target2Label(labels),  typePip, featurePipe, weightPipe  });
    return pipe;
  }
View Full Code Here

     */
    LabelAlphabet labels = factory.DefaultLabelAlphabet();

    // 将样本通过Pipe抽取特征
    IFeatureAlphabet features = factory.DefaultFeatureAlphabet();
    featurePipe = new Sequence2FeatureSequence(templets, features, labels);

    Pipe pipe = new SeriesPipes(new Pipe[] { new Target2Label(labels), featurePipe });
    return pipe;
  }
View Full Code Here

    IFeatureAlphabet features = null;
    if(cl != null)
      features = factory.DefaultFeatureAlphabet();
    else
      features = factory.rebuildFeatureAlphabet("feature");
    featurePipe = new Sequence2FeatureSequence(templets, features, labels);

    Pipe pipe = new SeriesPipes(new Pipe[] { prePipe,
        new Target2Label(labels), featurePipe });
    return pipe;
  }
View Full Code Here

TOP

Related Classes of org.fnlp.nlp.pipe.seq.Sequence2FeatureSequence

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.