"Text similarity"

Twoh
Twoh New Altair Community Member
edited November 5 in Community Q&A
Hello,
In my project i have to analyze similarity between text files and a file which contains list of words.

Does anyone know how to model this? I’ve tried it with 'Cross Distance Operator' but it doesn't work somehow.

Thanks

Answers

  • land
    land New Altair Community Member
    Hi, you can do the following:
    Read the word list using a Process Documents Operator with an inner Tokenize operator. Then forward the resulting word list to another Process Documents Operator with an inner Tokenize operator that processes all the text files. You can finally connect both outcoming examplesets with the cross distance operator and select cosine similarity, since it is most appropriate for this.

    Good Luck!

    Greetings,
    Sebastian
  • Twoh
    Twoh New Altair Community Member
    Many thanks, it works. I now have only 0-values in the ‘distance’-row, even if I process two identical files. Do you have any idea why?
  • land
    land New Altair Community Member
    Hi,
    if you compare two identical vectors, a distance of zero is something that I would expect...

    Greetings,
    Sebastian