Sluethink / app /schemas /plagiarism_schemas.py
topGdev's picture
add ai similarity
a561338
raw
history blame contribute delete
538 Bytes
from pydantic import BaseModel
from typing import List
class MatchDetail(BaseModel):
matched_text: str
similarity: float
source_type: str # "news" or "academic"
source_title: str
source_url: str
class SentenceResult(BaseModel):
original_sentence: str
normalized_sentence: str
match_type: str # "full_sentence", "partial_phrase", "no_match"
matches: List[MatchDetail]
class PlagiarismResponse(BaseModel):
checked_sentences: int
checked_sources: int
results: List[SentenceResult]