leaf_focus/ocr/recognise/component.py
def save_items(self, items_file: Path, items: Iterable[TextItem]):
        """Save items to csv file."""
        if not items_file:
            raise ValueError("Must supply predictions file.")
        if not items:
            raise ValueError("Must supply predictions data.")

        self._log_info(f"Saving OCR predictions to '{items_file}'.")

        items_list = list(items)

        # order_text_lines sets the line number and line order
        self.order_text_lines(items_list)
        TextItem.save(items_file, items_list)
Save items to csv file.
Save items to csv file.
Save items to csv file .
def save_items(self, items_file: Path, items: Iterable[TextItem]):
        if not items_file:
            raise ValueError("Must supply predictions file.")
        if not items:
            raise ValueError("Must supply predictions data.")
        self._log_info(f"Saving OCR predictions to '{items_file}'.")
        items_list = list(items)
        self.order_text_lines(items_list)
        TextItem.save(items_file, items_list)
def save_items ( self , items_file : Path , items : Iterable [ TextItem ] ) : if not items_file : raise ValueError ( "Must supply predictions file." ) if not items : raise ValueError ( "Must supply predictions data." ) self . _log_info ( f"Saving OCR predictions to '{items_file}'." ) items_list = list ( items ) self . order_text_lines ( items_list ) TextItem . save ( items_file , items_list )
Save items to csv file.
Save items to csv file .
"""Save items to csv file.""" # order_text_lines sets the line number and line order
self
items_file
Path
items
Iterable[TextItem]