<commit_before>/**
 * (c) 2014 StreamSets, Inc. All rights reserved. May not
 * be copied, modified, or distributed in whole or part without
 * written consent of StreamSets, Inc.
 */
package com.streamsets.pipeline.lib.stage.processor.expression;

import com.streamsets.pipeline.api.ComplexField;
import com.streamsets.pipeline.api.ConfigDef;
import com.streamsets.pipeline.api.ConfigGroups;
import com.streamsets.pipeline.api.Field;
import com.streamsets.pipeline.api.GenerateResourceBundle;
import com.streamsets.pipeline.api.Label;
import com.streamsets.pipeline.api.Record;
import com.streamsets.pipeline.api.StageDef;
import com.streamsets.pipeline.api.StageException;
import com.streamsets.pipeline.api.base.SingleLaneRecordProcessor;
import com.streamsets.pipeline.el.ELBasicSupport;
import com.streamsets.pipeline.el.ELEvaluator;
import com.streamsets.pipeline.el.ELRecordSupport;
import com.streamsets.pipeline.el.ELStringSupport;
import com.streamsets.pipeline.el.ELUtils;
import com.streamsets.pipeline.lib.util.StageLibError;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.servlet.jsp.el.ELException;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;

@GenerateResourceBundle
@StageDef(
    version="1.0.0",
    label="Expression Processor",
    description="???",
    icon="expression.png"
)
@ConfigGroups(ExpressionProcessor.Groups.class)
public class ExpressionProcessor extends SingleLaneRecordProcessor {
  private static final Logger LOG = LoggerFactory.getLogger(ExpressionProcessor.class);

  public enum Groups implements Label {
    EXPRESSIONS;

    @Override
    public String getLabel() {
      return "Expressions";
    }

  }

  public static class ExpressionProcessorConfig {

    @ConfigDef(
        required = true,
        type = ConfigDef.Type.STRING,
        defaultValue = "",
        label = "Field",
        description = "Use an existing field or enter a new field name. " +
                      "Using an existing field replaces the current value with the new value.",
        displayPosition = 10
    )<commit_msg>Chaging expression processor label to expression evaluator<commit_after>/**
 * (c) 2014 StreamSets, Inc. All rights reserved. May not
 * be copied, modified, or distributed in whole or part without
 * written consent of StreamSets, Inc.
 */
package com.streamsets.pipeline.lib.stage.processor.expression;

import com.streamsets.pipeline.api.ComplexField;
import com.streamsets.pipeline.api.ConfigDef;
import com.streamsets.pipeline.api.ConfigGroups;
import com.streamsets.pipeline.api.Field;
import com.streamsets.pipeline.api.GenerateResourceBundle;
import com.streamsets.pipeline.api.Label;
import com.streamsets.pipeline.api.Record;
import com.streamsets.pipeline.api.StageDef;
import com.streamsets.pipeline.api.StageException;
import com.streamsets.pipeline.api.base.SingleLaneRecordProcessor;
import com.streamsets.pipeline.el.ELBasicSupport;
import com.streamsets.pipeline.el.ELEvaluator;
import com.streamsets.pipeline.el.ELRecordSupport;
import com.streamsets.pipeline.el.ELStringSupport;
import com.streamsets.pipeline.el.ELUtils;
import com.streamsets.pipeline.lib.util.StageLibError;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.servlet.jsp.el.ELException;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;

@GenerateResourceBundle
@StageDef(
    version="1.0.0",
    label="Expression Evaluator",
    description="???",
    icon="expression.png"
)
@ConfigGroups(ExpressionProcessor.Groups.class)
public class ExpressionProcessor extends SingleLaneRecordProcessor {
  private static final Logger LOG = LoggerFactory.getLogger(ExpressionProcessor.class);

  public enum Groups implements Label {
    EXPRESSIONS;

    @Override
    public String getLabel() {
      return "Expressions";
    }

  }

  public static class ExpressionProcessorConfig {

    @ConfigDef(
        required = true,
        type = ConfigDef.Type.STRING,
        defaultValue = "",
        label = "Field",
        description = "Use an existing field or enter a new field name. " +
                      "Using an existing field replaces the current value with the new value.",
        displayPosition = 10
    )
{'fraction_non_alphanumeric': 0.09721262381939645, 'fraction_numerical': 0.00506795669200645, 'mean_word_length': 4.301587301587301, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6445658', 'n_tokens_mistral': 1240, 'n_tokens_neox': 1238, 'n_words': 292}