Options

"Filter: Upper case and Lower case"

asn4293asn4293 Member Posts: 24 Contributor I
edited June 2019 in Help

I find it very awkward that we have filter operator and we can only do it by having exact upper and lower case. I don't know but @IngoRM it should have been in the some options of filtering please. Also, if it is not in the software you should have it in, in the next update

Best Answer

  • Options
    MartinLiebigMartinLiebig Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,524 RM Data Scientist
    Solution Accepted

    Hi @asn4293,

    like this?

    Best,

    Martin

    <?xml version="1.0" encoding="UTF-8"?><process version="8.1.001">
    <context>
    <input/>
    <output/>
    <macros/>
    </context>
    <operator activated="true" class="process" compatibility="8.1.001" expanded="true" name="Process">
    <process expanded="true">
    <operator activated="true" class="generate_data_user_specification" compatibility="8.1.001" expanded="true" height="68" name="Generate Data by User Specification" width="90" x="179" y="34">
    <list key="attribute_values">
    <parameter key="word" value="&quot;english&quot;"/>
    </list>
    <list key="set_additional_roles"/>
    </operator>
    <operator activated="true" class="generate_data_user_specification" compatibility="8.1.001" expanded="true" height="68" name="Generate Data by User Specification (2)" width="90" x="179" y="136">
    <list key="attribute_values">
    <parameter key="word" value="&quot;English&quot;"/>
    </list>
    <list key="set_additional_roles"/>
    </operator>
    <operator activated="true" class="generate_data_user_specification" compatibility="8.1.001" expanded="true" height="68" name="Generate Data by User Specification (3)" width="90" x="179" y="238">
    <list key="attribute_values">
    <parameter key="word" value="&quot;French&quot;"/>
    </list>
    <list key="set_additional_roles"/>
    </operator>
    <operator activated="true" class="append" compatibility="8.1.001" expanded="true" height="124" name="Append" width="90" x="313" y="85"/>
    <operator activated="true" class="filter_examples" compatibility="8.1.001" expanded="true" height="103" name="Filter Examples" width="90" x="447" y="85">
    <parameter key="parameter_expression" value="matches(lower(word),&quot;eng.+&quot;)"/>
    <parameter key="condition_class" value="expression"/>
    <list key="filters_list"/>
    <description align="center" color="transparent" colored="false" width="126">Filter for a or A</description>
    </operator>
    <connect from_op="Generate Data by User Specification" from_port="output" to_op="Append" to_port="example set 1"/>
    <connect from_op="Generate Data by User Specification (2)" from_port="output" to_op="Append" to_port="example set 2"/>
    <connect from_op="Generate Data by User Specification (3)" from_port="output" to_op="Append" to_port="example set 3"/>
    <connect from_op="Append" from_port="merged set" to_op="Filter Examples" to_port="example set input"/>
    <connect from_op="Filter Examples" from_port="example set output" to_port="result 1"/>
    <portSpacing port="source_input 1" spacing="0"/>
    <portSpacing port="sink_result 1" spacing="0"/>
    <portSpacing port="sink_result 2" spacing="0"/>
    </process>
    </operator>
    </process>
    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany

Answers

  • Options
    sgenzersgenzer Administrator, Moderator, Employee, RapidMiner Certified Analyst, Community Manager, Member, University Professor, PM Moderator Posts: 2,959 Community Manager

    hello @asn4293 so the Filter Examples operator does distinguish between lower and upper case on purpose. Lots of good reasons for it but it's an interesting suggestion to have a checkbox saying "ignore cases". Feel free to put it in our Product Ideas section. :)

     

    Meanwhile if you want to use Filter Examples irrespective of case, I'd suggest using a RegEx expression or converting your text to one case using the Transform Cases operator (Text Processing extension).

     

    Scott

     

  • Options
    MartinLiebigMartinLiebig Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,524 RM Data Scientist

    Hi @asn4293,

    Filter Examples can filter independently of the case. you can just choose expression and write something like:

    lower(attribute) != "myvalue"

    Best,

    Martin

    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany
  • Options
    asn4293asn4293 Member Posts: 24 Contributor I

    Hi @mschmitz,
    Can you please explain in detail. or XML code could work.

    Thank you and have a nice day.

    Regards

    Ahsan Shahid

  • Options
    MartinLiebigMartinLiebig Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,524 RM Data Scientist

    Hi @asn4293,

    sure! Attached is an example.

     

    Best,

    Martin

     

    <?xml version="1.0" encoding="UTF-8"?><process version="8.1.001">
    <context>
    <input/>
    <output/>
    <macros/>
    </context>
    <operator activated="true" class="process" compatibility="8.1.001" expanded="true" name="Process">
    <process expanded="true">
    <operator activated="true" class="generate_data_user_specification" compatibility="8.1.001" expanded="true" height="68" name="Generate Data by User Specification" width="90" x="179" y="34">
    <list key="attribute_values">
    <parameter key="word" value="&quot;a&quot;"/>
    </list>
    <list key="set_additional_roles"/>
    </operator>
    <operator activated="true" class="generate_data_user_specification" compatibility="8.1.001" expanded="true" height="68" name="Generate Data by User Specification (2)" width="90" x="179" y="136">
    <list key="attribute_values">
    <parameter key="word" value="&quot;A&quot;"/>
    </list>
    <list key="set_additional_roles"/>
    </operator>
    <operator activated="true" class="generate_data_user_specification" compatibility="8.1.001" expanded="true" height="68" name="Generate Data by User Specification (3)" width="90" x="179" y="238">
    <list key="attribute_values">
    <parameter key="word" value="&quot;b&quot;"/>
    </list>
    <list key="set_additional_roles"/>
    </operator>
    <operator activated="true" breakpoints="after" class="append" compatibility="8.1.001" expanded="true" height="124" name="Append" width="90" x="313" y="85"/>
    <operator activated="true" class="filter_examples" compatibility="8.1.001" expanded="true" height="103" name="Filter Examples" width="90" x="447" y="85">
    <parameter key="parameter_expression" value="lower(word) == &quot;a&quot;"/>
    <parameter key="condition_class" value="expression"/>
    <list key="filters_list"/>
    <description align="center" color="transparent" colored="false" width="126">Filter for a or A</description>
    </operator>
    <connect from_op="Generate Data by User Specification" from_port="output" to_op="Append" to_port="example set 1"/>
    <connect from_op="Generate Data by User Specification (2)" from_port="output" to_op="Append" to_port="example set 2"/>
    <connect from_op="Generate Data by User Specification (3)" from_port="output" to_op="Append" to_port="example set 3"/>
    <connect from_op="Append" from_port="merged set" to_op="Filter Examples" to_port="example set input"/>
    <connect from_op="Filter Examples" from_port="example set output" to_port="result 1"/>
    <portSpacing port="source_input 1" spacing="0"/>
    <portSpacing port="sink_result 1" spacing="0"/>
    <portSpacing port="sink_result 2" spacing="0"/>
    </process>
    </operator>
    </process>
    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany
  • Options
    asn4293asn4293 Member Posts: 24 Contributor I

    Hi @mschmitz

    I found it useful but not fully. Can we filter like contains for example my data is 'English, english, French but I want to check if it contains eng it should filter out both English and english. 

    <?xml version="1.0" encoding="UTF-8"?><process version="8.0.001">
    <context>
    <input/>
    <output/>
    <macros/>
    </context>
    <operator activated="true" class="process" compatibility="8.0.001" expanded="true" name="Process">
    <process expanded="true">
    <operator activated="true" class="generate_data_user_specification" compatibility="8.0.001" expanded="true" height="68" name="Generate Data by User Specification" width="90" x="179" y="34">
    <list key="attribute_values">
    <parameter key="word" value="&quot;English&quot;"/>
    </list>
    <list key="set_additional_roles"/>
    </operator>
    <operator activated="true" class="generate_data_user_specification" compatibility="8.0.001" expanded="true" height="68" name="Generate Data by User Specification (2)" width="90" x="179" y="136">
    <list key="attribute_values">
    <parameter key="word" value="&quot;english&quot;"/>
    </list>
    <list key="set_additional_roles"/>
    </operator>
    <operator activated="true" class="generate_data_user_specification" compatibility="8.0.001" expanded="true" height="68" name="Generate Data by User Specification (3)" width="90" x="179" y="238">
    <list key="attribute_values">
    <parameter key="word" value="&quot;French&quot;"/>
    </list>
    <list key="set_additional_roles"/>
    </operator>
    <operator activated="true" class="append" compatibility="8.0.001" expanded="true" height="124" name="Append" width="90" x="313" y="85"/>
    <operator activated="true" class="filter_examples" compatibility="8.0.001" expanded="true" height="103" name="Filter Examples" width="90" x="447" y="85">
    <parameter key="parameter_expression" value="lower(word) == &quot;eng&quot;"/>
    <parameter key="condition_class" value="expression"/>
    <list key="filters_list"/>
    <description align="center" color="transparent" colored="false" width="126">Filter for a or A</description>
    </operator>
    <connect from_op="Generate Data by User Specification" from_port="output" to_op="Append" to_port="example set 1"/>
    <connect from_op="Generate Data by User Specification (2)" from_port="output" to_op="Append" to_port="example set 2"/>
    <connect from_op="Generate Data by User Specification (3)" from_port="output" to_op="Append" to_port="example set 3"/>
    <connect from_op="Append" from_port="merged set" to_op="Filter Examples" to_port="example set input"/>
    <connect from_op="Filter Examples" from_port="example set output" to_port="result 1"/>
    <portSpacing port="source_input 1" spacing="0"/>
    <portSpacing port="sink_result 1" spacing="0"/>
    <portSpacing port="sink_result 2" spacing="0"/>
    </process>
    </operator>
    </process>


    Best regards
    Ahsan Shahid 

  • Options
    asn4293asn4293 Member Posts: 24 Contributor I

    Dear@mschmitz,

     

    Thank you so very much for support this would do the work. but it would be wonderful if this data set can also filter in between text for example "English" filter "glis" and we find it as english.

    <?xml version="1.0" encoding="UTF-8"?><process version="8.0.001">
    <context>
    <input/>
    <output/>
    <macros/>
    </context>
    <operator activated="true" class="process" compatibility="8.0.001" expanded="true" name="Process">
    <process expanded="true">
    <operator activated="true" class="generate_data_user_specification" compatibility="8.0.001" expanded="true" height="68" name="Generate Data by User Specification" width="90" x="179" y="34">
    <list key="attribute_values">
    <parameter key="word" value="&quot;english&quot;"/>
    </list>
    <list key="set_additional_roles"/>
    </operator>
    <operator activated="true" class="generate_data_user_specification" compatibility="8.0.001" expanded="true" height="68" name="Generate Data by User Specification (2)" width="90" x="179" y="136">
    <list key="attribute_values">
    <parameter key="word" value="&quot;English&quot;"/>
    </list>
    <list key="set_additional_roles"/>
    </operator>
    <operator activated="true" class="generate_data_user_specification" compatibility="8.0.001" expanded="true" height="68" name="Generate Data by User Specification (3)" width="90" x="179" y="238">
    <list key="attribute_values">
    <parameter key="word" value="&quot;French&quot;"/>
    </list>
    <list key="set_additional_roles"/>
    </operator>
    <operator activated="true" class="append" compatibility="8.0.001" expanded="true" height="124" name="Append" width="90" x="313" y="85"/>
    <operator activated="true" class="filter_examples" compatibility="8.0.001" expanded="true" height="103" name="Filter Examples" width="90" x="447" y="85">
    <parameter key="parameter_expression" value="matches(lower(word),&quot;glis.+&quot;)"/>
    <parameter key="condition_class" value="expression"/>
    <list key="filters_list"/>
    <description align="center" color="transparent" colored="false" width="126">Filter for a or A</description>
    </operator>
    <connect from_op="Generate Data by User Specification" from_port="output" to_op="Append" to_port="example set 1"/>
    <connect from_op="Generate Data by User Specification (2)" from_port="output" to_op="Append" to_port="example set 2"/>
    <connect from_op="Generate Data by User Specification (3)" from_port="output" to_op="Append" to_port="example set 3"/>
    <connect from_op="Append" from_port="merged set" to_op="Filter Examples" to_port="example set input"/>
    <connect from_op="Filter Examples" from_port="example set output" to_port="result 1"/>
    <portSpacing port="source_input 1" spacing="0"/>
    <portSpacing port="sink_result 1" spacing="0"/>
    <portSpacing port="sink_result 2" spacing="0"/>
    </process>
    </operator>
    </process>

      

  • Options
    MartinLiebigMartinLiebig Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,524 RM Data Scientist

    Hi,

     

    sure. you would just use

     

    .+glis.+

     

    as a regular expression.

     

    Cheers

    Martin

    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany
Sign In or Register to comment.