from typing import List, Optional, Tuple

from pydantic import BaseModel


class EntityNerResponseModel(BaseModel):
    entity_group: str
    word: str
    start: int
    end: int
    score: float


class EntityOIEResponseModel(BaseModel):
    score: str
    relation: str
    arg1: str
    arg2: str


class BaseResponse(BaseModel):
    id: int
    status: str


class ResponseNerModel(BaseModel):
    progression: str
    result: Optional[List[List[EntityNerResponseModel]]]


class ResponseSummaryModel(BaseModel):
    progression: str
    result: Optional[List[str]]


class ResponseOIEModel(BaseModel):
    progression: str
    result: Optional[List[EntityOIEResponseModel]]


class ResponseNREModel(BaseModel):
    progression: str
    result: Optional[List[Tuple[str, float]]]
