"operators and Java"

platanas20
platanas20 New Altair Community Member
edited November 5 in Community Q&A
Hi all,

I want to create a project in java using the library of RM.What is the imports for the operators:Process Documents From Files,Read Document and Process Documents?

For example:the operator "write model" has this import: "import com.rapidminer.operator.io.ModelWriter;"

Thanks
Platanas20
Tagged:

Answers

  • colo
    colo New Altair Community Member
    Hi Platanas,

    you can easily find this information if you take a look at the resources folder (in case of the operators you are looking for, you have to search the text processing plugin source).
    You will have to find the internal key corresponding to a desired operator (identified by the name as it is displayed inside RapidMiner) inside com.rapidminer.resources.i18n.OperatorsDocTextProcessing.xml. Searching for "process documents from files" brings up this operator info:

    <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>
    Using the internal key process_document_from_file you will easily find the name of the corresponding class inside com.rapidminer.resources.OperatorsTextProcessing.xml:

    <operator>
      <key>process_document_from_file</key>
      <class>com.rapidminer.operator.text.io.FileDocumentInputOperator</class>
      <replaces>FileTextInput</replaces>
    </operator>
    Now it should be easy to find the desired information for any operator you like.

    Regards
    Matthias
  • platanas20
    platanas20 New Altair Community Member
    Hi Colo,

    Thanks for replying but i still have this problem because i dont have this file "OperatorsTextProcessing.xml" in the path you told me.I have the version RM 5.1.008.So if you know something more please help us.

    Also,the file "OperatorsDocTextProcessing.xml" doesn't exist but there is a similar file and its name is "OperatorsCoreDocumentation.xml".

    Thanks again,
    Platanas
  • platanas20
    platanas20 New Altair Community Member
    I want to mention that the operators of text processing are an extension in RM. And the jar files are in a different path. I add the jar file in netbeans but how can i find the suitable classes for the operators that i want to use?

    Thanks again,
    Platanas
  • colo
    colo New Altair Community Member
    Hi Platanas,

    as I mentioned before:
    colo wrote:

    ... (in case of the operators you are looking for, you have to search the text processing plugin source)....
    The files I mentioned are only available if you have the source code for the text processing plugin. If you integrate just the jar file, they are missing. OperatorsDocTextProcessing.xml contains only the operators from the main program.

    If you don't want to download the source of the plugin and provide your email address (private message), I will send you both files you need.

    Regards
    Matthias