Due to recent updates, all users are required to create an Altair One account to login to the RapidMiner community. Click the Register button to create your account using the same email that you have previously used to login to the RapidMiner community. This will ensure that any previously created content will be synced to your Altair One account. Once you login, you will be asked to provide a username that identifies you to other Community users. Email us at Community with questions.
Text Mining
gunjanamit
Member Posts: 28 Contributor II
Hi,
Based on video http://vancouverdata.blogspot.in/2011/10/rapidminer-text-mining-r-analytics.html , I have built below model
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.2.006">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="5.2.006" expanded="true" name="Process">
<parameter key="resultfile" value="C:\Users\Rojas\Desktop\perfekt für clustering\Daten_Reuters_Excell\test.res"/>
<process expanded="true" height="566" width="748">
<operator activated="false" class="text:process_document_from_file" compatibility="5.2.003" expanded="true" height="76" name="Process Documents from Files" width="90" x="45" y="30">
<list key="text_directories">
<parameter key="Service" value="C:\Users\guagg\Desktop\All\RapidMiner\Service"/>
<parameter key="Food" value="C:\Users\guagg\Desktop\All\RapidMiner\food"/>
<parameter key="Waiter" value="C:\Users\guagg\Desktop\All\RapidMiner\Waiter"/>
</list>
<parameter key="file_pattern" value="*.*"/>
<parameter key="extract_text_only" value="false"/>
<parameter key="prune_method" value="percentual"/>
<parameter key="prunde_below_percent" value="5.0"/>
<parameter key="prune_above_percent" value="100.0"/>
<parameter key="prune_below_absolute" value="5"/>
<parameter key="prune_above_absolute" value="100"/>
<parameter key="parallelize_vector_creation" value="true"/>
<process expanded="true" height="383" width="748">
<operator activated="false" class="text:transform_cases" compatibility="5.2.003" expanded="true" height="60" name="Transform Cases" width="90" x="41" y="110"/>
<operator activated="false" class="text:tokenize" compatibility="5.2.003" expanded="true" height="60" name="Tokenize" width="90" x="179" y="120"/>
<operator activated="false" class="text:filter_stopwords_english" compatibility="5.2.003" expanded="true" height="60" name="Filter Stopwords (English)" width="90" x="380" y="120"/>
<operator activated="false" class="text:stem_porter" compatibility="5.2.003" expanded="true" height="60" name="Stem (Porter)" width="90" x="514" y="120"/>
<operator activated="false" class="text:generate_n_grams_terms" compatibility="5.2.003" expanded="true" height="60" name="Generate n-Grams (Terms)" width="90" x="648" y="210">
<parameter key="max_length" value="1"/>
</operator>
<connect from_port="document" to_op="Transform Cases" to_port="document"/>
<connect from_op="Transform Cases" from_port="document" to_op="Tokenize" to_port="document"/>
<connect from_op="Tokenize" from_port="document" to_op="Filter Stopwords (English)" to_port="document"/>
<connect from_op="Filter Stopwords (English)" from_port="document" to_op="Stem (Porter)" to_port="document"/>
<connect from_op="Stem (Porter)" from_port="document" to_op="Generate n-Grams (Terms)" to_port="document"/>
<connect from_op="Generate n-Grams (Terms)" from_port="document" to_port="document 1"/>
<portSpacing port="source_document" spacing="0"/>
<portSpacing port="sink_document 1" spacing="0"/>
<portSpacing port="sink_document 2" spacing="0"/>
</process>
</operator>
<operator activated="false" class="store" compatibility="5.2.006" expanded="true" height="60" name="Store" width="90" x="246" y="75">
<parameter key="repository_entry" value="wordlist"/>
</operator>
<operator activated="false" class="x_validation" compatibility="5.2.006" expanded="true" height="112" name="Validation" width="90" x="380" y="30">
<parameter key="number_of_validations" value="3"/>
<parameter key="parallelize_training" value="true"/>
<parameter key="parallelize_testing" value="true"/>
<process expanded="true" height="383" width="343">
<operator activated="false" class="support_vector_machine_libsvm" compatibility="5.2.006" expanded="true" height="76" name="SVM" width="90" x="112" y="75">
<list key="class_weights"/>
</operator>
<connect from_port="training" to_op="SVM" to_port="training set"/>
<connect from_op="SVM" from_port="model" to_port="model"/>
<connect from_op="SVM" from_port="exampleSet" to_port="through 1"/>
<portSpacing port="source_training" spacing="0"/>
<portSpacing port="sink_model" spacing="0"/>
<portSpacing port="sink_through 1" spacing="0"/>
<portSpacing port="sink_through 2" spacing="0"/>
</process>
<process expanded="true" height="383" width="343">
<operator activated="false" class="apply_model" compatibility="5.2.006" expanded="true" height="76" name="Apply Model" width="90" x="69" y="49">
<list key="application_parameters"/>
<parameter key="create_view" value="true"/>
</operator>
<operator activated="false" class="performance" compatibility="5.2.006" expanded="true" height="76" name="Performance" width="90" x="207" y="44"/>
<connect from_port="model" to_op="Apply Model" to_port="model"/>
<connect from_port="through 1" to_op="Apply Model" to_port="unlabelled data"/>
<connect from_op="Apply Model" from_port="labelled data" to_op="Performance" to_port="labelled data"/>
<connect from_op="Performance" from_port="performance" to_port="averagable 1"/>
<portSpacing port="source_model" spacing="0"/>
<portSpacing port="source_test set" spacing="0"/>
<portSpacing port="source_through 1" spacing="0"/>
<portSpacing port="source_through 2" spacing="0"/>
<portSpacing port="sink_averagable 1" spacing="0"/>
<portSpacing port="sink_averagable 2" spacing="0"/>
</process>
</operator>
<operator activated="false" class="store" compatibility="5.2.006" expanded="true" height="60" name="Store (2)" width="90" x="514" y="30">
<parameter key="repository_entry" value="model"/>
</operator>
<operator activated="true" class="retrieve" compatibility="5.2.006" expanded="true" height="60" name="Get Wordlist" width="90" x="45" y="300">
<parameter key="repository_entry" value="//NewLocalRepository/wordlist"/>
</operator>
<operator activated="true" breakpoints="before" class="text:process_document_from_file" compatibility="5.2.003" expanded="true" height="76" name="Process Documents from Files (2)" width="90" x="179" y="300">
<list key="text_directories"/>
<parameter key="file_pattern" value="*.*"/>
<parameter key="use_file_extension_as_type" value="false"/>
<parameter key="keep_text" value="true"/>
<parameter key="prune_method" value="percentual"/>
<parameter key="prunde_below_percent" value="5.0"/>
<parameter key="prune_above_percent" value="100.0"/>
<process expanded="true" height="585" width="815">
<operator activated="true" class="text:transform_cases" compatibility="5.2.003" expanded="true" height="60" name="Transform Cases (2)" width="90" x="45" y="165"/>
<operator activated="true" class="text:tokenize" compatibility="5.2.003" expanded="true" height="60" name="Tokenize (2)" width="90" x="179" y="165"/>
<operator activated="true" class="text:filter_stopwords_english" compatibility="5.2.003" expanded="true" height="60" name="Filter Stopwords (2)" width="90" x="313" y="165"/>
<operator activated="true" class="text:stem_porter" compatibility="5.2.003" expanded="true" height="60" name="Stem (2)" width="90" x="447" y="165"/>
<operator activated="true" class="text:generate_n_grams_terms" compatibility="5.2.003" expanded="true" height="60" name="Generate n-Grams (2)" width="90" x="581" y="165">
<parameter key="max_length" value="1"/>
</operator>
<connect from_port="document" to_op="Transform Cases (2)" to_port="document"/>
<connect from_op="Transform Cases (2)" from_port="document" to_op="Tokenize (2)" to_port="document"/>
<connect from_op="Tokenize (2)" from_port="document" to_op="Filter Stopwords (2)" to_port="document"/>
<connect from_op="Filter Stopwords (2)" from_port="document" to_op="Stem (2)" to_port="document"/>
<connect from_op="Stem (2)" from_port="document" to_op="Generate n-Grams (2)" to_port="document"/>
<connect from_op="Generate n-Grams (2)" from_port="document" to_port="document 1"/>
<portSpacing port="source_document" spacing="0"/>
<portSpacing port="sink_document 1" spacing="0"/>
<portSpacing port="sink_document 2" spacing="0"/>
</process>
</operator>
<operator activated="true" class="retrieve" compatibility="5.2.006" expanded="true" height="60" name="Get Model" width="90" x="313" y="210">
<parameter key="repository_entry" value="//NewLocalRepository/model"/>
</operator>
<operator activated="true" class="apply_model" compatibility="5.2.006" expanded="true" height="76" name="Apply Model (3)" width="90" x="514" y="255">
<list key="application_parameters"/>
</operator>
<connect from_op="Process Documents from Files" from_port="example set" to_op="Validation" to_port="training"/>
<connect from_op="Process Documents from Files" from_port="word list" to_op="Store" to_port="input"/>
<connect from_op="Validation" from_port="model" to_op="Store (2)" to_port="input"/>
<connect from_op="Get Wordlist" from_port="output" to_op="Process Documents from Files (2)" to_port="word list"/>
<connect from_op="Process Documents from Files (2)" from_port="example set" to_op="Apply Model (3)" to_port="unlabelled data"/>
<connect from_op="Get Model" from_port="output" to_op="Apply Model (3)" to_port="model"/>
<connect from_op="Apply Model (3)" from_port="labelled data" to_port="result 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="144"/>
<portSpacing port="sink_result 2" spacing="0"/>
</process>
</operator>
</process>
But it is not working. Can someone suggest?
Regards
Gunjan
Based on video http://vancouverdata.blogspot.in/2011/10/rapidminer-text-mining-r-analytics.html , I have built below model
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.2.006">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="5.2.006" expanded="true" name="Process">
<parameter key="resultfile" value="C:\Users\Rojas\Desktop\perfekt für clustering\Daten_Reuters_Excell\test.res"/>
<process expanded="true" height="566" width="748">
<operator activated="false" class="text:process_document_from_file" compatibility="5.2.003" expanded="true" height="76" name="Process Documents from Files" width="90" x="45" y="30">
<list key="text_directories">
<parameter key="Service" value="C:\Users\guagg\Desktop\All\RapidMiner\Service"/>
<parameter key="Food" value="C:\Users\guagg\Desktop\All\RapidMiner\food"/>
<parameter key="Waiter" value="C:\Users\guagg\Desktop\All\RapidMiner\Waiter"/>
</list>
<parameter key="file_pattern" value="*.*"/>
<parameter key="extract_text_only" value="false"/>
<parameter key="prune_method" value="percentual"/>
<parameter key="prunde_below_percent" value="5.0"/>
<parameter key="prune_above_percent" value="100.0"/>
<parameter key="prune_below_absolute" value="5"/>
<parameter key="prune_above_absolute" value="100"/>
<parameter key="parallelize_vector_creation" value="true"/>
<process expanded="true" height="383" width="748">
<operator activated="false" class="text:transform_cases" compatibility="5.2.003" expanded="true" height="60" name="Transform Cases" width="90" x="41" y="110"/>
<operator activated="false" class="text:tokenize" compatibility="5.2.003" expanded="true" height="60" name="Tokenize" width="90" x="179" y="120"/>
<operator activated="false" class="text:filter_stopwords_english" compatibility="5.2.003" expanded="true" height="60" name="Filter Stopwords (English)" width="90" x="380" y="120"/>
<operator activated="false" class="text:stem_porter" compatibility="5.2.003" expanded="true" height="60" name="Stem (Porter)" width="90" x="514" y="120"/>
<operator activated="false" class="text:generate_n_grams_terms" compatibility="5.2.003" expanded="true" height="60" name="Generate n-Grams (Terms)" width="90" x="648" y="210">
<parameter key="max_length" value="1"/>
</operator>
<connect from_port="document" to_op="Transform Cases" to_port="document"/>
<connect from_op="Transform Cases" from_port="document" to_op="Tokenize" to_port="document"/>
<connect from_op="Tokenize" from_port="document" to_op="Filter Stopwords (English)" to_port="document"/>
<connect from_op="Filter Stopwords (English)" from_port="document" to_op="Stem (Porter)" to_port="document"/>
<connect from_op="Stem (Porter)" from_port="document" to_op="Generate n-Grams (Terms)" to_port="document"/>
<connect from_op="Generate n-Grams (Terms)" from_port="document" to_port="document 1"/>
<portSpacing port="source_document" spacing="0"/>
<portSpacing port="sink_document 1" spacing="0"/>
<portSpacing port="sink_document 2" spacing="0"/>
</process>
</operator>
<operator activated="false" class="store" compatibility="5.2.006" expanded="true" height="60" name="Store" width="90" x="246" y="75">
<parameter key="repository_entry" value="wordlist"/>
</operator>
<operator activated="false" class="x_validation" compatibility="5.2.006" expanded="true" height="112" name="Validation" width="90" x="380" y="30">
<parameter key="number_of_validations" value="3"/>
<parameter key="parallelize_training" value="true"/>
<parameter key="parallelize_testing" value="true"/>
<process expanded="true" height="383" width="343">
<operator activated="false" class="support_vector_machine_libsvm" compatibility="5.2.006" expanded="true" height="76" name="SVM" width="90" x="112" y="75">
<list key="class_weights"/>
</operator>
<connect from_port="training" to_op="SVM" to_port="training set"/>
<connect from_op="SVM" from_port="model" to_port="model"/>
<connect from_op="SVM" from_port="exampleSet" to_port="through 1"/>
<portSpacing port="source_training" spacing="0"/>
<portSpacing port="sink_model" spacing="0"/>
<portSpacing port="sink_through 1" spacing="0"/>
<portSpacing port="sink_through 2" spacing="0"/>
</process>
<process expanded="true" height="383" width="343">
<operator activated="false" class="apply_model" compatibility="5.2.006" expanded="true" height="76" name="Apply Model" width="90" x="69" y="49">
<list key="application_parameters"/>
<parameter key="create_view" value="true"/>
</operator>
<operator activated="false" class="performance" compatibility="5.2.006" expanded="true" height="76" name="Performance" width="90" x="207" y="44"/>
<connect from_port="model" to_op="Apply Model" to_port="model"/>
<connect from_port="through 1" to_op="Apply Model" to_port="unlabelled data"/>
<connect from_op="Apply Model" from_port="labelled data" to_op="Performance" to_port="labelled data"/>
<connect from_op="Performance" from_port="performance" to_port="averagable 1"/>
<portSpacing port="source_model" spacing="0"/>
<portSpacing port="source_test set" spacing="0"/>
<portSpacing port="source_through 1" spacing="0"/>
<portSpacing port="source_through 2" spacing="0"/>
<portSpacing port="sink_averagable 1" spacing="0"/>
<portSpacing port="sink_averagable 2" spacing="0"/>
</process>
</operator>
<operator activated="false" class="store" compatibility="5.2.006" expanded="true" height="60" name="Store (2)" width="90" x="514" y="30">
<parameter key="repository_entry" value="model"/>
</operator>
<operator activated="true" class="retrieve" compatibility="5.2.006" expanded="true" height="60" name="Get Wordlist" width="90" x="45" y="300">
<parameter key="repository_entry" value="//NewLocalRepository/wordlist"/>
</operator>
<operator activated="true" breakpoints="before" class="text:process_document_from_file" compatibility="5.2.003" expanded="true" height="76" name="Process Documents from Files (2)" width="90" x="179" y="300">
<list key="text_directories"/>
<parameter key="file_pattern" value="*.*"/>
<parameter key="use_file_extension_as_type" value="false"/>
<parameter key="keep_text" value="true"/>
<parameter key="prune_method" value="percentual"/>
<parameter key="prunde_below_percent" value="5.0"/>
<parameter key="prune_above_percent" value="100.0"/>
<process expanded="true" height="585" width="815">
<operator activated="true" class="text:transform_cases" compatibility="5.2.003" expanded="true" height="60" name="Transform Cases (2)" width="90" x="45" y="165"/>
<operator activated="true" class="text:tokenize" compatibility="5.2.003" expanded="true" height="60" name="Tokenize (2)" width="90" x="179" y="165"/>
<operator activated="true" class="text:filter_stopwords_english" compatibility="5.2.003" expanded="true" height="60" name="Filter Stopwords (2)" width="90" x="313" y="165"/>
<operator activated="true" class="text:stem_porter" compatibility="5.2.003" expanded="true" height="60" name="Stem (2)" width="90" x="447" y="165"/>
<operator activated="true" class="text:generate_n_grams_terms" compatibility="5.2.003" expanded="true" height="60" name="Generate n-Grams (2)" width="90" x="581" y="165">
<parameter key="max_length" value="1"/>
</operator>
<connect from_port="document" to_op="Transform Cases (2)" to_port="document"/>
<connect from_op="Transform Cases (2)" from_port="document" to_op="Tokenize (2)" to_port="document"/>
<connect from_op="Tokenize (2)" from_port="document" to_op="Filter Stopwords (2)" to_port="document"/>
<connect from_op="Filter Stopwords (2)" from_port="document" to_op="Stem (2)" to_port="document"/>
<connect from_op="Stem (2)" from_port="document" to_op="Generate n-Grams (2)" to_port="document"/>
<connect from_op="Generate n-Grams (2)" from_port="document" to_port="document 1"/>
<portSpacing port="source_document" spacing="0"/>
<portSpacing port="sink_document 1" spacing="0"/>
<portSpacing port="sink_document 2" spacing="0"/>
</process>
</operator>
<operator activated="true" class="retrieve" compatibility="5.2.006" expanded="true" height="60" name="Get Model" width="90" x="313" y="210">
<parameter key="repository_entry" value="//NewLocalRepository/model"/>
</operator>
<operator activated="true" class="apply_model" compatibility="5.2.006" expanded="true" height="76" name="Apply Model (3)" width="90" x="514" y="255">
<list key="application_parameters"/>
</operator>
<connect from_op="Process Documents from Files" from_port="example set" to_op="Validation" to_port="training"/>
<connect from_op="Process Documents from Files" from_port="word list" to_op="Store" to_port="input"/>
<connect from_op="Validation" from_port="model" to_op="Store (2)" to_port="input"/>
<connect from_op="Get Wordlist" from_port="output" to_op="Process Documents from Files (2)" to_port="word list"/>
<connect from_op="Process Documents from Files (2)" from_port="example set" to_op="Apply Model (3)" to_port="unlabelled data"/>
<connect from_op="Get Model" from_port="output" to_op="Apply Model (3)" to_port="model"/>
<connect from_op="Apply Model (3)" from_port="labelled data" to_port="result 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="144"/>
<portSpacing port="sink_result 2" spacing="0"/>
</process>
</operator>
</process>
But it is not working. Can someone suggest?
Regards
Gunjan
0
Answers
Best, Marius