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
How to insert and export strings
Hi I would like to run an rapidminerprocess which does basic text normalization (tokenizing etc.) . Is it possible to run my Process created in Rapidminer.gui with my string from my java programm and can i return the normalized string into my java programm after the process is finished. I know that it is possible to read and write files with rapidminer and than to read those in java, but this is not a secure and safe way.
Thank you very much for you help i hope you understand my problem .
Thank you very much for you help i hope you understand my problem .
Tagged:
0
Answers
in the sticky thread here you can see how to execute a RapidMiner process via Java. You can use that and once you have created your process, you can set operator parameters - for example if you use the Create Document operator, you can set its text parameter via and then just execute the process as described in the link above. You can setup your process in such a way that it returns the document as output. Then you get a com.rapidminer.operator.text.Document IOObject as a result, and you can get the results and process them in any way you want.
Regards,
Marco
Or is it not Possible to change an Operator after reading an xml-file to create the Process, do i have to create it by hand ?
My Code so far after the init is the following. I have imported the following packages:
Do i miss some ? For example the text plugin ? And how do i get or install it ?
import com.rapidminer.Process;
import com.rapidminer.RapidMiner;
import com.rapidminer.RapidMiner.ExecutionMode;
import com.rapidminer.operator.OperatorException;
import com.rapidminer.repository.MalformedRepositoryLocationException;
import com.rapidminer.tools.OperatorService;
import com.rapidminer.tools.XMLException;
import com.rapidminer.operator.Operator;
Which parameters do i have to set in rapidminer gui? and afterwars in Java ? To Get an Output ?
thank you very much for your Help !
My XML Data right now is.
SingleDocumentInputOperator is from the Text Mining Extension, so you will need to add that as a library to your project. To control process input/output, you need to connect input and output ports in the RapidMiner GUI to your operators. Input port(s) are on the left of the process design panel, output ports on the right side. Each connected input port will use the given argument you hand to the process, and each output port will produce an IOObject in the result array.
Regards,
Marco
What is my mistake ? The Argument is not set in my Program. Instead the Programm only prints out the default text i inserted in the create Document Operator. And not the OPerator i created in my Java programm ?
What did I do wrong ?
Thank you very much for your Help !! It is really appreciated !
see here under the point "Question: I want to create my own process and execute it via java. What is the best way to do this?"
You can basically copy&paste the code there and then use it. No need to create operators via OperatorService etc as that is a very error-prone way.
Once you have your process, you can then for example modify the text paramter of your "Create Document" operator via After that, you can execute your process and it will work on your own text you provided at runtime.
Regards,
Marco