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
[SOLVED] File Name for Output
Hello,
I've been using Rapidminer for a couple of days to extract text from a .pdf exporting the analysis to an Excel file. Since I want to extract many different files at the same time I implemented a Loop Example. Within this loop I use an export routine to create an Excel file for each imported .pdf. As I would like to use the .pdf file name for the Excel file as well I implemented an Extract Macro operator using the type "data_value" and the macro iterator as the example number. I used that macro as the file name. However, it looks like the "Extract Macro" operator is not iterating over the example number but using the first .pdf name for all of the following files.
It would be great if you could tell me how to fix the issue. I am however not an expert in Rapidminer so far.
Thanks,
I've been using Rapidminer for a couple of days to extract text from a .pdf exporting the analysis to an Excel file. Since I want to extract many different files at the same time I implemented a Loop Example. Within this loop I use an export routine to create an Excel file for each imported .pdf. As I would like to use the .pdf file name for the Excel file as well I implemented an Extract Macro operator using the type "data_value" and the macro iterator as the example number. I used that macro as the file name. However, it looks like the "Extract Macro" operator is not iterating over the example number but using the first .pdf name for all of the following files.
It would be great if you could tell me how to fix the issue. I am however not an expert in Rapidminer so far.
Thanks,
0
Answers
in other words
"Post the XML P-rapid"
You need to use the name of the macro not its value in the Extract Macro operator. In other words, remove the %{} around the names.
At the moment, the first time Extract Macro operator is called it creates a macro called "1" and sets its value to the number of examples in the example set.
The second Extract Macro operator creates a macro equal to the value of the existing macro called file_name and sets its value to the value of the attribute called "metadata_file" for the current example within the example set. So if file_name is equal to fred.txt, a macro called fred.txt will be created and it will be set to whatever the attribute metadata_file has at the nth position.
Macros are powerful but can be fiddly. If you use the macro view in the GUI, you will move into a whole new area of understanding.
regards
Andrew
thanks a lot. It works perfectly and helps a lot!
Regards