src/python/txtai/scoring.py
def create(method):
        """
        Factory method to construct a Scoring object.

        Args:
            method: scoring method (bm25, sif, tfidf)

        Returns:
            Scoring object
        """

        if method == "bm25":
            return BM25()
        elif method == "sif":
            return SIF()
        elif method == "tfidf":
            # Default scoring object implements tf-idf
            return Scoring()

        return None

        Factory method to construct a Scoring object.

        Args:
            method: scoring method (bm25, sif, tfidf)

        Returns:
            Scoring object
        
Factory method to construct a Scoring object.
Factory method to construct a Scoring object .
def create(method):
        if method == "bm25":
            return BM25()
        elif method == "sif":
            return SIF()
        elif method == "tfidf":
            return Scoring()
        return None
def create ( method ) : if method == "bm25" : return BM25 ( ) elif method == "sif" : return SIF ( ) elif method == "tfidf" : return Scoring ( ) return None
Factory method to construct a Scoring object.
Factory method to construct a Scoring object .
"""
        Factory method to construct a Scoring object.

        Args:
            method: scoring method (bm25, sif, tfidf)

        Returns:
            Scoring object
        """ # Default scoring object implements tf-idf
None
method
scoring method (bm25, sif, tfidf)
scoring method ( bm25 sif tfidf )