Java 类名:org.alinklab.operator.batch.source.TextContentSourceBatchOp
Python 类名:TextContentSourceBatchOp
Text文本读入
名称 | 中文名称 | 描述 | 类型 | 是否必须? | 取值范围 | 默认值 |
---|---|---|---|---|---|---|
textContent | 文本内容 | 文本内容 | String | ✓ | ||
rowDelimiter | 行分隔符 | 行分隔符 | String | It can’t be empty string. | \n | |
skipBlankLine | 是否忽略空行 | 是否忽略空行 | Boolean | true | ||
textCol | 文本列名称 | 文本列名称 | String | text |
import com.alibaba.alink.common.utils.JsonConverter; import com.alibaba.alink.operator.batch.BatchOperator; import junit.framework.TestCase; public class TextContentSourceBatchOpTest extends TestCase { public void test() { String text = "噢耶~噢耶\n" + "\n" + "对哦 对哦"; BatchOperator<?> op = new TextContentSourceBatchOp() .setTextContent(text) .setTextCol("col") .setSkipBlankLine(false); op.print(); } }
col |
---|
噢耶~噢耶 |
||
|对哦 对哦|