"Read" operator class name?

datasunnydatasunny Member Posts: 11 Contributor II
Hi All,

I had a hard time to find out the class name for the "Read" operator in RM 5.1.012 wile trying to create this operator in my own Java program.
Description in process xml:
<operator activated="true" class="read" compatibility="5.1.012" expanded="true" height="60" name="Read" width="90" x="36" y="104"/>
And generally how can i get the corresponding class name for each operator? The api doc has different name sometimes.
Thanks.

Answers

  • StaryVenaStaryVena Member Posts: 126 Contributor II
    Hi,
    link between operator class name and "process" name is in
    .......\Rapid-I\RapidMiner5\resources\com\rapidminer\resources\OperatorsCore.xml
    or in
    .......\Rapid-I\RapidMiner5\resources\com\rapidminer\resources\i18n\OperatorsCoreDocumentation.xml

    first one id definition of link and second one is operators documentation.

    Cheers
    Vaclav
  • datasunnydatasunny Member Posts: 11 Contributor II
    Awesome, thanks!
    StaryVena wrote:

    Hi,
    link between operator class name and "process" name is in
    .......\Rapid-I\RapidMiner5\resources\com\rapidminer\resources\OperatorsCore.xml
    or in
    .......\Rapid-I\RapidMiner5\resources\com\rapidminer\resources\i18n\OperatorsCoreDocumentation.xml

    first one id definition of link and second one is operators documentation.

    Cheers
    Vaclav
  • datasunnydatasunny Member Posts: 11 Contributor II
    I'm still a bit confused with it.
    For example, for operator "Process Documents from Files", i found follow info from "
    resources/com/rapidminer/resources/i18n/OperatorsCoreDocumentation.xml":

        <operator>
            <name>Process Documents from Files</name>
            <synopsis>Generates word vectors from a text collection stored in
                multiple files.</synopsis>
            <help/>
            <key>process_document_from_file</key>
        </operator>
    Key "process_document_from_file" doesn't provide me any info about the class name for this operator. A grab in source code for this key doesn't show anything either.
  • StaryVenaStaryVena Member Posts: 126 Contributor II
    Hi,
    "Process Documents from Files" is operator from Text Processing plugin. So you have to download source codes for this plugin and xml are in resources directory too.

    source codes on SVN:
    https://rapidminer.svn.sourceforge.net/svnroot/rapidminer/Plugins/TextProcessing/Vega/

    Cheers
    Vaclav
  • datasunnydatasunny Member Posts: 11 Contributor II
    Thanks for the quick response.
    I downloaded text plugin source code and from "resources/com/rapidminer/resources/OperatorsTextProcessing.xml" i found:

            <operator>
               <key>process_document_from_file</key>
               <class>com.rapidminer.operator.text.io.FileDocumentInputOperator</class>
               <replaces>FileTextInput</replaces>
            </operator>
    When i compile my Java program with:
    javac -cp rapidminer/lib/rapidminer.jar evaluator.java
    I got the error msg:

    evaluator.java:9: package com.rapidminer.operator.text.io does not exist
    import com.rapidminer.operator.text.io.FileDocumentInputOperator;
                                         ^
    My RM is up to date, and text operators are working fine in GUI, so I assume I already have the text operator class/jar file in my RM installation. So what else jar ball or dir i need to specify in the classpath?
    Thanks.
  • datasunnydatasunny Member Posts: 11 Contributor II
    Never mind, i found it at:
    /home/some_user/.RapidMiner5/managed/rmx_text-5.1.3.jar
  • StaryVenaStaryVena Member Posts: 126 Contributor II
    Hi,
    I'm not sure, but if you download extensions via update in RM, it is downloaded to your home folder C:\Users\userName\.RapidMiner5\managed
    There you find all downloaded jar plugins.

    I hope this is answer you need.

    Vaclav
Sign In or Register to comment.