(
        self,
        *,
        lang: Optional[str | Set[str]] = None,
        limit: Optional[int] = None,
    )
Iterate over reocrds in this dataset, optionally filtering by a language,
        and yield text + metadata pairs.

        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,
            and its corresponding metadata.

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

        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,
            and its corresponding metadata.

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