Esempio n. 1
0
    def lemmas(self):
        """List of the lemmas in the quote's :attr:`string`.

        Raises
        ------
        ValueError
            If the quote's :attr:`string` is `None`.

        """

        if self.string is None:
            raise ValueError('No string defined on this quote yet, '
                             "lemmas doesn't make sense.")
        from brainscopypaste import tagger
        return tagger.lemmas(self.string)
Esempio n. 2
0
def test_lemmas():
    assert lemmas(sentence) == ('do', "n't", '!', 'i', 'would', "n't", '.',
                                'i', 'have', 'be', 'there', '.', 'the', 'cat',
                                'jump', 'over', 'the', 'fox', 'and', 'eat',
                                'the', 'rat')