(
        self,
        *,
        lang: Optional[str | Set[str]] = None,
        limit: Optional[int] = None,
    )
Iterate over records in this dataset, optionally filtering by language,
        and yield texts only.

        Args:
            lang: Filter records by the language in which they're written;
                see :attr:`UDHR.langs`.
            limit: Yield no more than ``limit`` texts that match specified filter.

        Yields:
            Text of the next record in dataset passing filters.

        Raises:
            ValueError: If any filtering options are invalid.
Iterate over records in this dataset, optionally filtering by language,
        and yield texts only.
Iterate over records in this dataset optionally filtering by language and yield texts only .
def texts(
        self,
        *,
        lang: Optional[str | Set[str]] = None,
        limit: Optional[int] = None,
    ) -> Iterable[str]:
        """
        Iterate over records in this dataset, optionally filtering by language,
        and yield texts only.

        Args:
            lang: Filter records by the language in which they're written;
                see :attr:`UDHR.langs`.
            limit: Yield no more than ``limit`` texts that match specified filter.

        Yields:
            Text of the next record in dataset passing filters.

        Raises:
            ValueError: If any filtering options are invalid.
        """
        for record in itertools.islice(self._filtered_iter(lang), limit):
            yield record["text"]
def texts ( self , * , lang : Optional [ str | Set [ str ] ] = None , limit : Optional [ int ] = None , ) -> Iterable [ str ] : for record in itertools . islice ( self . _filtered_iter ( lang ) , limit ) : yield record [ "text" ]