I'm having a problem in running my process in a Java Application

ajrisalvadorajrisalvador Member Posts: 7 Contributor I
Hi I'm having errors/warnings with my Java app. Any help would be appreciated.

Here is my code in Netbeans:
RepositoryLocation pLoc = new RepositoryLocation(process);
ProcessEntry pEntry = (ProcessEntry) pLoc.locateEntry();
String processXML = pEntry.retrieveXML();
com.rapidminer.Process myProcess = new com.rapidminer.Process(processXML);
myProcess.setProcessLocation(new RepositoryProcessLocation(pLoc));

Operator myOperator = myProcess.getOperator("Read Excel - New Data");
RepositoryLocation loc = new RepositoryLocation(upload);
IOObjectEntry entry = (IOObjectEntry) loc.locateEntry();
IOObject myIOObject;
myIOObject= entry.retrieveData(null);
myOperator.setParameter(RepositorySource.PARAMETER_REPOSITORY_ENTRY, upload);

IOContainer ioInput = new IOContainer(new IOObject[] {myIOObject});
IOContainer ioResult = myProcess.run(ioInput);

if (ioResult.getElementAt(0) instanceof IOObject) {
ExampleSet resultSet = (ExampleSet)ioResult.getElementAt(0);
jLabelStatus.setText(resultSet.toString());
Here is the XML of my process in RapidMiner:
<?xml version="1.0" encoding="UTF-8"?><process version="9.2.001">
  <context>
    <input/>
    <output/>
    <macros/>
  </context>
  <operator activated="true" class="process" compatibility="9.2.001" expanded="true" name="Process">
    <parameter key="logverbosity" value="init"/>
    <parameter key="random_seed" value="2001"/>
    <parameter key="send_mail" value="never"/>
    <parameter key="notification_email" value=""/>
    <parameter key="process_duration_for_mail" value="30"/>
    <parameter key="encoding" value="SYSTEM"/>
    <process expanded="true">
      <operator activated="true" class="retrieve" compatibility="9.2.001" expanded="true" height="68" name="Retrieve WordList from Trained Model" width="90" x="179" y="34">
        <parameter key="repository_entry" value="//Local Repository/Thesis/WL"/>
      </operator>
      <operator activated="true" class="read_excel" compatibility="9.2.001" expanded="true" height="68" name="Read Excel - New Data" width="90" x="45" y="136">
        <parameter key="excel_file" value="E:\Documents\Thesis\Data\Proto.xlsx"/>
        <parameter key="sheet_selection" value="sheet number"/>
        <parameter key="sheet_number" value="1"/>
        <parameter key="imported_cell_range" value="A1"/>
        <parameter key="encoding" value="SYSTEM"/>
        <parameter key="first_row_as_names" value="true"/>
        <list key="annotations"/>
        <parameter key="date_format" value=""/>
        <parameter key="time_zone" value="SYSTEM"/>
        <parameter key="locale" value="English (United States)"/>
        <parameter key="read_all_values_as_polynominal" value="false"/>
        <list key="data_set_meta_data_information">
          <parameter key="0" value="Tweet.true.text.attribute"/>
          <parameter key="1" value="Polarity.true.text.label"/>
        </list>
        <parameter key="read_not_matching_values_as_missings" value="false"/>
        <parameter key="datamanagement" value="double_array"/>
        <parameter key="data_management" value="auto"/>
      </operator>
      <operator activated="true" class="set_role" compatibility="9.2.001" expanded="true" height="82" name="Set Role" width="90" x="179" y="187">
        <parameter key="attribute_name" value="Polarity"/>
        <parameter key="target_role" value="label"/>
        <list key="set_additional_roles"/>
      </operator>
      <operator activated="true" class="text:data_to_documents" compatibility="8.1.000" expanded="true" height="68" name="Data to Documents" width="90" x="313" y="187">
        <parameter key="select_attributes_and_weights" value="false"/>
        <list key="specify_weights"/>
      </operator>
      <operator activated="true" class="text:process_documents" compatibility="8.1.000" expanded="true" height="103" name="Process Documents" width="90" x="447" y="136">
        <parameter key="create_word_vector" value="true"/>
        <parameter key="vector_creation" value="TF-IDF"/>
        <parameter key="add_meta_information" value="true"/>
        <parameter key="keep_text" value="false"/>
        <parameter key="prune_method" value="none"/>
        <parameter key="prune_below_percent" value="3.0"/>
        <parameter key="prune_above_percent" value="30.0"/>
        <parameter key="prune_below_rank" value="0.05"/>
        <parameter key="prune_above_rank" value="0.95"/>
        <parameter key="datamanagement" value="double_sparse_array"/>
        <parameter key="data_management" value="auto"/>
        <process expanded="true">
          <operator activated="true" class="text:replace_tokens" compatibility="8.1.000" expanded="true" height="68" name="Replace Tokens" width="90" x="45" y="34">
            <list key="replace_dictionary">
              <parameter key="@[0-9a-zA-Z]*" value=" "/>
              <parameter key="#[0-9a-zA-Z]*" value=" "/>
              <parameter key="(https?|http)://[-a-zA-Z0-9+&amp;@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&amp;@#/%=~_|]" value=" "/>
              <parameter key="[:=][-)]*[)D]" value="posi "/>
              <parameter key="[:;=][-(]*[(]" value="nega "/>
            </list>
          </operator>
          <operator activated="true" class="text:transform_cases" compatibility="8.1.000" expanded="true" height="68" name="Transform Cases" width="90" x="112" y="136">
            <parameter key="transform_to" value="lower case"/>
          </operator>
          <operator activated="true" class="text:tokenize" compatibility="8.1.000" expanded="true" height="68" name="Tokenize" width="90" x="246" y="136">
            <parameter key="mode" value="non letters"/>
            <parameter key="characters" value=".:"/>
            <parameter key="language" value="English"/>
            <parameter key="max_token_length" value="3"/>
          </operator>
          <operator activated="true" class="text:filter_stopwords_dictionary" compatibility="8.1.000" expanded="true" height="82" name="Filter Stopwords (Dictionary)" width="90" x="313" y="34">
            <parameter key="file" value="E:\Documents\Thesis\Data\puurula.txt"/>
            <parameter key="case_sensitive" value="false"/>
            <parameter key="encoding" value="SYSTEM"/>
          </operator>
          <operator activated="true" class="text:stem_porter" compatibility="8.1.000" expanded="true" height="68" name="Stem (Porter)" width="90" x="447" y="34"/>
          <operator activated="true" class="text:generate_n_grams_terms" compatibility="8.1.000" expanded="true" height="68" name="Generate n-Grams (Terms)" width="90" x="514" y="136">
            <parameter key="max_length" value="2"/>
          </operator>
          <connect from_port="document" to_op="Replace Tokens" to_port="document"/>
          <connect from_op="Replace Tokens" from_port="document" to_op="Transform Cases" to_port="document"/>
          <connect from_op="Transform Cases" from_port="document" to_op="Tokenize" to_port="document"/>
          <connect from_op="Tokenize" from_port="document" to_op="Filter Stopwords (Dictionary)" to_port="document"/>
          <connect from_op="Filter Stopwords (Dictionary)" from_port="document" to_op="Stem (Porter)" to_port="document"/>
          <connect from_op="Stem (Porter)" from_port="document" to_op="Generate n-Grams (Terms)" to_port="document"/>
          <connect from_op="Generate n-Grams (Terms)" from_port="document" to_port="document 1"/>
          <portSpacing port="source_document" spacing="0"/>
          <portSpacing port="sink_document 1" spacing="0"/>
          <portSpacing port="sink_document 2" spacing="0"/>
        </process>
      </operator>
      <operator activated="true" class="store" compatibility="9.2.001" expanded="true" height="68" name="Store" width="90" x="648" y="85">
        <parameter key="repository_entry" value="../Data (ExampleSet)/Proto"/>
      </operator>
      <connect from_port="input 1" to_op="Read Excel - New Data" to_port="file"/>
      <connect from_op="Retrieve WordList from Trained Model" from_port="output" to_op="Process Documents" to_port="word list"/>
      <connect from_op="Read Excel - New Data" from_port="output" to_op="Set Role" to_port="example set input"/>
      <connect from_op="Set Role" from_port="example set output" to_op="Data to Documents" to_port="example set"/>
      <connect from_op="Data to Documents" from_port="documents" to_op="Process Documents" to_port="documents 1"/>
      <connect from_op="Process Documents" from_port="example set" to_op="Store" to_port="input"/>
      <connect from_op="Store" from_port="through" to_port="result 1"/>
      <portSpacing port="source_input 1" spacing="0"/>
      <portSpacing port="source_input 2" spacing="0"/>
      <portSpacing port="sink_result 1" spacing="0"/>
      <portSpacing port="sink_result 2" spacing="0"/>
    </process>
  </operator>
</process>
Here is the error/warnings I got:
May 25, 2019 11:55:58 AM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'create_word_vector' is unknown for operator 'Process Documents' (" dummy ")."
May 25, 2019 11:55:58 AM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'vector_creation' is unknown for operator 'Process Documents' (" dummy ")."
May 25, 2019 11:55:58 AM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'add_meta_information' is unknown for operator 'Process Documents' (" dummy ")."
May 25, 2019 11:55:58 AM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'keep_text' is unknown for operator 'Process Documents' (" dummy ")."
May 25, 2019 11:55:58 AM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'prune_method' is unknown for operator 'Process Documents' (" dummy ")."
May 25, 2019 11:55:58 AM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'prune_below_percent' is unknown for operator 'Process Documents' (" dummy ")."
May 25, 2019 11:55:58 AM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'prune_above_percent' is unknown for operator 'Process Documents' (" dummy ")."
May 25, 2019 11:55:58 AM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'prune_below_rank' is unknown for operator 'Process Documents' (" dummy ")."
May 25, 2019 11:55:58 AM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'prune_above_rank' is unknown for operator 'Process Documents' (" dummy ")."
May 25, 2019 11:55:58 AM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'datamanagement' is unknown for operator 'Process Documents' (" dummy ")."
May 25, 2019 11:55:58 AM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'data_management' is unknown for operator 'Process Documents' (" dummy ")."
May 25, 2019 11:55:58 AM com.rapidminer.io.process.XMLImporter addMessage
INFO: <em class="error">Operator '<class>dummy</class>' may not have children. Ignoring.
May 25, 2019 11:55:58 AM com.rapidminer.io.process.XMLImporter addMessage
INFO: <em class="error">The input port <var>word list</var> is unknown at operator <var>Process Documents</var>.</em>
May 25, 2019 11:55:58 AM com.rapidminer.io.process.XMLImporter addMessage
INFO: <em class="error">The input port <var>example set</var> is unknown at operator <var>Data to Documents</var>.</em>
May 25, 2019 11:55:58 AM com.rapidminer.io.process.XMLImporter addMessage
INFO: <em class="error">The output port <var>documents</var> is unknown at operator <var>Data to Documents</var>.</em>
May 25, 2019 11:55:58 AM com.rapidminer.io.process.XMLImporter addMessage
INFO: <em class="error">The output port <var>example set</var> is unknown at operator <var>Process Documents</var>.</em>
Tagged:

Best Answer

Sign In or Register to comment.