[SOLVED] Read .txt file

gunjanamit
gunjanamit New Altair Community Member
edited November 5 in Community Q&A
How can I read .txt file (input.txt) in RapidMiner -> tokenize -> write it in another .txt file (output.txt) ?
Tagged:

Answers

  • Nils_Woehler
    Nils_Woehler New Altair Community Member
    Hi,

    you can use the Read Document and Write Document Operator. Take a look here:


    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.2.007">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="5.2.007" expanded="true" name="Process">
        <process expanded="true" height="206" width="614">
          <operator activated="true" class="text:read_document" compatibility="5.2.003" expanded="true" height="60" name="Read Document" width="90" x="175" y="113"/>
          <operator activated="true" class="text:tokenize" compatibility="5.2.003" expanded="true" height="60" name="Tokenize" width="90" x="335" y="110"/>
          <operator activated="true" class="text:write_document" compatibility="5.2.003" expanded="true" height="76" name="Write Document" width="90" x="514" y="120"/>
          <connect from_op="Read Document" from_port="output" to_op="Tokenize" to_port="document"/>
          <connect from_op="Tokenize" from_port="document" to_op="Write Document" to_port="document"/>
          <connect from_op="Write Document" from_port="document" 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,
    Nils
  • gunjanamit
    gunjanamit New Altair Community Member
    Hey Thanks. It was actually resolved after posting!!!