Generate sentence from the parts.

        :return: Sentence.

def generate_sentence(self) -> str:
        """Generate sentence from the parts.

        :return: Sentence.
        """
        sentences = self._data['sentence']
        sentence = [
            self.random.choice(sentences[k]) for k
            in ('head', 'p1', 'p2', 'tail')
        ]
        return '{0} {1} {2} {3}'.format(*sentence)