def word_to_id(self, word):
        """Returns the integer word id of a word string."""
        if word in self.vocab:
            return self.vocab[word]
        else:
            return self.unk_id
def word_to_id(self, word):
        
        if word in self.vocab:
            return self.vocab[word]
        else:
            return self.unk_id
def word_to_id ( self , word ) : if word in self . vocab : return self . vocab [ word ] else : return self . unk_id
Returns the integer word id of a word string.
Returns the integer word id of a word string .