def encodeSentence(self, *words):
        """
        Encode given sentence in API format.

        :param words: Words to endoce.
        :returns: Encoded sentence.
        """
        encoded = map(self.encodeWord, words)
        encoded = b''.join(encoded)
        # append EOS (end of sentence) byte
        encoded += b'\x00'
        return encoded
def encodeSentence ( self , * words ) : encoded = map ( self . encodeWord , words ) encoded = b'' . join ( encoded ) encoded += b'\x00' return encoded
Encode given sentence in API format.

        :param words: Words to endoce.
        :returns: Encoded sentence.