mirror of https://github.com/doccano/doccano.git
pythonannotation-tooldatasetsactive-learningtext-annotationdatasetnatural-language-processingdata-labelingmachine-learning
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
440 B
14 lines
440 B
from .repositories import BaseRepository
|
|
from .writer 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
|