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
Regarding sampling files from a given folder and saving them into another one
huaiyanggongzi
Member Posts: 39 Contributor II
Hi, I am trying to build a workflow that can sample a certain number of documents saved in a directory and put these sampled files into another directory.
I started with the following process to test the sampler opertor at first. However, the error message is like " the exampleset must contain at least 10 examples" although the input folder has more than 200 files.
In addition, I could not find the operator that can save files into a given folder. Are there any examples for this kind of functionality? Thanks a lot.
Here is the workflow I tried
I started with the following process to test the sampler opertor at first. However, the error message is like " the exampleset must contain at least 10 examples" although the input folder has more than 200 files.
In addition, I could not find the operator that can save files into a given folder. Are there any examples for this kind of functionality? Thanks a lot.
Here is the workflow I tried
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.2.008">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="5.2.008" expanded="true" name="Process">
<process expanded="true" height="296" width="547">
<operator activated="true" class="text:process_document_from_file" compatibility="5.2.004" expanded="true" height="76" name="Process Documents from Files" width="90" x="96" y="104">
<list key="text_directories">
<parameter key="R" value="C:\Users\Desktop\testdata"/>
</list>
<process expanded="true">
<portSpacing port="source_document" spacing="0"/>
<portSpacing port="sink_document 1" spacing="0"/>
</process>
</operator>
<operator activated="true" class="sample" compatibility="5.2.008" expanded="true" height="76" name="Sample" width="90" x="380" y="210">
<parameter key="sample_size" value="10"/>
<list key="sample_size_per_class"/>
<list key="sample_ratio_per_class"/>
<list key="sample_probability_per_class"/>
</operator>
<connect from_op="Process Documents from Files" from_port="example set" to_op="Sample" to_port="example set input"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
</process>
</operator>
</process>
0
Answers
Good Luck and a Beautiful Day,
Marius