vendredi 18 mai 2018

How to do a if.... or statement?

I'm using and if to exclude some words that i don´t want to save in my model

if word != 'for' or word != 'an' or word != 'the':
      #do something

but it doesn´t work, the words for, an and they are saved in the model

Also, I tried with comparing the metric of similarity between the words, and if the metric is equal to 100 it doesn't have to be saved, but again there are saved, What is happening?

Aucun commentaire:

Enregistrer un commentaire