I am new to RapidMiner so I apologize upfront for my inexperience. I have written a web application in Flex/ActionScript that learners and educators can use to create a case formulation based on a given scenario. Their formulations are indented outlines of text that integrate knowledge with the particular observations in the scenario. I have used RapidMiner GUI to compare the two documents for similarity by entering each directly into its own create document operator which then serve as inputs to a single Process Documents operator, which is then connected to a Data to Similarity operator and this works fine.
I want to do the same using a remote method call to a java class on a Tomcat server and I cannot for the life of me (actually only 3 straight days) figure out how to set this up.
Flex applications can make a remote call with parameters to a java class on the Tomcat server and invoke a method in that class. I am trying configure this method so it will receive two large strings, the learner’s formulation and the educator’s formulation which I have shortened below to save space, and then run RapidMiner using the DocumentCompare.rmp listed below. When completed I need it to return an object back to Flex that contains the result. I need help with setting up the method and knowing where on the Tomcat server that I should put the DocumentCompare.rmp file so RapidMiner can find it. Thank you in advance for any help that you can offer.
<?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="581" width="872">
<operator activated="true" class="text:create_document" compatibility="5.2.004" expanded="true" height="60" name="Create Document" width="90" x="112" y="75">
<parameter key="text" value="Rochelle (used with permission from Dr. Tracy Eells) Problem List Patient-related factors depression anxiety mood instability poor anger management poor sleep headaches social isolation "/>
<parameter key="add label" value="true"/>
<parameter key="label_value" value="ReferenceFormulation"/>
</operator>
<operator activated="true" class="text:create_document" compatibility="5.2.004" expanded="true" height="60" name="Create Document (2)" width="90" x="101" y="301">
<parameter key="text" value="Rochelle (used with permission from Dr. Tracy Eells) Problem List Patient-related factors depression anxiety mood instability poor anger management poor sleep headaches social isolation possible limited motivation or ability to come to treatment dependency mood problems exacerbated by uncontrolled diabetes Environment-related factors financial strain possible impending housing problem possible infidelity chemically dependent husband Temporal dimension Distal grief due to death of son grief due to past rape history of suicidal ideation and threatened attempts Proximal possible infidelity Diagnosis (provisional) Axis I (296.90) Mood disorder not otherwise specified "/>
<parameter key="add label" value="true"/>
<parameter key="label_value" value="SubmittedFormulation"/>
</operator>
<operator activated="true" class="text:process_documents" compatibility="5.2.004" expanded="true" height="112" name="Process Documents" width="90" x="313" y="165">
<parameter key="vector_creation" value="Term Occurrences"/>
<parameter key="prune_below_absolute" value="2"/>
<parameter key="prune_above_absolute" value="99"/>
<process expanded="true" height="599" width="891">
<operator activated="true" class="text:tokenize" compatibility="5.2.004" expanded="true" height="60" name="Tokenize" width="90" x="179" y="30"/>
<operator activated="true" class="text:transform_cases" compatibility="5.2.004" expanded="true" height="60" name="Transform Cases" width="90" x="315" y="28"/>
<operator activated="true" class="text:filter_stopwords_english" compatibility="5.2.004" expanded="true" height="60" name="Filter Stopwords (English)" width="90" x="442" y="26"/>
<operator activated="true" class="text:filter_by_length" compatibility="5.2.004" expanded="true" height="60" name="Filter Tokens (by Length)" width="90" x="600" y="26">
<parameter key="min_chars" value="2"/>
<parameter key="max_chars" value="99"/>
</operator>
<connect from_port="document" to_op="Tokenize" to_port="document"/>
<connect from_op="Tokenize" from_port="document" to_op="Transform Cases" to_port="document"/>
<connect from_op="Transform Cases" from_port="document" to_op="Filter Stopwords (English)" to_port="document"/>
<connect from_op="Filter Stopwords (English)" from_port="document" to_op="Filter Tokens (by Length)" to_port="document"/>
<connect from_op="Filter Tokens (by Length)" 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="data_to_similarity" compatibility="5.2.008" expanded="true" height="76" name="Data to Similarity" width="90" x="514" y="165">
<parameter key="measure_types" value="NumericalMeasures"/>
<parameter key="numerical_measure" value="CosineSimilarity"/>
</operator>
<connect from_op="Create Document" from_port="output" to_op="Process Documents" to_port="documents 1"/>
<connect from_op="Create Document (2)" from_port="output" to_op="Process Documents" to_port="documents 2"/>
<connect from_op="Process Documents" from_port="example set" to_op="Data to Similarity" to_port="example set"/>
<connect from_op="Data to Similarity" from_port="similarity" to_port="result 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="0"/>
</process>
</operator>
</process>
[ /code]