The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
"Text Processing plugin in Java App"
I made a Java application that classifies the data inside an excel file. Here's a snippet of the code.
RapidMiner.setExecutionMode(RapidMiner.ExecutionMode.COMMAND_LINE);
ProcessEntry pEntry = null;
RepositoryManager.getInstance(null).addRepository(new LocalRepository("RMThesis", new File("Resources/TrendClass(70%)")));
if(cbAlgo.getSelectedItem() == "k-NN"){
RepositoryLocation location = new RepositoryLocation("//RMThesis/Apply Model (Oct Data)");
pEntry = (ProcessEntry) location.locateEntry();
RapidMiner.init();
JOptionPane.showMessageDialog(null, "Location set", "Message", JOptionPane.INFORMATION_MESSAGE);
}
else if(cbAlgo.getSelectedItem() == "SVM"){
RepositoryLocation location = new RepositoryLocation("//RMThesis/Apply Model (SVM)");
pEntry = (ProcessEntry) location.locateEntry();
RapidMiner.init();
}
else if(cbAlgo.getSelectedItem() == "Naive Bayes"){
RepositoryLocation location = new RepositoryLocation("//RMThesis/Apply Model (NB)");
pEntry = (ProcessEntry) location.locateEntry();
RapidMiner.init();
}
if(pEntry instanceof ProcessEntry)
{
String processXML = pEntry.retrieveXML();
Process myProcess = new Process(processXML);
Operator op = myProcess.getOperator("Read Excel");
op.setParameter(ExcelExampleSource.PARAMETER_EXCEL_FILE, selectedFile.getPath());
IOContainer ioResult = myProcess.run();
}
I already added the rmx_text-ANY-5.3.2.jar in my library to be able to use text processing but still i have this error. I hope someone can help me
Feb 22, 2014 8:45:04 PM com.rapidminer.tools.ParameterService init
INFO: Reading configuration resource com/rapidminer/resources/rapidminerrc.
Feb 22, 2014 8:45:04 PM com.rapidminer.tools.I18N <clinit>
INFO: Set locale to en.
Feb 22, 2014 8:45:04 PM com.rapid_i.Launcher ensureRapidMinerHomeSet
INFO: Property rapidminer.home is not set. Guessing.
Feb 22, 2014 8:45:04 PM com.rapid_i.Launcher ensureRapidMinerHomeSet
INFO: Trying parent directory of 'C:\Users\jeraymundo\Desktop\Prototype NEW\Prototype\Resources\launcher.jar'...gotcha!
Feb 22, 2014 8:45:04 PM com.rapid_i.Launcher ensureRapidMinerHomeSet
INFO: Trying parent directory of 'C:\Users\jeraymundo\Desktop\Prototype NEW\Prototype\Resources\rapidminer.jar'...gotcha!
Feb 22, 2014 8:45:05 PM com.rapidminer.tools.expression.parser.ExpressionParserFactory <clinit>
INFO: Default version of expression parser registered successfully
Feb 22, 2014 8:45:06 PM com.rapidminer.parameter.ParameterTypePassword decryptPassword
WARNING: Password in XML file looks like unencrypted plain text.
Feb 22, 2014 8:45:07 PM com.rapidminer.tools.OperatorService init
INFO: Number of registered operator classes: 443; number of registered operator descriptions: 444; number of replacements: 403
Feb 22, 2014 8:45:07 PM com.rapidminer.tools.jdbc.JDBCProperties registerDrivers
INFO: JDBC driver com.mysql.jdbc.Driver not found. Probably the driver is not installed.
Feb 22, 2014 8:45:07 PM com.rapidminer.tools.jdbc.JDBCProperties registerDrivers
INFO: JDBC driver org.postgresql.Driver not found. Probably the driver is not installed.
Feb 22, 2014 8:45:07 PM com.rapidminer.tools.jdbc.JDBCProperties registerDrivers
INFO: JDBC driver net.sourceforge.jtds.jdbc.Driver not found. Probably the driver is not installed.
Feb 22, 2014 8:45:07 PM com.rapidminer.tools.jdbc.JDBCProperties registerDrivers
INFO: JDBC driver org.hsqldb.jdbcDriver not found. Probably the driver is not installed.
Feb 22, 2014 8:45:07 PM com.rapidminer.tools.jdbc.JDBCProperties <init>
WARNING: Missing database driver class name for ODBC Bridge (e.g. Access)
Feb 22, 2014 8:45:07 PM com.rapidminer.tools.jdbc.JDBCProperties registerDrivers
INFO: JDBC driver net.sourceforge.jtds.jdbc.Driver not found. Probably the driver is not installed.
Feb 22, 2014 8:45:07 PM com.rapidminer.tools.jdbc.JDBCProperties registerDrivers
INFO: JDBC driver com.ingres.jdbc.IngresDriver not found. Probably the driver is not installed.
Feb 22, 2014 8:45:07 PM com.rapidminer.tools.jdbc.JDBCProperties registerDrivers
INFO: JDBC driver ca.ingres.jdbc.IngresDriver not found. Probably the driver is not installed.
Feb 22, 2014 8:45:07 PM com.rapidminer.tools.jdbc.JDBCProperties registerDrivers
INFO: JDBC driver oracle.jdbc.driver.OracleDriver not found. Probably the driver is not installed.
Feb 22, 2014 8:45:08 PM com.rapidminer.io.process.XMLImporter addMessage
INFO: <em class="error">The operator class 'text:data_to_documents' is unknown. Possibly you must install a plugin for operators of group 'text'.</em>
Feb 22, 2014 8:45:08 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'select_attributes_and_weights' is unknown for operator 'Data to Documents (2)' (" dummy ")."
Feb 22, 2014 8:45:08 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'specify_weights' of type list is unknown for operator 'Data to Documents (2)' (" dummy ")."
Feb 22, 2014 8:45:08 PM com.rapidminer.io.process.XMLImporter addMessage
INFO: <em class="error">The operator class 'text:process_documents' is unknown. Possibly you must install a plugin for operators of group 'text'.</em>
Feb 22, 2014 8:45:08 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'create_word_vector' is unknown for operator 'Process Documents' (" dummy ")."
Feb 22, 2014 8:45:08 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'vector_creation' is unknown for operator 'Process Documents' (" dummy ")."
Feb 22, 2014 8:45:08 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'add_meta_information' is unknown for operator 'Process Documents' (" dummy ")."
Feb 22, 2014 8:45:08 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'keep_text' is unknown for operator 'Process Documents' (" dummy ")."
Feb 22, 2014 8:45:08 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'prune_method' is unknown for operator 'Process Documents' (" dummy ")."
Feb 22, 2014 8:45:08 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'prune_below_percent' is unknown for operator 'Process Documents' (" dummy ")."
Feb 22, 2014 8:45:08 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'prune_above_percent' is unknown for operator 'Process Documents' (" dummy ")."
Feb 22, 2014 8:45:08 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'prune_below_rank' is unknown for operator 'Process Documents' (" dummy ")."
Feb 22, 2014 8:45:08 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'prune_above_rank' is unknown for operator 'Process Documents' (" dummy ")."
Feb 22, 2014 8:45:08 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'datamanagement' is unknown for operator 'Process Documents' (" dummy ")."
Feb 22, 2014 8:45:08 PM com.rapidminer.io.process.XMLImporter addMessage
INFO: <em class="error">Operator '<class>dummy</class>' may not have children. Ignoring.
Feb 22, 2014 8:45:08 PM 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 (2)</var>.</em>
Feb 22, 2014 8:45:08 PM 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>
Feb 22, 2014 8:45:08 PM com.rapidminer.io.process.XMLImporter addMessage
INFO: <em class="error">The output port <var>documents</var> is unknown at operator <var>Data to Documents (2)</var>.</em>
Feb 22, 2014 8:45:08 PM 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>
Feb 22, 2014 8:45:15 PM com.rapidminer.tools.WrapperLoggingHandler log
INFO: No filename given for result file, using stdout for logging results!
Feb 22, 2014 8:45:15 PM com.rapidminer.Process run
INFO: Process starts
com.rapidminer.operator.UserError: The dummy operator Data to Documents (2) (replacing text:data_to_documents) cannot be executed.
at com.rapidminer.operator.DummyOperator.doWork(DummyOperator.java:88)
at com.rapidminer.operator.Operator.execute(Operator.java:866)
at com.rapidminer.operator.execution.SimpleUnitExecutor.execute(SimpleUnitExecutor.java:51)
at com.rapidminer.operator.ExecutionUnit.execute(ExecutionUnit.java:711)
at com.rapidminer.operator.OperatorChain.doWork(OperatorChain.java:375)
at com.rapidminer.operator.Operator.execute(Operator.java:866)
RapidMiner.setExecutionMode(RapidMiner.ExecutionMode.COMMAND_LINE);
ProcessEntry pEntry = null;
RepositoryManager.getInstance(null).addRepository(new LocalRepository("RMThesis", new File("Resources/TrendClass(70%)")));
if(cbAlgo.getSelectedItem() == "k-NN"){
RepositoryLocation location = new RepositoryLocation("//RMThesis/Apply Model (Oct Data)");
pEntry = (ProcessEntry) location.locateEntry();
RapidMiner.init();
JOptionPane.showMessageDialog(null, "Location set", "Message", JOptionPane.INFORMATION_MESSAGE);
}
else if(cbAlgo.getSelectedItem() == "SVM"){
RepositoryLocation location = new RepositoryLocation("//RMThesis/Apply Model (SVM)");
pEntry = (ProcessEntry) location.locateEntry();
RapidMiner.init();
}
else if(cbAlgo.getSelectedItem() == "Naive Bayes"){
RepositoryLocation location = new RepositoryLocation("//RMThesis/Apply Model (NB)");
pEntry = (ProcessEntry) location.locateEntry();
RapidMiner.init();
}
if(pEntry instanceof ProcessEntry)
{
String processXML = pEntry.retrieveXML();
Process myProcess = new Process(processXML);
Operator op = myProcess.getOperator("Read Excel");
op.setParameter(ExcelExampleSource.PARAMETER_EXCEL_FILE, selectedFile.getPath());
IOContainer ioResult = myProcess.run();
}
I already added the rmx_text-ANY-5.3.2.jar in my library to be able to use text processing but still i have this error. I hope someone can help me
Feb 22, 2014 8:45:04 PM com.rapidminer.tools.ParameterService init
INFO: Reading configuration resource com/rapidminer/resources/rapidminerrc.
Feb 22, 2014 8:45:04 PM com.rapidminer.tools.I18N <clinit>
INFO: Set locale to en.
Feb 22, 2014 8:45:04 PM com.rapid_i.Launcher ensureRapidMinerHomeSet
INFO: Property rapidminer.home is not set. Guessing.
Feb 22, 2014 8:45:04 PM com.rapid_i.Launcher ensureRapidMinerHomeSet
INFO: Trying parent directory of 'C:\Users\jeraymundo\Desktop\Prototype NEW\Prototype\Resources\launcher.jar'...gotcha!
Feb 22, 2014 8:45:04 PM com.rapid_i.Launcher ensureRapidMinerHomeSet
INFO: Trying parent directory of 'C:\Users\jeraymundo\Desktop\Prototype NEW\Prototype\Resources\rapidminer.jar'...gotcha!
Feb 22, 2014 8:45:05 PM com.rapidminer.tools.expression.parser.ExpressionParserFactory <clinit>
INFO: Default version of expression parser registered successfully
Feb 22, 2014 8:45:06 PM com.rapidminer.parameter.ParameterTypePassword decryptPassword
WARNING: Password in XML file looks like unencrypted plain text.
Feb 22, 2014 8:45:07 PM com.rapidminer.tools.OperatorService init
INFO: Number of registered operator classes: 443; number of registered operator descriptions: 444; number of replacements: 403
Feb 22, 2014 8:45:07 PM com.rapidminer.tools.jdbc.JDBCProperties registerDrivers
INFO: JDBC driver com.mysql.jdbc.Driver not found. Probably the driver is not installed.
Feb 22, 2014 8:45:07 PM com.rapidminer.tools.jdbc.JDBCProperties registerDrivers
INFO: JDBC driver org.postgresql.Driver not found. Probably the driver is not installed.
Feb 22, 2014 8:45:07 PM com.rapidminer.tools.jdbc.JDBCProperties registerDrivers
INFO: JDBC driver net.sourceforge.jtds.jdbc.Driver not found. Probably the driver is not installed.
Feb 22, 2014 8:45:07 PM com.rapidminer.tools.jdbc.JDBCProperties registerDrivers
INFO: JDBC driver org.hsqldb.jdbcDriver not found. Probably the driver is not installed.
Feb 22, 2014 8:45:07 PM com.rapidminer.tools.jdbc.JDBCProperties <init>
WARNING: Missing database driver class name for ODBC Bridge (e.g. Access)
Feb 22, 2014 8:45:07 PM com.rapidminer.tools.jdbc.JDBCProperties registerDrivers
INFO: JDBC driver net.sourceforge.jtds.jdbc.Driver not found. Probably the driver is not installed.
Feb 22, 2014 8:45:07 PM com.rapidminer.tools.jdbc.JDBCProperties registerDrivers
INFO: JDBC driver com.ingres.jdbc.IngresDriver not found. Probably the driver is not installed.
Feb 22, 2014 8:45:07 PM com.rapidminer.tools.jdbc.JDBCProperties registerDrivers
INFO: JDBC driver ca.ingres.jdbc.IngresDriver not found. Probably the driver is not installed.
Feb 22, 2014 8:45:07 PM com.rapidminer.tools.jdbc.JDBCProperties registerDrivers
INFO: JDBC driver oracle.jdbc.driver.OracleDriver not found. Probably the driver is not installed.
Feb 22, 2014 8:45:08 PM com.rapidminer.io.process.XMLImporter addMessage
INFO: <em class="error">The operator class 'text:data_to_documents' is unknown. Possibly you must install a plugin for operators of group 'text'.</em>
Feb 22, 2014 8:45:08 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'select_attributes_and_weights' is unknown for operator 'Data to Documents (2)' (" dummy ")."
Feb 22, 2014 8:45:08 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'specify_weights' of type list is unknown for operator 'Data to Documents (2)' (" dummy ")."
Feb 22, 2014 8:45:08 PM com.rapidminer.io.process.XMLImporter addMessage
INFO: <em class="error">The operator class 'text:process_documents' is unknown. Possibly you must install a plugin for operators of group 'text'.</em>
Feb 22, 2014 8:45:08 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'create_word_vector' is unknown for operator 'Process Documents' (" dummy ")."
Feb 22, 2014 8:45:08 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'vector_creation' is unknown for operator 'Process Documents' (" dummy ")."
Feb 22, 2014 8:45:08 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'add_meta_information' is unknown for operator 'Process Documents' (" dummy ")."
Feb 22, 2014 8:45:08 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'keep_text' is unknown for operator 'Process Documents' (" dummy ")."
Feb 22, 2014 8:45:08 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'prune_method' is unknown for operator 'Process Documents' (" dummy ")."
Feb 22, 2014 8:45:08 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'prune_below_percent' is unknown for operator 'Process Documents' (" dummy ")."
Feb 22, 2014 8:45:08 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'prune_above_percent' is unknown for operator 'Process Documents' (" dummy ")."
Feb 22, 2014 8:45:08 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'prune_below_rank' is unknown for operator 'Process Documents' (" dummy ")."
Feb 22, 2014 8:45:08 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'prune_above_rank' is unknown for operator 'Process Documents' (" dummy ")."
Feb 22, 2014 8:45:08 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'datamanagement' is unknown for operator 'Process Documents' (" dummy ")."
Feb 22, 2014 8:45:08 PM com.rapidminer.io.process.XMLImporter addMessage
INFO: <em class="error">Operator '<class>dummy</class>' may not have children. Ignoring.
Feb 22, 2014 8:45:08 PM 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 (2)</var>.</em>
Feb 22, 2014 8:45:08 PM 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>
Feb 22, 2014 8:45:08 PM com.rapidminer.io.process.XMLImporter addMessage
INFO: <em class="error">The output port <var>documents</var> is unknown at operator <var>Data to Documents (2)</var>.</em>
Feb 22, 2014 8:45:08 PM 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>
Feb 22, 2014 8:45:15 PM com.rapidminer.tools.WrapperLoggingHandler log
INFO: No filename given for result file, using stdout for logging results!
Feb 22, 2014 8:45:15 PM com.rapidminer.Process run
INFO: Process starts
com.rapidminer.operator.UserError: The dummy operator Data to Documents (2) (replacing text:data_to_documents) cannot be executed.
at com.rapidminer.operator.DummyOperator.doWork(DummyOperator.java:88)
at com.rapidminer.operator.Operator.execute(Operator.java:866)
at com.rapidminer.operator.execution.SimpleUnitExecutor.execute(SimpleUnitExecutor.java:51)
at com.rapidminer.operator.ExecutionUnit.execute(ExecutionUnit.java:711)
at com.rapidminer.operator.OperatorChain.doWork(OperatorChain.java:375)
at com.rapidminer.operator.Operator.execute(Operator.java:866)
Tagged:
0
Answers
RapidMiner itself needs to know about the text processing extension, so declare a dependency in your build.xml and make sure the text extension is in the plugin folder of RapidMiner.
Note: Call RapidMiner.init(); right after setting the execution mode as this is the first thing you need to do before using any other functionality of RapidMiner.
Regards,
Marco
Can you be so kind and show me the syntax on how to declare the dependency in my build.xml?
you can add the following line to your build.xml to depend on the text processing extension 5.2: If you are wondering how the value is defined, have a look at our marketplace here: http://marketplace.rapid-i.com/
Then check the "product-id" for an extension, see here: http://marketplace.rapid-i.com/UpdateServer/faces/product_details.xhtml?productId=rmx_text
Regards,
Marco