"a bug while getting the token in arabic"

RaedMarji
RaedMarji New Altair Community Member
edited November 5 in Community Q&A
Hello,

Im trying to compare a word I get as a token and a word that is hardcoded in a dictionary but the result is always false. even though when printed to the log it shows the same word Im looking for I dont know what Im missing and I dont know how to debug this. I just tried to get the bytes for the token and the bytes for the preset word and they are different so why is this happening with me considering that it runs perfectly in english.

is there a flag I should set to support UTF8?

Answers

  • Marco_Boeck
    Marco_Boeck New Altair Community Member
    Hi,

    the description is a bit vague. Did you set your process encoding to UTF-8 (click the empty white space of your process in the RapidMiner GUI and select UTF-8 as encoding parameter.

    Regards,
    Marco
  • RaedMarji
    RaedMarji New Altair Community Member
    I tried what you said but I dont think the problem is in the encoding of the process as i used the remove stop words operator and it gave the expected results but when I use my own operator which is very similar to the remove stopwords in arabic operator it doesnt detect the tokens coming from the token sequence. so i was wondering if somthing that needs to be set in my java code to make this work.

    a sample usecase
    if (token.contains("arabic_word") then remove it

    when I print the token text it show the same value as the "arabic_word" but they are not equal when they are compared in the operator.

    this problem is specific to rapidminer because I wrote my code first in java and it worked just find but when I changed the source of the word from the tokens it started to give wrong results.