def word2id(self, xs):
if isinstance(xs, list):<EOL><INDENT>return [self._word2id.get(x, self.UNK) for x in xs]<EOL><DEDENT>return self._word2id.get(xs, self.UNK)<EOL>
Map word(s) to its id(s)

        Parameters
        ----------
        xs : str or list
            word or a list of words

        Returns
        -------
        int or list
            id or a list of ids