# 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
        options.tagged = tagged
        options.ner = ner
        options.parsed = parsed
        options.lemmatized = lemmatized
        options.skip_tokenization = skip_tokenization

        return options

    def _default_models(
        self, suc_ne_tagger=None, suc_tagger=None,
        ud_tagger=None, lemmatizer=None
    ):
        return {
            "suc_ne_tagger": suc_ne_tagger,
            "suc_tagger": suc_tagger,
            "ud_tagger": ud_tagger,
            "lemmatizer": lemmatizer,
        }

    @patch("swe_pipeline.build_sentences")
    def test_tagging(self, build_sentences_mock):
        options = self._default_options(tagged=True)
        sentence = ["Hej", "mitt", "namn", "är"]
        tags = ["IN", "PS|NEU|SIN|DEF", "NN|NEU|SIN|IND|NOM", "VB|PRS|AKT"]

        tagger = MagicMock()
        tagger.tag.return_value = tags
        models = self._default_models(suc_tagger=tagger)

        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

        options.tagged = tagged
        options.ner = ner
        options.parsed = parsed
        options.lemmatized = lemmatized
        options.skip_tokenization = skip_tokenization

        return options

    def _default_models(
        self, suc_ne_tagger=None, suc_tagger=None,
        ud_tagger=None, lemmatizer=None
    ):
        return {
            "suc_ne_tagger": suc_ne_tagger,
            "suc_tagger": suc_tagger,
            "ud_tagger": ud_tagger,
            "lemmatizer": lemmatizer,
        }

    @patch("swe_pipeline.build_sentences")
    def test_tagging(self, build_sentences_mock):
        options = self._default_options(tagged=True)
        sentence = ["Hej", "mitt", "namn", "är"]
        tags = ["IN", "PS|NEU|SIN|DEF", "NN|NEU|SIN|IND|NOM", "VB|PRS|AKT"]

        tagger = MagicMock()
        tagger.tag.return_value = tags
        models = self._default_models(suc_tagger=tagger)

        self.assertEqual(

            run_tagging_and_lemmatization(options, sentence, models),