(self, answer)
return vector
Create one-hot representation of an answer.

        Arguments:
            answer (string) : The word answer.

        Returns:
            list : One-hot representation of answer.
Create one-hot representation of an answer.
Create one - hot representation of an answer .
def one_hot_vector(self, answer):
        """
        Create one-hot representation of an answer.

        Arguments:
            answer (string) : The word answer.

        Returns:
            list : One-hot representation of answer.
        """
        vector = np.zeros(self.vocab_size)
        vector[self.word_to_index[answer]] = 1
        return vector
def one_hot_vector ( self , answer ) : vector = np . zeros ( self . vocab_size ) vector [ self . word_to_index [ answer ] ] = 1 return vector