Search in sources :

Example 1 with DocCountVectorizerPredictStreamOp

use of com.alibaba.alink.operator.stream.nlp.DocCountVectorizerPredictStreamOp in project Alink by alibaba.

the class DocCountVectorizerTest method testInitializer.

@Test
public void testInitializer() {
    DocCountVectorizerModel model = new DocCountVectorizerModel();
    Assert.assertEquals(model.getParams().size(), 0);
    DocCountVectorizer op = new DocCountVectorizer(new Params());
    Assert.assertEquals(op.getParams().size(), 0);
    BatchOperator<?> b = new DocCountVectorizerTrainBatchOp();
    Assert.assertEquals(b.getParams().size(), 0);
    b = new DocCountVectorizerTrainBatchOp(new Params());
    Assert.assertEquals(b.getParams().size(), 0);
    b = new DocCountVectorizerPredictBatchOp();
    Assert.assertEquals(b.getParams().size(), 0);
    b = new DocCountVectorizerPredictBatchOp(new Params());
    Assert.assertEquals(b.getParams().size(), 0);
    StreamOperator<?> s = new DocCountVectorizerPredictStreamOp(b);
    Assert.assertEquals(s.getParams().size(), 0);
    s = new DocCountVectorizerPredictStreamOp(b, new Params());
    Assert.assertEquals(s.getParams().size(), 0);
}
Also used : DocCountVectorizerPredictBatchOp(com.alibaba.alink.operator.batch.nlp.DocCountVectorizerPredictBatchOp) Params(org.apache.flink.ml.api.misc.param.Params) DocCountVectorizerTrainBatchOp(com.alibaba.alink.operator.batch.nlp.DocCountVectorizerTrainBatchOp) DocCountVectorizerPredictStreamOp(com.alibaba.alink.operator.stream.nlp.DocCountVectorizerPredictStreamOp) Test(org.junit.Test)

Aggregations

DocCountVectorizerPredictBatchOp (com.alibaba.alink.operator.batch.nlp.DocCountVectorizerPredictBatchOp)1 DocCountVectorizerTrainBatchOp (com.alibaba.alink.operator.batch.nlp.DocCountVectorizerTrainBatchOp)1 DocCountVectorizerPredictStreamOp (com.alibaba.alink.operator.stream.nlp.DocCountVectorizerPredictStreamOp)1 Params (org.apache.flink.ml.api.misc.param.Params)1 Test (org.junit.Test)1