Esempio n. 1
0
class ExportJob(BaseEntity):
    export_job_id = db.Column(db.Integer(), primary_key=True)
    doc_type_id = db.Column(db.Integer(),
                            db.ForeignKey('doc_type.doc_type_id'),
                            nullable=False)
    export_file_path = db.Column(db.String(255), default="")
    export_job_status = db.Column(db.Integer(),
                                  db.ForeignKey("status.status_id"),
                                  nullable=False)
    export_mark_job_ids = db.Column(db.JSON(), default=[])
    export_predict_job_ids = db.Column(db.JSON(), default=[])
Esempio n. 2
0
class MarkJob(BaseEntity):
    mark_job_id = db.Column(db.Integer(), primary_key=True)
    doc_type_id = db.Column(db.Integer(),
                            db.ForeignKey("doc_type.doc_type_id"),
                            nullable=False)
    mark_job_name = db.Column(db.String(255), nullable=False)
    mark_job_desc = db.Column(db.Text(), default="")
    mark_job_type = db.Column(db.Enum(FileTypeEnum),
                              nullable=False)  # text, e_doc, ocr
    mark_job_status = db.Column(db.Integer(),
                                db.ForeignKey("status.status_id"),
                                default=int(StatusEnum.processing))
    annotator_ids = db.Column(db.JSON(), default=[])
    reviewer_ids = db.Column(db.JSON(), default=[])
    assign_mode = db.Column(db.Enum(AssignModeEnum),
                            nullable=False)  # average,
class CustomAlgorithm(BaseEntity):
    custom_algorithm_id = db.Column(db.Integer(), primary_key=True)
    custom_algorithm_alias = db.Column(db.String(100), nullable=False)
    custom_algorithm_name = db.Column(db.String(100), nullable=False)
    custom_algorithm_desc = db.Column(db.String(256), default="")
    custom_algorithm_ip = db.Column(db.String(256), nullable=False)
    custom_algorithm_predict_port = db.Column(db.Integer(), nullable=False)
    custom_algorithm_evaluate_port = db.Column(db.Integer(), nullable=False)
    custom_algorithm_config = db.Column(db.JSON(), default={})
    custom_algorithm_status = db.Column(db.Integer(),
                                        db.ForeignKey("status.status_id"),
                                        nullable=False)
    nlp_task_id = db.Column(db.Integer(),
                            db.ForeignKey("nlp_task.nlp_task_id"),
                            nullable=False)
    preprocess = db.Column(db.JSON(), default={"split_by_sentence":
                                               True})  # 抽取:短文本
Esempio n. 4
0
class UserTask(BaseEntity):
    user_task_id = db.Column(db.Integer(), primary_key=True)
    mark_task_id = db.Column(db.Integer(),
                             db.ForeignKey('mark_task.mark_task_id'),
                             nullable=False)
    annotator_id = db.Column(db.Integer(), nullable=False)
    user_task_result = db.Column(db.JSON(), default={})
    user_task_status = db.Column(db.Integer(),
                                 db.ForeignKey("status.status_id"),
                                 default=int(StatusEnum.processing))
Esempio n. 5
0
class EvaluateTask(BaseEntity):
    evaluate_task_id = db.Column(db.Integer(), primary_key=True)
    evaluate_task_name = db.Column(db.String(256), nullable=False)
    evaluate_task_desc = db.Column(db.Text(), default="")
    evaluate_task_status = db.Column(db.Integer(),
                                     db.ForeignKey("status.status_id"),
                                     nullable=False)
    evaluate_task_result = db.Column(db.JSON(), default={})
    train_task_id = db.Column(db.Integer(),
                              db.ForeignKey("train_task.train_task_id"),
                              nullable=False)
Esempio n. 6
0
class PredictTask(BaseEntity):
    predict_task_id = db.Column(db.Integer(), primary_key=True)
    doc_id = db.Column(db.Integer(),
                       db.ForeignKey("doc.doc_id"),
                       nullable=False)
    predict_task_status = db.Column(db.Integer(),
                                    db.ForeignKey("status.status_id"),
                                    nullable=False)
    predict_task_result = db.Column(db.JSON(), default={})
    predict_job_id = db.Column(db.Integer(),
                               db.ForeignKey("predict_job.predict_job_id"),
                               nullable=False)
Esempio n. 7
0
class TrainTask(BaseEntity):
    train_task_id = db.Column(db.Integer(), primary_key=True)
    train_model_name = db.Column(db.String(256), nullable=False)
    train_model_desc = db.Column(db.Text(), default="")
    train_config = db.Column(db.JSON(), default={})
    train_status = db.Column(db.Integer(),
                             db.ForeignKey("status.status_id"),
                             nullable=False)
    model_version = db.Column(db.String(256), default="")
    train_job_id = db.Column(db.Integer(),
                             db.ForeignKey("train_job.train_job_id"),
                             nullable=False)
Esempio n. 8
0
class TrainJob(BaseEntity):
    train_job_id = db.Column(db.Integer(), primary_key=True)
    train_job_name = db.Column(db.String(256), nullable=False)
    train_job_status = db.Column(db.Integer(),
                                 db.ForeignKey("status.status_id"),
                                 nullable=False)
    train_job_desc = db.Column(db.Text(), default="")
    doc_type_id = db.Column(db.Integer(),
                            db.ForeignKey("doc_type.doc_type_id"),
                            nullable=False)
    preprocess = db.Column(db.JSON(), default={"split_by_sentence":
                                               True})  # 抽取:短文本
Esempio n. 9
0
class MarkTask(BaseEntity):
    mark_task_id = db.Column(db.Integer(), primary_key=True)
    mark_job_id = db.Column(db.Integer(), db.ForeignKey('mark_job.mark_job_id'), nullable=False)
    doc_id = db.Column(db.Integer(), db.ForeignKey('doc.doc_id'), nullable=False)
    mark_task_result = db.Column(db.JSON(), default={})
    mark_task_status = db.Column(db.Integer(), db.ForeignKey("status.status_id"), default=int(StatusEnum.processing))
class ClassifyDocRule(BaseEntity):
    classify_rule_id = db.Column(db.Integer(), primary_key=True)
    rule_type = db.Column(db.String(255), nullable=False)
    rule_content = db.Column(db.JSON(), default={})
    doc_term_id = db.Column(db.Integer(), db.ForeignKey("doc_term.doc_term_id"), nullable=False)
    is_active = db.Column(db.Boolean(), default=True)