victor010's picture
Duplicate from cooelf/Multimodal-CoT
160d3b1
raw
history blame contribute delete
487 Bytes
from abc import abstractmethod
class Parser:
def __init__(self):
pass
@abstractmethod
def _filename(self, index, basename=False, absolute=False):
pass
def filename(self, index, basename=False, absolute=False):
return self._filename(index, basename=basename, absolute=absolute)
def filenames(self, basename=False, absolute=False):
return [self._filename(index, basename=basename, absolute=absolute) for index in range(len(self))]