# Path: swe_pipeline.py
# def run_tagging_and_lemmatization(options, sentence, models):
#     lemmas = []
#     ud_tags_list = []
#     suc_tags_list = models["suc_tagger"].tag(sentence)
#     suc_ne_list = []
# 
#     if options.lemmatized:
#         lemmas = [
#             models["lemmatizer"].predict(token, tag)
#             for token, tag in zip(sentence, suc_tags_list)
#         ]
#         ud_tags_list = models["ud_tagger"].tag(sentence, lemmas, suc_tags_list)
# 
#         if options.ner:
#             suc_ne_list = models["suc_ne_tagger"].tag(
#                 list(zip(sentence, lemmas, suc_tags_list))
#             )
# 
#     return lemmas, ud_tags_list, suc_tags_list, suc_ne_list


from swe_pipeline import run_tagging_and_lemmatization
from unittest.mock import patch, MagicMock
import unittest
            )
        )

    @patch("swe_pipeline.build_sentences")
    def test_tagging_and_lemmatization(self, build_sentences_mock):
        options = self._default_options(tagged=True, lemmatized=True)
        sentence = ["Hej", "mitt", "namn", "är"]
        suc_tags = ["IN", "PS|NEU|SIN|DEF", "NN|NEU|SIN|IND|NOM", "VB|PRS|AKT"]
        ud_tags = [
            "INTJ|_",
            "DET|Definite=Def|Gender=Neut|Number=Sing|Poss=Yes",
            "NOUN|Case=Nom|Definite=Ind|Gender=Neut|Number=Sing",
            "AUX|Mood=Ind|Tense=Pres|VerbForm=Fin|Voice=Act",
        ]
        lemmas = ["hej", "min", "namn", "vara"]

        suc_tagger = MagicMock()
        suc_tagger.tag.return_value = suc_tags
        ud_tagger = MagicMock()
        ud_tagger.tag.return_value = ud_tags
        lemmatizer = MagicMock()
        lemmatizer.predict.side_effect = lemmas

        models = self._default_models(
            suc_tagger=suc_tagger,
            ud_tagger=ud_tagger,
            lemmatizer=lemmatizer,
        )

        self.assertEqual(

# Path: swe_pipeline.py
# def run_tagging_and_lemmatization(options, sentence, models):
#     lemmas = []
#     ud_tags_list = []
#     suc_tags_list = models["suc_tagger"].tag(sentence)
#     suc_ne_list = []
# 
#     if options.lemmatized:
#         lemmas = [
#             models["lemmatizer"].predict(token, tag)
#             for token, tag in zip(sentence, suc_tags_list)
#         ]
#         ud_tags_list = models["ud_tagger"].tag(sentence, lemmas, suc_tags_list)
# 
#         if options.ner:
#             suc_ne_list = models["suc_ne_tagger"].tag(
#                 list(zip(sentence, lemmas, suc_tags_list))
#             )
# 
#     return lemmas, ud_tags_list, suc_tags_list, suc_ne_list


# Path: tests/test_pipeline_run_tagging.py
from swe_pipeline import run_tagging_and_lemmatization
from unittest.mock import patch, MagicMock
import unittest

            )
        )

    @patch("swe_pipeline.build_sentences")
    def test_tagging_and_lemmatization(self, build_sentences_mock):
        options = self._default_options(tagged=True, lemmatized=True)
        sentence = ["Hej", "mitt", "namn", "är"]
        suc_tags = ["IN", "PS|NEU|SIN|DEF", "NN|NEU|SIN|IND|NOM", "VB|PRS|AKT"]
        ud_tags = [
            "INTJ|_",
            "DET|Definite=Def|Gender=Neut|Number=Sing|Poss=Yes",
            "NOUN|Case=Nom|Definite=Ind|Gender=Neut|Number=Sing",
            "AUX|Mood=Ind|Tense=Pres|VerbForm=Fin|Voice=Act",
        ]
        lemmas = ["hej", "min", "namn", "vara"]

        suc_tagger = MagicMock()
        suc_tagger.tag.return_value = suc_tags
        ud_tagger = MagicMock()
        ud_tagger.tag.return_value = ud_tags
        lemmatizer = MagicMock()
        lemmatizer.predict.side_effect = lemmas

        models = self._default_models(
            suc_tagger=suc_tagger,
            ud_tagger=ud_tagger,
            lemmatizer=lemmatizer,
        )

        self.assertEqual(

            run_tagging_and_lemmatization(options, sentence, models),