(
        self, tokenized_docs: Iterable[Iterable[str]], grps: Iterable[str]
    )
return self
Count terms in ``tokenized_docs`` and, if not already provided, build up
        a vocabulary based those terms; do the same for the groups in ``grps``.
        Fit and store global weights (IDFs) and, if needed for term weighting,
        the average document length.

        Args:
            tokenized_docs: A sequence of tokenized documents, where each is
                a sequence of term strings. For example::

                    >>> ([tok.lemma_ for tok in spacy_doc]
                    ...  for spacy_doc in spacy_docs)
                    >>> ((ne.text for ne in extract.entities(doc))
                    ...  for doc in corpus)

            grps: Sequence of group names by which the terms in ``tokenized_docs``
                are aggregated, where the first item in ``grps`` corresponds to
                the first item in ``tokenized_docs``, and so on.

        Returns:
            GroupVectorizer instance that has just been fit.
Count terms in ``tokenized_docs`` and, if not already provided, build up
        a vocabulary based those terms; do the same for the groups in ``grps``.
        Fit and store global weights (IDFs) and, if needed for term weighting,
        the average document length.
Count terms in tokenized_docs and if not already provided build up a vocabulary based those terms ; do the same for the groups in grps . Fit and store global weights ( IDFs ) and if needed for term weighting the average document length .
def fit(
        self, tokenized_docs: Iterable[Iterable[str]], grps: Iterable[str]
    ) -> "GroupVectorizer":
        """
        Count terms in ``tokenized_docs`` and, if not already provided, build up
        a vocabulary based those terms; do the same for the groups in ``grps``.
        Fit and store global weights (IDFs) and, if needed for term weighting,
        the average document length.

        Args:
            tokenized_docs: A sequence of tokenized documents, where each is
                a sequence of term strings. For example::

                    >>> ([tok.lemma_ for tok in spacy_doc]
                    ...  for spacy_doc in spacy_docs)
                    >>> ((ne.text for ne in extract.entities(doc))
                    ...  for doc in corpus)

            grps: Sequence of group names by which the terms in ``tokenized_docs``
                are aggregated, where the first item in ``grps`` corresponds to
                the first item in ``tokenized_docs``, and so on.

        Returns:
            GroupVectorizer instance that has just been fit.
        """
        _ = self._fit(tokenized_docs, grps)
        return self
def fit ( self , tokenized_docs : Iterable [ Iterable [ str ] ] , grps : Iterable [ str ] ) -> "GroupVectorizer" : _ = self . _fit ( tokenized_docs , grps ) return self