def lemmatization_only(self, document):
        # Lemmatization was added after the first so we need to support
        # that a document has all the steps done but lemmatization

        analysis = StanfordAnalysis(self.corenlp.analyse(document.text))
        tokens = analysis.get_tokens()
        if document.tokens != tokens:
            raise ValueError(
                "Document changed since last tokenization, "
                "can't add lemmas to it"
            )
        document.set_lemmatization_result(analysis.get_lemmas())
        document.save()
Run only the lemmatization
dataset/ETHPy150Open machinalis/iepy/iepy/preprocess/stanford_preprocess.py/StanfordPreprocess.lemmatization_only