Community & Support
Learn
Marketplace
Discussions
Categories
Discussions
General
Platform
Academic
Partner
Regional
Explore Siemens Communities
User Groups
Documentation
Events
Altair Exchange
Share or Download Projects
Resources
News & Instructions
Programs
YouTube
Employee Resources
This tab can be seen by employees only. Please do not share these resources externally.
Groups
Join a User Group
Support
Home
Discussions
Community Q&A
Reading documents Integration with java
abdelrahmanMage
Hey All,
I am currently working on my graduation project and i have a process in rapid in which i want to input multiple text documents to rapid miner one at a time. The process in rapidminer is working very well however when i try to call it from the java application it keeps getting me errors. Below is the java code. I know that i have a problem to input the file to the code so please any help will be appreciated. Here is my code. I input any parameter as i do not know the right parameter to be input
import com.rapidminer.Process;
import com.rapidminer.RapidMiner;
import com.rapidminer.operator.*;
import com.rapidminer.operator.AbstractIOObject.InputStreamProvider;
import com.rapidminer.operator.text.io.filereader.PDFFileReader;
import com.rapidminer.parameter.Parameters;
import com.rapidminer.tools.XMLException;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class ReadRapidminerProcess {
private static final Parameters PDFFileReader = new Parameters();
public static void main(String[] args) throws OperatorException, IOException, XMLException {
RapidMiner.setExecutionMode(RapidMiner.ExecutionMode.COMMAND_LINE);
RapidMiner.init();
Process process = new Process(new File("/Users/abdelrahmanayad/Desktop/reading.rmp"));
Operator op = process.getOperator("Read CV");
op.setParameters(PDFFileReader);
process.run();
}
}
Find more posts tagged with
AI Studio
Developer
Accepted answers
All comments
Marco_Boeck
Hi,
1) What errors? I can only guess by looking at your code right now.
2) What process? I'd like the xml of the process to have a look at it.
3) Is the operator really called "Read CV"?
4) You set parameters one at a time. You look up the static variable which is the key for said parameter and then set it, e.g.
operator.setParameter("parameter_key", "parameter_value");
Regards,
Marco
Quick Links
All Categories
Recent Discussions
Activity
Unanswered
日本語 (Japanese)
한국어(Korean)
Groups