mirror of https://github.com/doccano/doccano.git
pythondatasetsactive-learningtext-annotationdatasetnatural-language-processingdata-labelingmachine-learningannotation-tool
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
441 B
14 lines
441 B
from .repositories import BaseRepository
|
|
from .writers import BaseWriter
|
|
|
|
|
|
class ExportApplicationService:
|
|
|
|
def __init__(self, repository: BaseRepository, writer: BaseWriter):
|
|
self.repository = repository
|
|
self.writer = writer
|
|
|
|
def export(self, export_approved=False) -> str:
|
|
records = self.repository.list(export_approved=export_approved)
|
|
filepath = self.writer.write(records)
|
|
return filepath
|