Grammarly-Checking / models.py
darkbreakerk's picture
Upload 7 files
20de665 verified
raw
history blame contribute delete
432 Bytes
from pydantic import BaseModel
from typing import List, Optional
class Error(BaseModel):
"""Model for individual grammar errors."""
before: str
after: str
explanation: str
class Grammar(BaseModel):
"""Model for grammar check results."""
spelling: List[Error]
punctuation: List[Error]
grammar: List[Error]
file_path: Optional[str] = None
corrected_text: Optional[str] = None