# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel


class Analysis(UniversalBaseModel):
    clarity_score: typing.Optional[float] = None
    word_count: typing.Optional[int] = None
    sentence_count: typing.Optional[int] = None
    avg_word_length: typing.Optional[float] = None
    avg_sentence_length: typing.Optional[float] = None
    flesch_reading_ease: typing.Optional[float] = None
    flesch_kincaid_grade: typing.Optional[float] = None
    lexical_diversity: typing.Optional[float] = None
    vocabulary_complexity: typing.Optional[float] = None
    sentence_complexity: typing.Optional[float] = None
    tone_score: typing.Optional[float] = None
    informality_score: typing.Optional[float] = None
    liveliness_score: typing.Optional[float] = None
    target_informality: typing.Optional[float] = None
    target_liveliness: typing.Optional[float] = None
    informality_tolerance: typing.Optional[float] = None
    liveliness_tolerance: typing.Optional[float] = None

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
