def groundedness_measure_with_nli(
        self, source: str, statement: str
    ) -> Tuple[float, dict]:
        """
        A measure to track if the source material supports each sentence in the statement using an NLI model.

        First the response will be split into statements using a sentence tokenizer.The NLI model will process each statement using a natural language inference model, and will use the entire source.

        Example:
            ```
            from trulens.core import Feedback
            from trulens.providers.huggingface import Huggingface

            huggingface_provider = Huggingface()

            f_groundedness = (
                Feedback(huggingface_provider.groundedness_measure_with_nli)
                .on(context)
                .on_output()
            ```

        Args:
            source (str): The source that should support the statement
            statement (str): The statement to check groundedness

        Returns:
            Tuple[float, str]: A tuple containing a value between 0.0 (not grounded) and 1.0 (grounded) and a string containing the reasons for the evaluation.
        """
        nltk.download("punkt_tab", quiet=True)
        groundedness_scores = {}

        reasons_str = ""
        if isinstance(source, list):
            source = " ".join(map(str, source))
        hypotheses = sent_tokenize(statement)
        for i, hypothesis in enumerate(hypotheses):
            score = self._doc_groundedness(
                premise=source, hypothesis=hypothesis
            )
            reasons_str = reasons_str + str.format(
                feedback_prompts.GROUNDEDNESS_REASON_TEMPLATE,
                statement_sentence=hypothesis,
                supporting_evidence="[Doc NLI Used full source]",
                score=score * 10,
            )
            groundedness_scores[f"statement_{i}"] = score
        average_groundedness_score = float(
            np.mean(list(groundedness_scores.values()))
        )
        return average_groundedness_score, {"reasons": reasons_str}

        A measure to track if the source material supports each sentence in the statement using an NLI model.

        First the response will be split into statements using a sentence tokenizer.The NLI model will process each statement using a natural language inference model, and will use the entire source.

        Example:
            ```
            from trulens.core import Feedback
            from trulens.providers.huggingface import Huggingface

            huggingface_provider = Huggingface()

            f_groundedness = (
                Feedback(huggingface_provider.groundedness_measure_with_nli)
                .on(context)
                .on_output()
            ```

        Args:
            source (str): The source that should support the statement
            statement (str): The statement to check groundedness

        Returns:
            Tuple[float, str]: A tuple containing a value between 0.0 (not grounded) and 1.0 (grounded) and a string containing the reasons for the evaluation.
        
src/providers/huggingface/trulens/providers/huggingface/provider.py