2016-10-22 11 views
0

ASCII文字列の形式の属性を持つデータセットがあります。文字の意味は「L2A」、「L」、「2」、「A」ですそれぞれ異なるものを表しています)。RapidMiner:属性をバイトに分割する

この文字列を構成文字に分割するにはどうすればよいですか?私は「スプリット」について知っていますが、デリミタがないときにどのように使用するのか分かりません。

答えて

0

ソース属性の長さが常に同じ場合は、Generate Attributes演算子を使用して文字列を分割することができます。

例を示します。

<?xml version="1.0" encoding="UTF-8"?><process version="7.2.003"> 
    <context> 
    <input/> 
    <output/> 
    <macros/> 
    </context> 
    <operator activated="true" class="process" compatibility="7.2.003" expanded="true" name="Process"> 
    <process expanded="true"> 
     <operator activated="true" class="generate_data_user_specification" compatibility="7.2.003" expanded="true" height="68" name="Generate Data by User Specification" width="90" x="179" y="85"> 
    <list key="attribute_values"> 
     <parameter key="s1" value="&quot;ABC&quot;"/> 
    </list> 
    <list key="set_additional_roles"/> 
     </operator> 
     <operator activated="true" class="generate_data_user_specification" compatibility="7.2.003" expanded="true" height="68" name="Generate Data by User Specification (2)" width="90" x="179" y="187"> 
    <list key="attribute_values"> 
     <parameter key="s1" value="&quot;DEF&quot;"/> 
    </list> 
    <list key="set_additional_roles"/> 
     </operator> 
     <operator activated="true" class="append" compatibility="7.2.003" expanded="true" height="103" name="Append" width="90" x="380" y="85"/> 
     <operator activated="true" class="generate_attributes" compatibility="7.2.003" expanded="true" height="82" name="Generate Attributes" width="90" x="514" y="85"> 
    <list key="function_descriptions"> 
     <parameter key="att1" value="cut(s1, 0, 1)"/> 
     <parameter key="att2" value="cut(s1, 1, 1)"/> 
     <parameter key="att3" value="cut(s1,2,1)"/> 
    </list> 
     </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="Append" from_port="merged set" to_op="Generate Attributes" to_port="example set input"/> 
     <connect from_op="Generate Attributes" 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> 

長さが変化する場合、それは難しい問題

関連する問題