create a function

HKI
HKI New Altair Community Member
edited November 2024 in Community Q&A

Hi the comunity,

I would like to realize a Function or Macro in which I would pass in parameter the text of a range that I read in an excel file (I should loop) in this function I should replace the accent characters (Â, Ê, Î, Ô, Û, Ä, Ë, Ï, Ö) with capital letters without accent. how to do. the idea is that we are many to use this process or macro in the team.

Can u have an example in RapidMiner Studio?

thank's for helping.

 

 

Tagged:

Best Answer

  • sgenzer
    sgenzer
    Altair Employee
    Answer ✓

    hello @HKI - yes I understand what you mean.  RapidMiner's operators are functions; they just look pretty in boxes.  If you have an operator that you want to "call" over and over again, you can either save it as a "buildingblock" (right-click on operator and save as buildingblock) or connect the input port of Replace to the input port of the process, and the output port of Replace to the output port of the process and save it as a process.  Then drop this process in another process and it will run as I think you want.  Maybe this makes sense:

     

    Screen Shot 2017-10-13 at 4.41.22 PM.pngsave this process as "replace"                        Screen Shot 2017-10-13 at 4.42.25 PM.pngdrop the "replace" process into your new process

     

    Scott

     

Answers

  • sgenzer
    sgenzer
    Altair Employee

    hello @HKI - welcome to the community.  Have you tried just using the Replace operator for each accented letter?  That would be my first method to try.


    Scott

     

  • HKI
    HKI New Altair Community Member
    Viens Scott,
    Thani's for answering.
    I have use replace all E accent in generates attributes, but i need to create a function. Me and my colleags read and work with many different excel files and thoses files uses differents data in differents ranges or colomns, the idea is to call a process (function) with parameters, the parameters in entries is the text in my file,.
    Ex:
    Data in: PARAMÈTRE
    Processaccent(PARAMÈTRE)--> data out PARAMETRE
    Exemple 2: MARGÖT TÊTE
    Résult : MARGOT TETE
    I hope it's clear
  • sgenzer
    sgenzer
    Altair Employee
    Answer ✓

    hello @HKI - yes I understand what you mean.  RapidMiner's operators are functions; they just look pretty in boxes.  If you have an operator that you want to "call" over and over again, you can either save it as a "buildingblock" (right-click on operator and save as buildingblock) or connect the input port of Replace to the input port of the process, and the output port of Replace to the output port of the process and save it as a process.  Then drop this process in another process and it will run as I think you want.  Maybe this makes sense:

     

    Screen Shot 2017-10-13 at 4.41.22 PM.pngsave this process as "replace"                        Screen Shot 2017-10-13 at 4.42.25 PM.pngdrop the "replace" process into your new process

     

    Scott

     

  • HKI
    HKI New Altair Community Member

    Hi scott,

    thank's so much for your help. i have create un new process with replace and it' work's better.

    I use this process in a different other process.

    thank you.

    Capture.PNG