diff --git a/DashAI/back/api/api_v1/endpoints/predict.py b/DashAI/back/api/api_v1/endpoints/predict.py index 5281d74f5c..74aa2fa3d5 100644 --- a/DashAI/back/api/api_v1/endpoints/predict.py +++ b/DashAI/back/api/api_v1/endpoints/predict.py @@ -670,8 +670,8 @@ async def preview_manual_prediction( raise HTTPException( status_code=status.HTTP_422_UNPROCESSABLE_ENTITY, detail=( - "manual_input_data must be a non-empty JSON array " - "of objects (list[dict])." + "manual_input_data must be a JSON array with at least " + "one object (list[dict])." ), ) diff --git a/DashAI/back/converters/hugging_face/text_embedding/e5_mistral_gguf.py b/DashAI/back/converters/hugging_face/text_embedding/e5_mistral_gguf.py index db017868cb..a2bb384c08 100644 --- a/DashAI/back/converters/hugging_face/text_embedding/e5_mistral_gguf.py +++ b/DashAI/back/converters/hugging_face/text_embedding/e5_mistral_gguf.py @@ -169,7 +169,7 @@ def _local_gguf_path(cls) -> pathlib.Path: f"{cls.__name__} could not find a downloaded GGUF file for repo " f"{cls.MODEL_NAME!r} in '{repo_dir}' matching GGUF_PATTERN " f"{cls.GGUF_PATTERN!r}. The download is missing or incomplete; " - "re-download the component before using it." + "download the component again before using it." ) return matches[0] diff --git a/DashAI/back/converters/imbalanced_learn/random_under_sampler_converter.py b/DashAI/back/converters/imbalanced_learn/random_under_sampler_converter.py index 9e45f07895..5c8b992eb8 100644 --- a/DashAI/back/converters/imbalanced_learn/random_under_sampler_converter.py +++ b/DashAI/back/converters/imbalanced_learn/random_under_sampler_converter.py @@ -99,7 +99,7 @@ class RandomUnderSamplerConverter( DISPLAY_NAME = MultilingualString( en="Random Under-Sampler", es="Submuestreador Aleatorio", - pt="Sub-amostrador Aleatório", + pt="Subamostrador Aleatório", de="Zufälliger Unterabtaster", zh="随机欠采样器", ) diff --git a/DashAI/back/converters/imbalanced_learn/smote_converter.py b/DashAI/back/converters/imbalanced_learn/smote_converter.py index 6685324f24..88b6ae3588 100644 --- a/DashAI/back/converters/imbalanced_learn/smote_converter.py +++ b/DashAI/back/converters/imbalanced_learn/smote_converter.py @@ -102,8 +102,8 @@ class SMOTEConverter(SamplingConverter, ImbalancedLearnWrapper, SMOTE): ) DISPLAY_NAME = MultilingualString( en="SMOTE (Oversampling)", - es="SMOTE (Sobre-muestreo)", - pt="SMOTE (Super-amostragem)", + es="SMOTE (Sobremuestreo)", + pt="SMOTE (Superamostragem)", de="SMOTE (Überabtastung)", zh="SMOTE(过采样)", ) diff --git a/DashAI/back/converters/imbalanced_learn_wrapper.py b/DashAI/back/converters/imbalanced_learn_wrapper.py index 77cbda0599..bd01af92d7 100644 --- a/DashAI/back/converters/imbalanced_learn_wrapper.py +++ b/DashAI/back/converters/imbalanced_learn_wrapper.py @@ -91,7 +91,8 @@ def fit(self, x: "DashAIDataset", y: "DashAIDataset") -> Type[BaseConverter]: if y is None or len(y) == 0: raise ValueError( - "Imbalanced-learn samplers require a non-empty target dataset (y)." + "Imbalanced-learn samplers require a target dataset (y) with at least " + "one row." ) self._input_types = dict(x.types) diff --git a/DashAI/back/converters/scikit_learn/additive_chi_2_sampler.py b/DashAI/back/converters/scikit_learn/additive_chi_2_sampler.py index c87a6a0b90..ad4a2f196d 100644 --- a/DashAI/back/converters/scikit_learn/additive_chi_2_sampler.py +++ b/DashAI/back/converters/scikit_learn/additive_chi_2_sampler.py @@ -87,7 +87,7 @@ class AdditiveChi2Sampler( DISPLAY_NAME = MultilingualString( en="Additive Chi² Sampler", es="Muestreador Chi² Aditivo", - pt="Amostrador Qui-2 Aditivo", + pt="Amostrador Qui² Aditivo", de="Additiver Chi²-Stichprobennehmer", zh="加性卡方采样器", ) diff --git a/DashAI/back/converters/scikit_learn/fast_ica.py b/DashAI/back/converters/scikit_learn/fast_ica.py index 71ba72dccd..048f789b48 100644 --- a/DashAI/back/converters/scikit_learn/fast_ica.py +++ b/DashAI/back/converters/scikit_learn/fast_ica.py @@ -59,7 +59,26 @@ class FastICASchema(BaseSchema): whiten: schema_field( none_type( union_type( - enum_field(["arbitrary-variance", "unit-variance"]), bool_field() + enum_field( + ["arbitrary-variance", "unit-variance"], + labels={ + "arbitrary-variance": MultilingualString( + en="Arbitrary variance", + es="Varianza arbitraria", + pt="Variância arbitrária", + de="Beliebige Varianz", + zh="任意方差", + ), + "unit-variance": MultilingualString( + en="Unit variance", + es="Varianza unitaria", + pt="Variância unitária", + de="Einheitsvarianz", + zh="单位方差", + ), + }, + ), + bool_field(), ) ), "unit-variance", @@ -81,12 +100,12 @@ class FastICASchema(BaseSchema): ), es=( "Forma funcional de la función G utilizada en la aproximación " - "a la neg-entropía." + "a la neguentropía." ), - pt=("Forma funcional da função G usada na aproximação da neg-entropia."), + pt=("Forma funcional da função G usada na aproximação da negentropia."), de=( "Funktionale Form der G-Funktion, die bei der Annäherung an " - "Neg-Entropie verwendet wird." + "Negentropie verwendet wird." ), zh="用于近似负熵的 G 函数的函数形式。", ), diff --git a/DashAI/back/converters/scikit_learn/knn_imputer.py b/DashAI/back/converters/scikit_learn/knn_imputer.py index 4697f5666a..8a29abdaa6 100644 --- a/DashAI/back/converters/scikit_learn/knn_imputer.py +++ b/DashAI/back/converters/scikit_learn/knn_imputer.py @@ -119,14 +119,14 @@ class KNNImputer(BasicPreprocessingConverter, SklearnWrapper, KNNImputerOperatio en=("Imputation for completing missing values using k-Nearest Neighbors."), es=( "Imputación para completar valores faltantes utilizando " - "k-Vecinos Más Cercanos." + "k Vecinos Más Cercanos." ), pt=( "Imputação para completar valores ausentes utilizando " "k-Vizinhos Mais Próximos." ), de=( - "Imputation zum Vervollständigen fehlender Werte mithilfe von k-nächsten " + "Imputation zum Vervollständigen fehlender Werte mithilfe von k nächsten " "Nachbarn." ), zh="使用 k 近邻算法完成缺失值插补。", diff --git a/DashAI/back/converters/scikit_learn/label_encoder.py b/DashAI/back/converters/scikit_learn/label_encoder.py index c93c9b853b..987a3cc24d 100644 --- a/DashAI/back/converters/scikit_learn/label_encoder.py +++ b/DashAI/back/converters/scikit_learn/label_encoder.py @@ -88,7 +88,7 @@ class LabelEncoder(EncodingConverter, SklearnWrapper): en="Label Encoder", es="Codificador de Etiquetas", pt="Codificador de Rótulos", - de="Zielgrößen-Kodierer", + de="Zielgrößenkodierer", zh="标签编码器", ) IMAGE_PREVIEW = "label_encoder.png" diff --git a/DashAI/back/converters/scikit_learn/missing_indicator.py b/DashAI/back/converters/scikit_learn/missing_indicator.py index a941f6320a..409cabf0a7 100644 --- a/DashAI/back/converters/scikit_learn/missing_indicator.py +++ b/DashAI/back/converters/scikit_learn/missing_indicator.py @@ -70,7 +70,7 @@ class MissingIndicator( en="Missing Indicator", es="Indicador de Faltantes", pt="Indicador de Valores Ausentes", - de="Fehlender-Wert-Indikator", + de="Indikator für fehlende Werte", zh="缺失值指示器", ) IMAGE_PREVIEW = "missing_indicator.png" diff --git a/DashAI/back/converters/scikit_learn/normalizer.py b/DashAI/back/converters/scikit_learn/normalizer.py index 845ffab2b4..d8c54a84a0 100644 --- a/DashAI/back/converters/scikit_learn/normalizer.py +++ b/DashAI/back/converters/scikit_learn/normalizer.py @@ -23,11 +23,12 @@ class NormalizerSchema(BaseSchema): enum_field(["l1", "l2", "max"]), "l2", description=MultilingualString( - en="The norm to use to normalize each non-zero sample.", + en="The norm to use to normalize each nonzero sample.", es="La norma a usar para normalizar cada muestra no nula.", pt="A norma a usar para normalizar cada amostra não nula.", de=( - "Die Norm, die zur Normalisierung jeder nicht-null Stichprobe verwendet" + "Die Norm, die zur Normalisierung jeder von null verschiedenen " + "Stichprobe verwendet" "wird." ), zh="用于归一化每个非零样本的范数。", diff --git a/DashAI/back/converters/scikit_learn/pca.py b/DashAI/back/converters/scikit_learn/pca.py index 1939338253..ec2d019a59 100644 --- a/DashAI/back/converters/scikit_learn/pca.py +++ b/DashAI/back/converters/scikit_learn/pca.py @@ -262,8 +262,8 @@ class PCA( "dados complexos conservando o máximo de variabilidade possível." ), de=( - "Hauptkomponentenanalyse (PCA) ist eine Dimensionsreduktions-" - "technik, die zur Vereinfachung komplexer Datensätze verwendet wird, " + "Hauptkomponentenanalyse (PCA) ist eine Dimensionsreduktionstechnik, " + "die zur Vereinfachung komplexer Datensätze verwendet wird, " "während so viel Variabilität wie möglich erhalten bleibt." ), zh=( diff --git a/DashAI/back/converters/scikit_learn/rbf_sampler.py b/DashAI/back/converters/scikit_learn/rbf_sampler.py index d0f328a9e9..a57bcde578 100644 --- a/DashAI/back/converters/scikit_learn/rbf_sampler.py +++ b/DashAI/back/converters/scikit_learn/rbf_sampler.py @@ -54,7 +54,7 @@ class RBFSamplerSchema(BaseSchema): 0, description=MultilingualString( en=( - "Pseudo-random number generator to control the generation of the " + "Pseudorandom number generator to control the generation of the " "random weights and random offset when fitting the training data. " "Pass an int for reproducible output across multiple function calls." ), diff --git a/DashAI/back/converters/scikit_learn/select_k_best.py b/DashAI/back/converters/scikit_learn/select_k_best.py index 14601934cf..e5baeca94d 100644 --- a/DashAI/back/converters/scikit_learn/select_k_best.py +++ b/DashAI/back/converters/scikit_learn/select_k_best.py @@ -79,7 +79,7 @@ class SelectKBest(FeatureSelectionConverter, SklearnWrapper, SelectKBestOperatio en="Select K Best", es="Seleccionar K Mejores", pt="Seleção K Melhores", - de="K-Beste Auswahl", + de="Auswahl der K besten", zh="K 最优特征选择", ) IMAGE_PREVIEW = "select_k_best.png" diff --git a/DashAI/back/converters/scikit_learn/select_percentile.py b/DashAI/back/converters/scikit_learn/select_percentile.py index 7054e237e7..afa6c149f3 100644 --- a/DashAI/back/converters/scikit_learn/select_percentile.py +++ b/DashAI/back/converters/scikit_learn/select_percentile.py @@ -80,7 +80,7 @@ class SelectPercentile( en="Select Percentile", es="Seleccionar Percentil", pt="Seleção por Percentil", - de="Perzentil-Auswahl", + de="Perzentilauswahl", zh="百分位数特征选择", ) IMAGE_PREVIEW = "select_percentile.png" diff --git a/DashAI/back/converters/scikit_learn/skewed_chi_2_sampler.py b/DashAI/back/converters/scikit_learn/skewed_chi_2_sampler.py index cf519365fc..a7bbd48a9d 100644 --- a/DashAI/back/converters/scikit_learn/skewed_chi_2_sampler.py +++ b/DashAI/back/converters/scikit_learn/skewed_chi_2_sampler.py @@ -67,7 +67,7 @@ class SkewedChi2SamplerSchema(BaseSchema): None, description=MultilingualString( en=( - "Pseudo-random number generator to control the generation of the " + "Pseudorandom number generator to control the generation of the " "random weights and random offset when fitting the training data. " "Pass an int for reproducible output across multiple function calls." ), @@ -154,7 +154,7 @@ class SkewedChi2Sampler( DISPLAY_NAME = MultilingualString( en="Skewed Chi² Sampler", es="Muestreador Chi² Sesgado", - pt="Amostrador Qui-2 Enviesado", + pt="Amostrador Qui² Enviesado", de="Schiefer Chi²-Stichprobennehmer", zh="偏斜卡方采样器", ) diff --git a/DashAI/back/converters/scikit_learn/variance_threshold.py b/DashAI/back/converters/scikit_learn/variance_threshold.py index 916f140b0c..9825e8b193 100644 --- a/DashAI/back/converters/scikit_learn/variance_threshold.py +++ b/DashAI/back/converters/scikit_learn/variance_threshold.py @@ -89,7 +89,7 @@ class VarianceThreshold( en="Variance Threshold", es="Umbral de Varianza", pt="Limiar de Variância", - de="Varianz-Schwellenwert", + de="Varianzschwellenwert", zh="方差阈值", ) PRESERVES_INPUT_TYPE = True diff --git a/DashAI/back/converters/simple_converters/character_replacer.py b/DashAI/back/converters/simple_converters/character_replacer.py index 081e64eaaf..01644acbfa 100644 --- a/DashAI/back/converters/simple_converters/character_replacer.py +++ b/DashAI/back/converters/simple_converters/character_replacer.py @@ -87,7 +87,7 @@ class CharacterReplacer(BasicPreprocessingConverter, BaseConverter): ), de=( "Ersetzt oder entfernt angegebene Zeichen/Teilzeichenketten in " - "ausgewählten Text-Spalten." + "ausgewählten Textspalten." ), zh="替换或删除所选字符串列中指定的字符/子字符串。", ) @@ -124,7 +124,9 @@ def __init__(self, char_to_replace: str, replacement_char: str): """ super().__init__() if not isinstance(char_to_replace, str) or not char_to_replace: - raise ValueError("'char_to_replace' must be a non-empty string.") + raise ValueError( + "'char_to_replace' must be a string with at least one character." + ) self.char_to_replace = char_to_replace if replacement_char is None or not isinstance(replacement_char, str): diff --git a/DashAI/back/converters/simple_converters/column_arithmetic.py b/DashAI/back/converters/simple_converters/column_arithmetic.py index 2f9c660cd3..d9a2c183a3 100644 --- a/DashAI/back/converters/simple_converters/column_arithmetic.py +++ b/DashAI/back/converters/simple_converters/column_arithmetic.py @@ -177,32 +177,32 @@ class ColumnArithmetic(FeatureEngineeringConverter, BaseConverter): DESCRIPTION = MultilingualString( en=( "Applies an arithmetic operation (add, subtract, multiply, divide) " - "to the selected columns — two columns to operate between them, or " - "one column with a fixed constant (e.g. column * 2) — and appends " - "the result as a new column." + "to the selected columns: two columns to operate between them, or " + "one column with a fixed constant (e.g. column * 2). The result is " + "appended as a new column." ), es=( "Aplica una operación aritmética (sumar, restar, multiplicar, " - "dividir) a las columnas seleccionadas — dos columnas para operar " + "dividir) a las columnas seleccionadas: dos columnas para operar " "entre ellas, o una columna con una constante fija (por ejemplo, " - "columna * 2) — y agrega el resultado como una nueva columna." + "columna * 2). El resultado se agrega como una nueva columna." ), pt=( "Aplica uma operação aritmética (somar, subtrair, multiplicar, " - "dividir) às colunas selecionadas — duas colunas para operar " + "dividir) às colunas selecionadas: duas colunas para operar " "entre elas, ou uma coluna com uma constante fixa (por exemplo, " - "coluna * 2) — e adiciona o resultado como uma nova coluna." + "coluna * 2). O resultado é adicionado como uma nova coluna." ), de=( "Wendet eine arithmetische Operation (Addieren, Subtrahieren, " - "Multiplizieren, Dividieren) auf die ausgewählten Spalten an — " + "Multiplizieren, Dividieren) auf die ausgewählten Spalten an: " "zwei Spalten, um zwischen ihnen zu rechnen, oder eine Spalte mit " - "einer festen Konstante (z. B. Spalte * 2) — und fügt das " - "Ergebnis als neue Spalte hinzu." + "einer festen Konstante (z. B. Spalte * 2). Das Ergebnis wird als " + "neue Spalte hinzugefügt." ), zh=( - "对所选列应用算术运算(加、减、乘、除)——选择两列在其之间运算," - "或选择一列与固定常量运算(例如 列 * 2)——并将结果作为新列追加。" + "对所选列应用算术运算(加、减、乘、除):选择两列在其之间运算," + "或选择一列与固定常量运算(例如 列 * 2),并将结果作为新列追加。" ), ) SHORT_DESCRIPTION = MultilingualString( @@ -220,7 +220,7 @@ class ColumnArithmetic(FeatureEngineeringConverter, BaseConverter): en="Column Arithmetic", es="Aritmética de Columnas", pt="Aritmética de Colunas", - de="Spalten-Arithmetik", + de="Spaltenarithmetik", zh="列算术运算", ) IMAGE_PREVIEW = "column_arithmetic.png" diff --git a/DashAI/back/converters/simple_converters/column_concat.py b/DashAI/back/converters/simple_converters/column_concat.py index 692315a355..2834071cd4 100644 --- a/DashAI/back/converters/simple_converters/column_concat.py +++ b/DashAI/back/converters/simple_converters/column_concat.py @@ -159,28 +159,28 @@ class ColumnConcat(FeatureEngineeringConverter, BaseConverter): LEARNS_FROM_DATA = False DESCRIPTION = MultilingualString( en=( - "Concatenates the selected string columns — two columns to join " - "them, or one column with a fixed string — with an optional " + "Concatenates the selected string columns (two columns to join " + "them, or one column with a fixed string) with an optional " "separator, and appends the result as a new column." ), es=( - "Concatena las columnas de texto seleccionadas — dos columnas " - "para unirlas, o una columna con un string fijo — con un " + "Concatena las columnas de texto seleccionadas (dos columnas " + "para unirlas, o una columna con un string fijo) con un " "separador opcional, y agrega el resultado como una nueva " "columna." ), pt=( - "Concatena as colunas de texto selecionadas — duas colunas para " - "uni-las, ou uma coluna com uma string fixa — com um separador " + "Concatena as colunas de texto selecionadas (duas colunas para " + "uni-las, ou uma coluna com uma string fixa) com um separador " "opcional, e adiciona o resultado como uma nova coluna." ), de=( - "Verkettet die ausgewählten Textspalten — zwei Spalten, um sie " - "zu verbinden, oder eine Spalte mit einer festen Zeichenkette — " + "Verkettet die ausgewählten Textspalten (zwei Spalten, um sie " + "zu verbinden, oder eine Spalte mit einer festen Zeichenkette) " "mit einem optionalen Trennzeichen und fügt das Ergebnis als " "neue Spalte hinzu." ), - zh="连接所选的文本列——两列将其合并,或一列与固定字符串——带可选分隔符," + zh="连接所选的文本列(两列将其合并,或一列与固定字符串),带可选分隔符," "并将结果作为新列追加。", ) SHORT_DESCRIPTION = MultilingualString( @@ -197,7 +197,7 @@ class ColumnConcat(FeatureEngineeringConverter, BaseConverter): en="Column Concat", es="Concatenación de Columnas", pt="Concatenação de Colunas", - de="Spalten-Verkettung", + de="Spaltenverkettung", zh="列拼接", ) IMAGE_PREVIEW = "column_concat.png" diff --git a/DashAI/back/converters/simple_converters/column_remover.py b/DashAI/back/converters/simple_converters/column_remover.py index 776cd9dd65..ca5ccd9253 100644 --- a/DashAI/back/converters/simple_converters/column_remover.py +++ b/DashAI/back/converters/simple_converters/column_remover.py @@ -47,7 +47,7 @@ class ColumnRemover(BasicPreprocessingConverter, BaseConverter): en="Column Remover", es="Removedor de Columnas", pt="Removedor de Colunas", - de="Spalten-Entferner", + de="Spaltenentferner", zh="列移除器", ) IMAGE_PREVIEW = "column_remover.png" diff --git a/DashAI/back/core/schema_fields/enum_labels.py b/DashAI/back/core/schema_fields/enum_labels.py index 6152acbb4f..1777299530 100644 --- a/DashAI/back/core/schema_fields/enum_labels.py +++ b/DashAI/back/core/schema_fields/enum_labels.py @@ -121,7 +121,7 @@ def _m(en: str, es: str, pt: str, de: str, zh: str) -> MultilingualString: "根据数据自动选择", ), "ball_tree": _m("Ball tree", "Ball tree", "Ball tree", "Ball-Baum", "球树"), - "kd_tree": _m("k-d tree", "Árbol k-d", "Árvore k-d", "k-d-Baum", "k-d 树"), + "kd_tree": _m("k-d tree", "Árbol kd", "Árvore k-d", "k-d-Baum", "k-d 树"), "brute": _m( "Brute force", "Fuerza bruta", "Força bruta", "Brute Force", "暴力搜索" ), @@ -436,7 +436,7 @@ def _m(en: str, es: str, pt: str, de: str, zh: str) -> MultilingualString: "Log loss", "Pérdida logarítmica", "Perda logarítmica", - "Log-Loss", + "Log Loss", "对数损失", ), "exponential": _m( @@ -500,7 +500,7 @@ def _m(en: str, es: str, pt: str, de: str, zh: str) -> MultilingualString: "Log loss", "Pérdida logarítmica", "Perda logarítmica", - "Log-Loss", + "Log Loss", "对数损失", ), }, @@ -703,7 +703,7 @@ def _m(en: str, es: str, pt: str, de: str, zh: str) -> MultilingualString: "Log loss (logistic regression)", "Pérdida logarítmica (regresión logística)", "Perda logarítmica (regressão logística)", - "Log-Loss (logistische Regression)", + "Log Loss (logistische Regression)", "对数损失(逻辑回归)", ), "modified_huber": _m( diff --git a/DashAI/back/dataloaders/classes/csv_dataloader.py b/DashAI/back/dataloaders/classes/csv_dataloader.py index ecdfcd2b48..ede9d805d6 100644 --- a/DashAI/back/dataloaders/classes/csv_dataloader.py +++ b/DashAI/back/dataloaders/classes/csv_dataloader.py @@ -121,7 +121,7 @@ class CSVDataloaderSchema(BaseSchema): "Kommagetrennte Liste der zu verwendenden Spaltennamen. Wenn die Datei " "eine Kopfzeile enthält, sollte header=0 explizit übergeben werden, " "um die Spaltennamen zu überschreiben. Beispiel: 'col1,col2,col3'. " - "Leer lassen, um die Datei-Kopfzeilen zu verwenden." + "Leer lassen, um die Dateikopfzeilen zu verwenden." ), zh=( "要使用的列名逗号分隔列表。如果文件包含标题行,应显式传递header=0来覆盖列名。" diff --git a/DashAI/back/dataloaders/classes/dataloader.py b/DashAI/back/dataloaders/classes/dataloader.py index 32adde8882..b75760cb7e 100644 --- a/DashAI/back/dataloaders/classes/dataloader.py +++ b/DashAI/back/dataloaders/classes/dataloader.py @@ -33,7 +33,7 @@ class BaseDataLoader(ConfigObject): en="Dataset Loader", es="Cargador de Datasets", pt="Carregador de Datasets", - de="Datensatz-Lader", + de="Datensatzlader", zh="数据集加载器", ) SUPPORTED_EXTENSIONS: frozenset[str] = frozenset() diff --git a/DashAI/back/dataloaders/classes/document_dataloader.py b/DashAI/back/dataloaders/classes/document_dataloader.py index dbdce9f1a7..5e2a5a674a 100644 --- a/DashAI/back/dataloaders/classes/document_dataloader.py +++ b/DashAI/back/dataloaders/classes/document_dataloader.py @@ -55,7 +55,7 @@ class DocumentDataLoader(BaseDataLoader): en="Document Extractor", es="Extractor de Documentos", pt="Extrator de Documentos", - de="Dokument-Extraktor", + de="Dokumentextraktor", zh="文档提取器", ) diff --git a/DashAI/back/explainability/explainers/contrastive_shap.py b/DashAI/back/explainability/explainers/contrastive_shap.py index 43c8bb853d..c5432b625e 100644 --- a/DashAI/back/explainability/explainers/contrastive_shap.py +++ b/DashAI/back/explainability/explainers/contrastive_shap.py @@ -397,7 +397,7 @@ def _create_plot(self, data, fact_name, foil_name, fact_prob, foil_prob): "font": {"size": 14}, }, margin={"pad": 20, "l": 100, "r": 60, "t": 60, "b": 40}, - xaxis={"title_text": "Attribution difference (fact - foil)"}, + xaxis={"title_text": "Attribution difference (fact minus foil)"}, yaxis={"showgrid": True}, ) diff --git a/DashAI/back/explainability/explainers/grad_cam.py b/DashAI/back/explainability/explainers/grad_cam.py index da65b3848f..2cf4ad9b81 100644 --- a/DashAI/back/explainability/explainers/grad_cam.py +++ b/DashAI/back/explainability/explainers/grad_cam.py @@ -180,7 +180,7 @@ def _find_target_layer(module): raise ValueError( "Grad-CAM requires a convolutional backbone, but the model " "has no Conv2d layer. Use Occlusion Saliency for " - "non-convolutional image models." + "image models without convolutional layers." ) return target diff --git a/DashAI/back/explainability/explainers/nearest_counterfactual.py b/DashAI/back/explainability/explainers/nearest_counterfactual.py index 0802d77cb1..f767c342c5 100644 --- a/DashAI/back/explainability/explainers/nearest_counterfactual.py +++ b/DashAI/back/explainability/explainers/nearest_counterfactual.py @@ -69,7 +69,7 @@ class NearestCounterfactualSchema(BaseSchema): description=MultilingualString( en=( "Distance used to rank candidate counterfactuals. Numeric " - "features are normalized by their range; non-numeric features " + "features are normalized by their range; nonnumeric features " "add a constant penalty when they differ." ), es=( diff --git a/DashAI/back/explainability/explainers/occlusion_saliency.py b/DashAI/back/explainability/explainers/occlusion_saliency.py index 4b0be0ccb2..c988632ac9 100644 --- a/DashAI/back/explainability/explainers/occlusion_saliency.py +++ b/DashAI/back/explainability/explainers/occlusion_saliency.py @@ -122,7 +122,7 @@ class probability drops at each position. Regions whose occlusion causes es="Saliencia por oclusión", pt="Saliência por oclusão", zh="遮挡显著性", - de="Okklusions-Salienz", + de="Okklusionssalienz", ) DESCRIPTION = MultilingualString( en=( diff --git a/DashAI/back/explainability/explainers/partial_dependence.py b/DashAI/back/explainability/explainers/partial_dependence.py index 516d9bb20e..10b9c70c85 100644 --- a/DashAI/back/explainability/explainers/partial_dependence.py +++ b/DashAI/back/explainability/explainers/partial_dependence.py @@ -25,7 +25,7 @@ class PartialDependenceSchema(BaseSchema): """Schema for PartialDependence explainer hyperparameters. - Configures the grid resolution (number of evenly-spaced evaluation points per + Configures the grid resolution (number of evenly spaced evaluation points per feature) and the fraction of training samples used to compute the marginal averages. Higher grid resolution gives smoother curves at the cost of more model evaluations. @@ -357,7 +357,7 @@ def plot(self, explanation: dict) -> List[GroupedArtifacts]: target_names = [target_names[1]] for target, values in zip(target_names, average): # noqa B905 - column_name = f"Feature: {feature} - Class: {target}" + column_name = f"Feature: {feature}, Class: {target}" data = pd.DataFrame({column_name: values}) data["grid_values"] = grid_values dfs.append(data) @@ -379,7 +379,7 @@ def story( Output of :meth:`explain`. explainer_output : Union[Artifact, ArtifactGroup] One of the groups previously returned by :meth:`plot`, titled - ``"Feature: {feature} - Class: {target}"``. + ``"Feature: {feature}, Class: {target}"``. Returns ------- @@ -389,7 +389,9 @@ def story( """ if not isinstance(explainer_output, ArtifactGroup): return None - match = re.match(r"Feature: (.+) - Class: (.+)", explainer_output.title or "") + match = re.match( + r"Feature: (.+)(?:, | - )Class: (.+)", explainer_output.title or "" + ) if match is None: return None feature, target = match.group(1), match.group(2) diff --git a/DashAI/back/explainability/explainers/permutation_feature_importance.py b/DashAI/back/explainability/explainers/permutation_feature_importance.py index 66b1f35765..303fc1839c 100644 --- a/DashAI/back/explainability/explainers/permutation_feature_importance.py +++ b/DashAI/back/explainability/explainers/permutation_feature_importance.py @@ -173,7 +173,7 @@ class PermutationFeatureImportance(BaseGlobalExplainer): en="Permutation Feature Importance", es="Importancia por Permutación", pt="Importância por Permutação", - de="Permutations-Merkmalswichtigkeit", + de="Merkmalswichtigkeit durch Permutation", zh="排列特征重要性", ) DESCRIPTION = MultilingualString( @@ -685,30 +685,30 @@ def story( { "en": ( "None of the top {count} features ({feature_list}) " - "showed measurable importance when shuffled — that " + "showed measurable importance when shuffled: shuffling them " "did not decrease {scoring}, or even improved it." ), "es": ( "Ninguna de las {count} características principales " "({feature_list}) mostró una importancia medible al " - "barajarlas — no redujo {scoring}, o incluso lo " + "barajarlas: no redujo {scoring}, o incluso lo " "mejoró." ), "pt": ( "Nenhuma das {count} características principais " "({feature_list}) mostrou importância mensurável ao " - "serem embaralhadas — não reduziu {scoring}, ou até " + "serem embaralhadas: não reduziu {scoring}, ou até " "o melhorou." ), "de": ( "Keines der {count} wichtigsten Merkmale " "({feature_list}) zeigte beim Permutieren eine " - "messbare Wichtigkeit — {scoring} sank dadurch " + "messbare Wichtigkeit, denn {scoring} sank dadurch " "nicht oder verbesserte sich sogar." ), "zh": ( "打乱后,排名前{count}的特征({feature_list})均未" - "表现出可测量的重要性——并未降低{scoring},甚至有所" + "表现出可测量的重要性,并未降低{scoring},甚至有所" "提升。" ), }, diff --git a/DashAI/back/explainability/explainers/regression_permutation_feature_importance.py b/DashAI/back/explainability/explainers/regression_permutation_feature_importance.py index 20534cfa82..3df3369aa7 100644 --- a/DashAI/back/explainability/explainers/regression_permutation_feature_importance.py +++ b/DashAI/back/explainability/explainers/regression_permutation_feature_importance.py @@ -157,7 +157,7 @@ class RegressionPermutationFeatureImportance(BaseGlobalExplainer): es="Importancia por Permutación (regresión)", pt="Importância por Permutação (regressão)", zh="排列特征重要性(回归)", - de="Permutations-Merkmalswichtigkeit (Regression)", + de="Merkmalswichtigkeit durch Permutation (Regression)", ) DESCRIPTION = MultilingualString( en=( @@ -397,30 +397,30 @@ def story( { "en": ( "None of the top 3 features ({feature_list}) showed " - "measurable importance when shuffled — that did " + "measurable importance when shuffled: shuffling them did " "not decrease {scoring}, or even improved it." ), "es": ( "Ninguna de las 3 características principales " "({feature_list}) mostró una importancia medible al " - "barajarlas — no redujo {scoring}, o incluso lo " + "barajarlas: no redujo {scoring}, o incluso lo " "mejoró." ), "pt": ( "Nenhuma das 3 características principais " "({feature_list}) mostrou importância mensurável ao " - "serem embaralhadas — não reduziu {scoring}, ou até " + "serem embaralhadas: não reduziu {scoring}, ou até " "o melhorou." ), "de": ( "Keines der 3 wichtigsten Merkmale ({feature_list}) " - "zeigte beim Permutieren eine messbare Wichtigkeit " - "— {scoring} sank dadurch nicht oder verbesserte " + "zeigte beim Permutieren eine messbare Wichtigkeit, " + "denn {scoring} sank dadurch nicht oder verbesserte " "sich sogar." ), "zh": ( "打乱后,排名前3的特征({feature_list})均未表现出" - "可测量的重要性——并未降低{scoring},甚至有所提升。" + "可测量的重要性,并未降低{scoring},甚至有所提升。" ), }, scoring=self.scoring_name, diff --git a/DashAI/back/exploration/clustering_explorer.py b/DashAI/back/exploration/clustering_explorer.py index 35d9208277..de6431f977 100644 --- a/DashAI/back/exploration/clustering_explorer.py +++ b/DashAI/back/exploration/clustering_explorer.py @@ -29,7 +29,7 @@ class ClusteringExplorer(BaseExplorer): en="Clustering Analysis", es="Análisis de Agrupamiento", pt="Análise de Agrupamento", - de="Clustering-Analyse", + de="Clusteranalyse", zh="聚类分析", ) ICON: Final[str] = Icon.ScatterPlot.value diff --git a/DashAI/back/exploration/complexity_measures.py b/DashAI/back/exploration/complexity_measures.py index d618739a0b..5d162acdad 100644 --- a/DashAI/back/exploration/complexity_measures.py +++ b/DashAI/back/exploration/complexity_measures.py @@ -323,8 +323,8 @@ def intra_extra_nn_ratio(x: "ndarray", y: "ndarray") -> float: if measured == 0: raise ValueError( - "No point has both a same-class and a different-class neighbour, " - "so N2 cannot be computed." + "No point has both a neighbour of its own class and a neighbour of " + "another class, so N2 cannot be computed." ) if extra_total == 0: return 1.0 diff --git a/DashAI/back/exploration/explorers/cluster_distribution.py b/DashAI/back/exploration/explorers/cluster_distribution.py index f78cc52622..3c6c48fc4d 100644 --- a/DashAI/back/exploration/explorers/cluster_distribution.py +++ b/DashAI/back/exploration/explorers/cluster_distribution.py @@ -93,7 +93,7 @@ class ClusterDistributionExplorer(ClusteringExplorer): en="Cluster Feature Distribution", es="Distribución de Características por Clúster", pt="Distribuição de Características por Cluster", - de="Cluster-Merkmalsverteilung", + de="Merkmalsverteilung je Cluster", zh="聚类特征分布", ) DESCRIPTION = MultilingualString( @@ -291,7 +291,7 @@ def launch_exploration( title = ( explorer_info.name if explorer_info.name - else f"Feature Distribution by Cluster — {algorithm}" + else f"Feature Distribution by Cluster ({algorithm})" ) layout_kwargs: Dict[str, Any] = { "title": title, diff --git a/DashAI/back/exploration/explorers/cluster_stability.py b/DashAI/back/exploration/explorers/cluster_stability.py index 88a332d0f8..a76b279306 100644 --- a/DashAI/back/exploration/explorers/cluster_stability.py +++ b/DashAI/back/exploration/explorers/cluster_stability.py @@ -26,7 +26,7 @@ class ClusterStabilitySchema(BaseExplorerSchema): - """Schema for ClusterStabilityExplorer — no parameters needed.""" + """Schema for ClusterStabilityExplorer, which needs no parameters.""" class ClusterStabilityExplorer(ClusteringExplorer): @@ -52,7 +52,7 @@ class ClusterStabilityExplorer(ClusteringExplorer): en="Cluster Stability (HDBSCAN)", es="Estabilidad de Clústeres (HDBSCAN)", pt="Estabilidade de Clusters (HDBSCAN)", - de="Cluster-Stabilität (HDBSCAN)", + de="Clusterstabilität (HDBSCAN)", zh="聚类稳定性(HDBSCAN)", ) DESCRIPTION = MultilingualString( @@ -164,7 +164,7 @@ def launch_exploration( raise ValueError( f"Cluster Stability requires HDBSCAN clustering, but the last " f"converter ran '{algorithm}' and did not produce cluster persistence " - f"data. Re-run the Clustering converter with the HDBSCAN algorithm." + f"data. Run the Clustering converter again with the HDBSCAN algorithm." ) persistence = np.array(fit_attributes["cluster_persistence"]) @@ -193,7 +193,7 @@ def launch_exploration( ) title = ( - explorer_info.name if explorer_info.name else "Cluster Stability — HDBSCAN" + explorer_info.name if explorer_info.name else "Cluster Stability (HDBSCAN)" ) fig.update_layout( title=title, diff --git a/DashAI/back/exploration/explorers/clustering_heatmap.py b/DashAI/back/exploration/explorers/clustering_heatmap.py index 1607e20ace..7dfc0bd528 100644 --- a/DashAI/back/exploration/explorers/clustering_heatmap.py +++ b/DashAI/back/exploration/explorers/clustering_heatmap.py @@ -89,7 +89,7 @@ class ClusteringHeatmapExplorer(ClusteringExplorer): en="Cluster Feature Heatmap", es="Mapa de Calor de Características por Clúster", pt="Mapa de Calor de Características por Cluster", - de="Cluster-Merkmals-Heatmap", + de="Heatmap der Clustermerkmale", zh="聚类特征热力图", ) DESCRIPTION = MultilingualString( @@ -249,7 +249,7 @@ def launch_exploration( aspect="auto", color_continuous_scale="RdBu_r", color_continuous_midpoint=0 if self.normalize else None, - title=f"Cluster Feature Heatmap — {algorithm}", + title=f"Cluster Feature Heatmap ({algorithm})", labels={"x": "Feature", "y": "Cluster", "color": color_label}, ) diff --git a/DashAI/back/exploration/explorers/clustering_profile.py b/DashAI/back/exploration/explorers/clustering_profile.py index 776b972733..e309010035 100644 --- a/DashAI/back/exploration/explorers/clustering_profile.py +++ b/DashAI/back/exploration/explorers/clustering_profile.py @@ -26,7 +26,7 @@ class ClusteringProfileSchema(BaseExplorerSchema): - """Schema for ClusteringProfileExplorer — no parameters needed.""" + """Schema for ClusteringProfileExplorer, which needs no parameters.""" class ClusteringProfileExplorer(ClusteringExplorer): diff --git a/DashAI/back/exploration/explorers/clustering_scatter.py b/DashAI/back/exploration/explorers/clustering_scatter.py index 39f34b37f2..ae356d8b46 100644 --- a/DashAI/back/exploration/explorers/clustering_scatter.py +++ b/DashAI/back/exploration/explorers/clustering_scatter.py @@ -23,7 +23,7 @@ class ClusteringScatterSchema(BaseExplorerSchema): en=( "Dimensionality reduction method used to project the selected " "features onto two dimensions. 'pca' is fast and deterministic; " - "'tsne' can better reveal non-linear cluster structure but is " + "'tsne' can better reveal nonlinear cluster structure but is " "slower and stochastic." ), es=( @@ -41,7 +41,7 @@ class ClusteringScatterSchema(BaseExplorerSchema): de=( "Dimensionsreduzierungsmethode zur Projektion der ausgewählten " "Merkmale auf zwei Dimensionen. 'pca' ist schnell und " - "deterministisch; 'tsne' kann nicht-lineare Clusterstrukturen " + "deterministisch; 'tsne' kann nichtlineare Clusterstrukturen " "besser aufdecken, ist aber langsamer." ), zh=( @@ -264,7 +264,7 @@ def launch_exploration( x=x_label, y=y_label, color="Cluster", - title=f"Cluster Scatter ({self.reduction_method.upper()}) — {algorithm}", + title=f"Cluster Scatter ({self.reduction_method.upper()}, {algorithm})", color_discrete_sequence=px.colors.qualitative.Set1, ) diff --git a/DashAI/back/exploration/explorers/corr_matrix.py b/DashAI/back/exploration/explorers/corr_matrix.py index cb115c2a3b..c2e67b7a8a 100644 --- a/DashAI/back/exploration/explorers/corr_matrix.py +++ b/DashAI/back/exploration/explorers/corr_matrix.py @@ -47,7 +47,7 @@ class CorrelationMatrixExplorerSchema(BaseExplorerSchema): ``"spearman"`` measures monotonic association using rank-transformed data and is more robust to nonlinear relationships and outliers; ``"kendall"`` uses concordance/discordance counts and is preferred for small samples or - heavily tied data. Use ``"numeric_only"`` to exclude non-numeric columns + heavily tied data. Use ``"numeric_only"`` to exclude nonnumeric columns from the calculation automatically. """ diff --git a/DashAI/back/exploration/explorers/dendrogram.py b/DashAI/back/exploration/explorers/dendrogram.py index 846895c0a8..5229916aac 100644 --- a/DashAI/back/exploration/explorers/dendrogram.py +++ b/DashAI/back/exploration/explorers/dendrogram.py @@ -12,7 +12,7 @@ class DendrogramSchema(BaseExplorerSchema): - """Schema for DendrogramExplorer — no parameters needed.""" + """Schema for DendrogramExplorer, which needs no parameters.""" class DendrogramExplorer(ClusteringExplorer): @@ -158,8 +158,9 @@ def launch_exploration( raise ValueError( f"Dendrogram requires Agglomerative clustering with 'Compute " f"distances' enabled, but the last converter ran '{algorithm}' and " - f"produced no linkage data. Re-run the Clustering converter with the " - f"Agglomerative algorithm and enable the 'Compute distances' option." + f"produced no linkage data. Run the Clustering converter again with " + f"the Agglomerative algorithm and enable the 'Compute distances' " + f"option." ) linkage_data = fit_attributes["linkage_data"] @@ -186,7 +187,7 @@ def launch_exploration( title = ( explorer_info.name if explorer_info.name - else f"Dendrogram — Agglomerative ({n_leaves} samples)" + else f"Agglomerative Dendrogram ({n_leaves} samples)" ) fig = go.Figure(traces) fig.update_layout( diff --git a/DashAI/back/exploration/explorers/ecdf_plot.py b/DashAI/back/exploration/explorers/ecdf_plot.py index 68c1c6ee06..a49debb7b6 100644 --- a/DashAI/back/exploration/explorers/ecdf_plot.py +++ b/DashAI/back/exploration/explorers/ecdf_plot.py @@ -163,7 +163,7 @@ class ECDFPlotExplorer(DistributionExplorer): "observações abaixo de cada valor único." ), de=( - "Nicht-parametrisches Diagramm, das den Anteil oder die Anzahl der " + "Nichtparametrisches Diagramm, das den Anteil oder die Anzahl der " "Beobachtungen unterhalb jedes eindeutigen Wertes zeigt." ), zh="非参数图,显示每个唯一值以下的观测比例或计数。", diff --git a/DashAI/back/exploration/explorers/histogram_plot.py b/DashAI/back/exploration/explorers/histogram_plot.py index ef4760ae9f..7e14d61e32 100644 --- a/DashAI/back/exploration/explorers/histogram_plot.py +++ b/DashAI/back/exploration/explorers/histogram_plot.py @@ -45,7 +45,7 @@ class HistogramPlotSchema(BaseExplorerSchema): Controls the bin count, the aggregation function applied within each bin, the normalisation of bar heights, and optional grouping columns. - ``nbins`` sets the number of equally-spaced bins; leaving it as ``None`` + ``nbins`` sets the number of equally spaced bins; leaving it as ``None`` lets Plotly choose automatically. ``histfunc`` determines what is plotted per bin: ``"count"`` (default) counts observations, while ``"sum"``, ``"avg"``, ``"min"``, and ``"max"`` aggregate a numeric value within each @@ -159,7 +159,7 @@ class HistogramPlotSchema(BaseExplorerSchema): en="Color group column", es="Columna para grupo de color", pt="Coluna para grupo de cor", - de="Farbgruppen-Spalte", + de="Farbgruppenspalte", zh="颜色分组列", ), ) # type: ignore @@ -177,7 +177,7 @@ class HistogramPlotSchema(BaseExplorerSchema): en="Pattern group column", es="Columna para grupo de patrón", pt="Coluna para grupo de padrão", - de="Mustergruppen-Spalte", + de="Mustergruppenspalte", zh="图案分组列", ), ) # type: ignore diff --git a/DashAI/back/exploration/explorers/multibox_plot.py b/DashAI/back/exploration/explorers/multibox_plot.py index 8a65dc8044..694c981355 100644 --- a/DashAI/back/exploration/explorers/multibox_plot.py +++ b/DashAI/back/exploration/explorers/multibox_plot.py @@ -29,7 +29,7 @@ class MultiColumnBoxPlotSchema(BaseExplorerSchema): """Schema for MultiColumnBoxPlotExplorer configuration. - Configures the layout and optional grouping axis for the multi-column box + Configures the layout and optional grouping axis for the multicolumn box plot. ``horizontal`` flips all boxes so that the value axis runs left to right, which is convenient when column names are long. ``points`` controls whether individual data points are overlaid on each box (``"all"`` diff --git a/DashAI/back/exploration/explorers/scatter_matrix.py b/DashAI/back/exploration/explorers/scatter_matrix.py index 0ed3ef6f4d..dd84dadcfc 100644 --- a/DashAI/back/exploration/explorers/scatter_matrix.py +++ b/DashAI/back/exploration/explorers/scatter_matrix.py @@ -46,7 +46,7 @@ class ScatterMatrixSchema(BaseExplorerSchema): en="Color group column", es="Columna para grupo de color", pt="Coluna para grupo de cor", - de="Farbgruppen-Spalte", + de="Farbgruppenspalte", zh="颜色分组列", ), ) # type: ignore @@ -64,7 +64,7 @@ class ScatterMatrixSchema(BaseExplorerSchema): en="Symbol group column", es="Columna para grupo de símbolo", pt="Coluna para grupo de símbolo", - de="Symbolgruppen-Spalte", + de="Symbolgruppenspalte", zh="符号分组列", ), ) # type: ignore diff --git a/DashAI/back/exploration/explorers/scatter_plot.py b/DashAI/back/exploration/explorers/scatter_plot.py index afdc0d5051..105dcf2d24 100644 --- a/DashAI/back/exploration/explorers/scatter_plot.py +++ b/DashAI/back/exploration/explorers/scatter_plot.py @@ -29,7 +29,7 @@ class ScatterPlotSchema(BaseExplorerSchema): Configures the two axis columns plus optional visual channels: ``color_group`` for categorical colour encoding, ``simbol_group`` for marker-shape encoding, - and ``point_size`` for size-encoding by a third numeric variable. + and ``point_size`` for size encoding by a third numeric variable. """ color_group: schema_field( @@ -46,7 +46,7 @@ class ScatterPlotSchema(BaseExplorerSchema): en="Color group column", es="Columna para grupo de color", pt="Coluna para grupo de cor", - de="Farbgruppen-Spalte", + de="Farbgruppenspalte", zh="颜色分组列", ), ) # type: ignore @@ -64,7 +64,7 @@ class ScatterPlotSchema(BaseExplorerSchema): en="Symbol group column", es="Columna para grupo de símbolo", pt="Coluna para grupo de símbolo", - de="Symbolgruppen-Spalte", + de="Symbolgruppenspalte", zh="符号分组列", ), ) # type: ignore @@ -82,7 +82,7 @@ class ScatterPlotSchema(BaseExplorerSchema): en="Point size column", es="Columna tamaño punto", pt="Coluna tamanho ponto", - de="Punktgröße-Spalte", + de="Punktgrößenspalte", zh="点大小列", ), ) # type: ignore diff --git a/DashAI/back/exploration/explorers/silhouette_plot.py b/DashAI/back/exploration/explorers/silhouette_plot.py index e4ed900f84..b00f1c9adf 100644 --- a/DashAI/back/exploration/explorers/silhouette_plot.py +++ b/DashAI/back/exploration/explorers/silhouette_plot.py @@ -57,14 +57,14 @@ class SilhouettePlotExplorer(ClusteringExplorer): en="Silhouette Plot", es="Gráfico de Silueta", pt="Gráfico de Silhueta", - de="Silhouette-Diagramm", + de="Silhouettendiagramm", zh="轮廓图", ) DESCRIPTION = MultilingualString( en=( "Shows per-sample silhouette coefficients grouped by cluster. " "Each bar represents one sample; bars to the right indicate good " - "cluster assignment, bars to the left indicate possible mis-assignment." + "cluster assignment, bars to the left indicate possible misassignment." " The dashed line marks the dataset mean silhouette score." ), es=( @@ -274,7 +274,7 @@ def launch_exploration( title = ( explorer_info.name if explorer_info.name - else f"Silhouette Plot — {algorithm}" + else f"Silhouette Plot ({algorithm})" ) fig.update_layout( title=title, diff --git a/DashAI/back/metrics/classification/balanced_accuracy.py b/DashAI/back/metrics/classification/balanced_accuracy.py index 2a1fe08731..bc7dff665f 100644 --- a/DashAI/back/metrics/classification/balanced_accuracy.py +++ b/DashAI/back/metrics/classification/balanced_accuracy.py @@ -44,7 +44,7 @@ class BalancedAccuracy(ClassificationMetric): "conjuntos de dados desbalanceados." ), de=( - "Makro-Durchschnitt des Recalls je Klasse, am besten geeignet für " + "Makrodurchschnitt des Recalls je Klasse, am besten geeignet für " "unausgewogene Datensätze." ), zh=("按类别宏平均的召回率,最适用于类别不均衡的数据集。"), diff --git a/DashAI/back/metrics/classification/precision.py b/DashAI/back/metrics/classification/precision.py index 22fd76f9b1..386c3c760e 100644 --- a/DashAI/back/metrics/classification/precision.py +++ b/DashAI/back/metrics/classification/precision.py @@ -52,7 +52,7 @@ class Precision(ClassificationMetric): ), de=( "Anteil der vorhergesagten Positiven, die korrekt sind, " - "wichtig wenn falsch-positive Ergebnisse kostspielig sind." + "wichtig wenn falsch positive Ergebnisse kostspielig sind." ), zh=("预测为正例中实际正确的比例,在假阳性代价高昂时尤为重要。"), ) diff --git a/DashAI/back/metrics/classification/recall.py b/DashAI/back/metrics/classification/recall.py index f3f91a907f..3cf8d84212 100644 --- a/DashAI/back/metrics/classification/recall.py +++ b/DashAI/back/metrics/classification/recall.py @@ -51,7 +51,7 @@ class Recall(ClassificationMetric): ), de=( "Anteil der tatsächlich positiven Fälle, die korrekt identifiziert wurden, " - "wichtig wenn falsch-negative Ergebnisse kostspielig sind." + "wichtig wenn falsch negative Ergebnisse kostspielig sind." ), zh=("实际正例中被正确识别的比例,在假阴性代价高昂时尤为重要。"), ) diff --git a/DashAI/back/models/RAG/RAG_pipeline.py b/DashAI/back/models/RAG/RAG_pipeline.py index 0ea17a30ff..fc263a0cdd 100644 --- a/DashAI/back/models/RAG/RAG_pipeline.py +++ b/DashAI/back/models/RAG/RAG_pipeline.py @@ -55,7 +55,7 @@ log = logging.getLogger(__name__) #: Separator between the first and last position of a covered range. -_POSITION_RANGE_SEPARATOR: Final[str] = "–" +_POSITION_RANGE_SEPARATOR: Final[str] = " to " if TYPE_CHECKING: from DashAI.back.models.RAG.chunking_models.base_chunking_model import ( @@ -190,7 +190,7 @@ def _chunk_label(chunk: Chunk) -> str: ------- str ``"chunk nº "`` for a stored chunk, or - ``"chunks nº –"`` for an expanded unit. + ``"chunks nº to "`` for an expanded unit. """ covered = getattr(chunk, "source_positions", None) if not covered: diff --git a/DashAI/back/models/RAG/chunking_models/character_chunk_model.py b/DashAI/back/models/RAG/chunking_models/character_chunk_model.py index 5327988227..c0000b694e 100644 --- a/DashAI/back/models/RAG/chunking_models/character_chunk_model.py +++ b/DashAI/back/models/RAG/chunking_models/character_chunk_model.py @@ -112,7 +112,7 @@ class CharacterChunkModel(BaseChunkingModel): ), de=( "Teilt Dokumente in Stücke fester Größe, gezählt in Zeichen. " - "Schnell, vorhersehbar und ohne Modell-Download — ein guter " + "Schnell, vorhersehbar und ohne Modell-Download: ein guter " "Standardwert." ), zh=( diff --git a/DashAI/back/models/RAG/chunking_models/recursive_character_chunk_model.py b/DashAI/back/models/RAG/chunking_models/recursive_character_chunk_model.py index 9f0765dfab..0664f4316c 100644 --- a/DashAI/back/models/RAG/chunking_models/recursive_character_chunk_model.py +++ b/DashAI/back/models/RAG/chunking_models/recursive_character_chunk_model.py @@ -105,7 +105,7 @@ class RecursiveCharacterChunkModel(BaseChunkingModel): en="Recursive Character Chunk Model", es="Modelo de Fragmentación Recursiva por Caracteres", pt="Modelo de Fragmentação Recursiva por Caracteres", - de="Rekursives Zeichen-Chunking-Modell", + de="Rekursives Chunking nach Zeichen", zh="递归字符分块模型", ) diff --git a/DashAI/back/models/RAG/chunking_models/token_chunk_model.py b/DashAI/back/models/RAG/chunking_models/token_chunk_model.py index d2c21723c1..cc8adadb46 100644 --- a/DashAI/back/models/RAG/chunking_models/token_chunk_model.py +++ b/DashAI/back/models/RAG/chunking_models/token_chunk_model.py @@ -126,7 +126,7 @@ class TokenChunkModel(BaseChunkingModel): en="Token chunking", es="Fragmentación por tokens", pt="Fragmentação por tokens", - de="Token-basiertes Chunking", + de="Tokenbasiertes Chunking", zh="按标记切分", ) DESCRIPTION = MultilingualString( @@ -275,8 +275,8 @@ def _missing_offsets_error(self) -> RAGChunkingError: """ return RAGChunkingError( f"Tokenizer '{self.tokenizer_name}' cannot report character " - "offsets. TokenChunkModel needs an offset-capable (fast) " - "tokenizer so every chunk stays a verbatim slice of the source " + "offsets. TokenChunkModel needs a fast tokenizer that reports " + "character offsets so every chunk stays a verbatim slice of the source " "text; pick a fast tokenizer or another chunking model." ) diff --git a/DashAI/back/models/RAG/prompts/evaluation/default_agentic_reranker_prompt.py b/DashAI/back/models/RAG/prompts/evaluation/default_agentic_reranker_prompt.py index e2f96af517..4823f7ebda 100644 --- a/DashAI/back/models/RAG/prompts/evaluation/default_agentic_reranker_prompt.py +++ b/DashAI/back/models/RAG/prompts/evaluation/default_agentic_reranker_prompt.py @@ -184,7 +184,7 @@ class DefaultAgenticRerankerPrompt(AgenticRerankerPrompt): en="Default Agentic Reranker Prompt", es="Prompt Agéntico de Reranking Predeterminado", pt="Prompt Agêntico de Reranking Padrão", - de="Standard-Prompt für den agentischen Reranker", + de="Standardprompt für den agentischen Reranker", zh="默认智能体重排提示词", ) diff --git a/DashAI/back/models/RAG/prompts/evaluation/default_agentic_retriever_prompt.py b/DashAI/back/models/RAG/prompts/evaluation/default_agentic_retriever_prompt.py index 08f29cde9c..412a57010a 100644 --- a/DashAI/back/models/RAG/prompts/evaluation/default_agentic_retriever_prompt.py +++ b/DashAI/back/models/RAG/prompts/evaluation/default_agentic_retriever_prompt.py @@ -336,7 +336,7 @@ class DefaultAgenticRetrieverPrompt(AgenticRetrieverPrompt): en="Default Agentic Retriever Prompt", es="Prompt Agéntico de Recuperación Predeterminado", pt="Prompt Agêntico de Recuperação Padrão", - de="Standard-Prompt für den agentischen Retriever", + de="Standardprompt für den agentischen Retriever", zh="默认智能体检索提示词", ) diff --git a/DashAI/back/models/RAG/prompts/transformation/custom_query_decomposition_prompt.py b/DashAI/back/models/RAG/prompts/transformation/custom_query_decomposition_prompt.py index 1d93857a91..3365e269ca 100644 --- a/DashAI/back/models/RAG/prompts/transformation/custom_query_decomposition_prompt.py +++ b/DashAI/back/models/RAG/prompts/transformation/custom_query_decomposition_prompt.py @@ -27,7 +27,7 @@ class CustomQueryDecompositionPrompt(QueryDecompositionPrompt): "previous messages." ), "{n_max}": ( - "Optional upper bound on the number of sub-queries; the whole " + "Optional upper bound on the number of subqueries; the whole " "cap sentence disappears when it is not provided." ), }, diff --git a/DashAI/back/models/RAG/prompts/transformation/default_query_decomposition_prompt.py b/DashAI/back/models/RAG/prompts/transformation/default_query_decomposition_prompt.py index a690c9e328..2e61e61a03 100644 --- a/DashAI/back/models/RAG/prompts/transformation/default_query_decomposition_prompt.py +++ b/DashAI/back/models/RAG/prompts/transformation/default_query_decomposition_prompt.py @@ -134,7 +134,7 @@ class DefaultQueryDecompositionPrompt(QueryDecompositionPrompt): CUSTOM_CLASS: str = "CustomQueryDecompositionPrompt" DESCRIPTION: str = MultilingualString( en="Default prompt template for decomposing a complex question into" - " independently retrievable sub-queries.", + " independently retrievable subqueries.", es="Plantilla de prompt predeterminada para descomponer una pregunta" " compleja en subconsultas recuperables de forma independiente.", pt="Modelo de prompt padrão para decompor uma pergunta complexa em" @@ -147,7 +147,7 @@ class DefaultQueryDecompositionPrompt(QueryDecompositionPrompt): en="Default Query Decomposition Prompt", es="Prompt de Descomposición de Consulta Predeterminado", pt="Prompt de Decomposição de Consulta Padrão", - de="Standard-Abfrage-Zerlegungs-Prompt", + de="Standardprompt für Abfragezerlegung", zh="默认查询分解提示词", ) @@ -157,7 +157,7 @@ class DefaultQueryDecompositionPrompt(QueryDecompositionPrompt): metadata = { "name": "Default Query Decomposition Prompt", "description": "Default prompt template for decomposing a complex question" - " into independently retrievable sub-queries.", + " into independently retrievable subqueries.", "type": "transformation", "technique": "decomposition", "variant": "default", @@ -170,7 +170,7 @@ class DefaultQueryDecompositionPrompt(QueryDecompositionPrompt): "previous messages." ), "{n_max}": ( - "Optional upper bound on the number of sub-queries; the whole " + "Optional upper bound on the number of subqueries; the whole " "cap sentence disappears when it is not provided." ), }, diff --git a/DashAI/back/models/RAG/prompts/transformation/default_query_expansion_prompt.py b/DashAI/back/models/RAG/prompts/transformation/default_query_expansion_prompt.py index 91dde7ae94..cde4bda3bd 100644 --- a/DashAI/back/models/RAG/prompts/transformation/default_query_expansion_prompt.py +++ b/DashAI/back/models/RAG/prompts/transformation/default_query_expansion_prompt.py @@ -144,7 +144,7 @@ class DefaultQueryExpansionPrompt(QueryExpansionPrompt): en="Default Query Expansion Prompt", es="Prompt de Expansión de Consulta Predeterminado", pt="Prompt de Expansão de Consulta Padrão", - de="Standard-Abfrage-Erweiterungs-Prompt", + de="Standardprompt für Abfrageerweiterung", zh="默认查询扩展提示词", ) diff --git a/DashAI/back/models/RAG/prompts/transformation/default_query_rewriting_prompt.py b/DashAI/back/models/RAG/prompts/transformation/default_query_rewriting_prompt.py index 8daa9eaa03..fbb5ae03e3 100644 --- a/DashAI/back/models/RAG/prompts/transformation/default_query_rewriting_prompt.py +++ b/DashAI/back/models/RAG/prompts/transformation/default_query_rewriting_prompt.py @@ -139,7 +139,7 @@ class DefaultQueryRewritingPrompt(QueryRewritingPrompt): en="Default Query Rewriting Prompt", es="Prompt de Reescritura de Consulta Predeterminado", pt="Prompt de Reescrita de Consulta Padrão", - de="Standard-Abfrage-Umschreibungs-Prompt", + de="Standardprompt für Abfrageumschreibung", zh="默认查询改写提示词", ) diff --git a/DashAI/back/models/RAG/retrievers/composite/agentic_reranker_retriever.py b/DashAI/back/models/RAG/retrievers/composite/agentic_reranker_retriever.py index 03077577d5..a2f9567da0 100644 --- a/DashAI/back/models/RAG/retrievers/composite/agentic_reranker_retriever.py +++ b/DashAI/back/models/RAG/retrievers/composite/agentic_reranker_retriever.py @@ -271,11 +271,11 @@ class AgenticRerankerRetriever(CompositeRetriever, ChunkScorer): ) REPRESENTATION = MultilingualString( - en="k1 {k1} · top-k {top_k} · {prompt}", - es="candidatos {k1} · top-k {top_k} · {prompt}", - pt="candidatos {k1} · top-k {top_k} · {prompt}", - de="k1 {k1} · Top-k {top_k} · {prompt}", - zh="k1 {k1} · 前 k {top_k} · {prompt}", + en="k1 {k1}, top-k {top_k}, {prompt}", + es="candidatos {k1}, top-k {top_k}, {prompt}", + pt="candidatos {k1}, top-k {top_k}, {prompt}", + de="k1 {k1}, Top-k {top_k}, {prompt}", + zh="k1 {k1},前 k {top_k},{prompt}", ) #: Nested component references the factories must resolve before construction. diff --git a/DashAI/back/models/RAG/retrievers/composite/agentic_retriever.py b/DashAI/back/models/RAG/retrievers/composite/agentic_retriever.py index b25274f80e..94a9c880b9 100644 --- a/DashAI/back/models/RAG/retrievers/composite/agentic_retriever.py +++ b/DashAI/back/models/RAG/retrievers/composite/agentic_retriever.py @@ -321,11 +321,11 @@ def __init__(self, **kwargs: Any) -> None: ) REPRESENTATION = MultilingualString( - en="max_iters {max_iters} · max_chunks {max_chunks} · {prompt}", - es="máx. iteraciones {max_iters} · máx. fragmentos {max_chunks} · {prompt}", - pt="máx. iterações {max_iters} · máx. trechos {max_chunks} · {prompt}", - de="max. Iterationen {max_iters} · max. Chunks {max_chunks} · {prompt}", - zh="最大迭代 {max_iters} · 最大片段 {max_chunks} · {prompt}", + en="max_iters {max_iters}, max_chunks {max_chunks}, {prompt}", + es="máx. iteraciones {max_iters}, máx. fragmentos {max_chunks}, {prompt}", + pt="máx. iterações {max_iters}, máx. trechos {max_chunks}, {prompt}", + de="max. Iterationen {max_iters}, max. Chunks {max_chunks}, {prompt}", + zh="最大迭代 {max_iters},最大片段 {max_chunks},{prompt}", ) #: The agentic loop, its pool cap, prompt, language model and retry budget diff --git a/DashAI/back/models/RAG/retrievers/composite/mmr_reranker_retriever.py b/DashAI/back/models/RAG/retrievers/composite/mmr_reranker_retriever.py index cdd1cf860c..dc2a063add 100644 --- a/DashAI/back/models/RAG/retrievers/composite/mmr_reranker_retriever.py +++ b/DashAI/back/models/RAG/retrievers/composite/mmr_reranker_retriever.py @@ -45,7 +45,7 @@ class MMRRerankerRetrieverSchema(RetrievalExpansionSchema): top_k: Final number of chunks to select. The candidate set size is determined by the child retriever's own ``top_k``; the reranker only selects ``top_k`` of them. - children: Exactly one child retriever whose results are re-ranked. + children: Exactly one child retriever whose results are reranked. """ mmr_lambda: schema_field( @@ -81,7 +81,7 @@ class MMRRerankerRetrieverSchema(RetrievalExpansionSchema): list_field(component_field(parent="BaseRetriever"), min_items=1, max_items=1), placeholder=[], description=MultilingualString( - en="The child retriever whose results will be re-ranked.", + en="The child retriever whose results will be reranked.", es="El recuperador hijo cuyos resultados serán reordenados.", pt="O recuperador filho cujos resultados serão reordenados.", de="Der Kind-Retriever, dessen Ergebnisse neu bewertet werden.", @@ -108,7 +108,7 @@ class MMRRerankerRetriever(CompositeRetriever, ChunkScorer): zh="MMR 重排序器", ) DESCRIPTION: str = MultilingualString( - en="Re-ranks retrieval results using Maximum Marginal Relevance for diversity.", + en="Reranks retrieval results using Maximum Marginal Relevance for diversity.", es="Reordena resultados de recuperación usando Maximum Marginal Relevance " "para diversidad.", pt="Reordena resultados de recuperação usando Maximum Marginal Relevance " @@ -119,11 +119,11 @@ class MMRRerankerRetriever(CompositeRetriever, ChunkScorer): ) REPRESENTATION = MultilingualString( - en="MMR λ {mmr_lambda} · top-k {top_k}", - es="MMR λ {mmr_lambda} · top-k {top_k}", - pt="MMR λ {mmr_lambda} · top-k {top_k}", - de="MMR λ {mmr_lambda} · top-k {top_k}", - zh="MMR λ {mmr_lambda} · top-k {top_k}", + en="MMR λ {mmr_lambda}, top-k {top_k}", + es="MMR λ {mmr_lambda}, top-k {top_k}", + pt="MMR λ {mmr_lambda}, top-k {top_k}", + de="MMR λ {mmr_lambda}, top-k {top_k}", + zh="MMR λ {mmr_lambda},top-k {top_k}", ) #: The final selection size and the MMR trade-off act on the candidates the diff --git a/DashAI/back/models/RAG/retrievers/composite/sequential_retriever.py b/DashAI/back/models/RAG/retrievers/composite/sequential_retriever.py index 5f33f0f929..05a0c7dedd 100644 --- a/DashAI/back/models/RAG/retrievers/composite/sequential_retriever.py +++ b/DashAI/back/models/RAG/retrievers/composite/sequential_retriever.py @@ -37,7 +37,7 @@ class SequentialRetrieverSchema(RetrievalExpansionSchema): placeholder=[], description=MultilingualString( en="Ordered list of child retrievers. The first child retrieves" - " broadly; each subsequent child re-ranks and tightens the" + " broadly; each subsequent child reranks and tightens the" " results.", es="Lista ordenada de recuperadores hijos. El primero recupera" " ampliamente; cada hijo subsiguiente reordena y ajusta los" @@ -71,7 +71,7 @@ class SequentialRetriever(CompositeRetriever, ChunkScorer): zh="顺序检索器", ) DESCRIPTION: str = MultilingualString( - en="Queries multiple retrievers in sequence, re-ranking at each step.", + en="Queries multiple retrievers in sequence, reranking at each step.", es="Consulta múltiples recuperadores en secuencia, reordenando en cada paso.", pt="Consulta vários recuperadores em sequência, reordenando em cada etapa.", de="Fragt mehrere Retriever nacheinander ab und bewertet bei jedem" diff --git a/DashAI/back/models/RAG/retrievers/cross_encoder/sentence_transformer_cross_encoder.py b/DashAI/back/models/RAG/retrievers/cross_encoder/sentence_transformer_cross_encoder.py index 8d80816460..bf939ef492 100644 --- a/DashAI/back/models/RAG/retrievers/cross_encoder/sentence_transformer_cross_encoder.py +++ b/DashAI/back/models/RAG/retrievers/cross_encoder/sentence_transformer_cross_encoder.py @@ -164,19 +164,19 @@ class SentenceTransformerCrossEncoderRetrieverSchema(RetrievalExpansionSchema): """Schema for :class:`SentenceTransformerCrossEncoderRetriever`. Attributes: - model_name: Identifier of the pre-trained cross-encoder model. - top_k: Final number of chunks to return after re-ranking. The + model_name: Identifier of the pretrained cross-encoder model. + top_k: Final number of chunks to return after reranking. The candidate set size is determined by the child retriever's own ``top_k``. - children: Exactly one child retriever whose candidates are re-ranked. + children: Exactly one child retriever whose candidates are reranked. """ model_name: schema_field( enum_field(enum=CROSS_ENCODER_MODEL_NAMES), placeholder="cross-encoder/ms-marco-MiniLM-L-6-v2", description=MultilingualString( - en="Pre-trained SentenceTransformer cross-encoder model to use.", - es="Modelo cross-encoder pre-entrenado de SentenceTransformer a usar.", + en="Pretrained SentenceTransformer cross-encoder model to use.", + es="Modelo cross-encoder preentrenado de SentenceTransformer a usar.", pt="Modelo cross-encoder pré-treinado de SentenceTransformer a usar.", de="Vorab trainiertes SentenceTransformer-Cross-Encoder-Modell," " das verwendet werden soll.", @@ -188,7 +188,7 @@ class SentenceTransformerCrossEncoderRetrieverSchema(RetrievalExpansionSchema): int_field(gt=0), placeholder=5, description=MultilingualString( - en="Final number of chunks to return after re-ranking. The " + en="Final number of chunks to return after reranking. The " "candidate set size is determined by the child retriever's " "own top_k.", es="Número final de fragmentos a devolver tras el reordenamiento. " @@ -208,7 +208,7 @@ class SentenceTransformerCrossEncoderRetrieverSchema(RetrievalExpansionSchema): list_field(component_field(parent="BaseRetriever"), min_items=1, max_items=1), placeholder=[], description=MultilingualString( - en="The child retriever whose candidates will be re-ranked.", + en="The child retriever whose candidates will be reranked.", es="El recuperador hijo cuyos candidatos serán reordenados.", pt="O recuperador filho cujos candidatos serão reordenados.", de="Der Kind-Retriever, dessen Kandidaten neu bewertet werden.", @@ -258,8 +258,8 @@ class SentenceTransformerCrossEncoderRetriever(CrossEncoderRetriever): zh="SentenceTransformer 交叉编码器", ) DESCRIPTION: str = MultilingualString( - en="Cross-encoder re-ranker using SentenceTransformer models. " - "Re-scores candidates from a child retriever for improved accuracy.", + en="Cross-encoder reranker using SentenceTransformer models. " + "Rescores candidates from a child retriever for improved accuracy.", es="Reordenador cross-encoder usando modelos de SentenceTransformer. " "Reevalúa candidatos de un recuperador hijo para mejorar la precisión.", pt="Reordenador cross-encoder usando modelos de SentenceTransformer. " @@ -273,11 +273,11 @@ class SentenceTransformerCrossEncoderRetriever(CrossEncoderRetriever): COLOR: str = "#FF5722" ICON: str = "Shuffle" REPRESENTATION = MultilingualString( - en="model {model_name} · top-k {top_k}", - es="modelo {model_name} · top-k {top_k}", - pt="modelo {model_name} · top-k {top_k}", - de="Modell {model_name} · top-k {top_k}", - zh="模型 {model_name} · top-k {top_k}", + en="model {model_name}, top-k {top_k}", + es="modelo {model_name}, top-k {top_k}", + pt="modelo {model_name}, top-k {top_k}", + de="Modell {model_name}, top-k {top_k}", + zh="模型 {model_name},top-k {top_k}", ) #: The cross-encoder only scores chunks at query time and persists nothing. @@ -379,7 +379,7 @@ def _cross_score(self, query: str, chunks: List[Chunk]) -> List[float]: if scores.ndim == 2: if score_index is None: raise RAGRetrieverError( - f"Model '{self.model_name}' returned multi-column scores but " + f"Model '{self.model_name}' returned several score columns but " "no score_index is configured." ) scores = scores[:, score_index] diff --git a/DashAI/back/models/RAG/retrievers/dense/dense_embedding_retriever.py b/DashAI/back/models/RAG/retrievers/dense/dense_embedding_retriever.py index 251720ca80..dae3d526b7 100644 --- a/DashAI/back/models/RAG/retrievers/dense/dense_embedding_retriever.py +++ b/DashAI/back/models/RAG/retrievers/dense/dense_embedding_retriever.py @@ -126,11 +126,11 @@ class DenseEmbeddingRetriever(UnitRetriever, ChunkScorer): ) REPRESENTATION = MultilingualString( - en="{embedding_model} · similarity {similarity_metric} · top-k {top_k}", - es="{embedding_model} · similitud {similarity_metric} · top-k {top_k}", - pt="{embedding_model} · similaridade {similarity_metric} · top-k {top_k}", - de="{embedding_model} · Ähnlichkeit {similarity_metric} · top-k {top_k}", - zh="{embedding_model} · 相似度 {similarity_metric} · top-k {top_k}", + en="{embedding_model}, similarity {similarity_metric}, top-k {top_k}", + es="{embedding_model}, similitud {similarity_metric}, top-k {top_k}", + pt="{embedding_model}, similaridade {similarity_metric}, top-k {top_k}", + de="{embedding_model}, Ähnlichkeit {similarity_metric}, top-k {top_k}", + zh="{embedding_model},相似度 {similarity_metric},top-k {top_k}", ) @classmethod diff --git a/DashAI/back/models/RAG/retrievers/sparse/bm25_retriever.py b/DashAI/back/models/RAG/retrievers/sparse/bm25_retriever.py index 15c1f9667f..641310da07 100644 --- a/DashAI/back/models/RAG/retrievers/sparse/bm25_retriever.py +++ b/DashAI/back/models/RAG/retrievers/sparse/bm25_retriever.py @@ -148,11 +148,11 @@ class BM25Retriever(SparseRetriever, ChunkScorer): ) REPRESENTATION = MultilingualString( - en="k1 {k1} · b {b} · top-k {top_k}", - es="k1 {k1} · b {b} · top-k {top_k}", - pt="k1 {k1} · b {b} · top-k {top_k}", - de="k1 {k1} · b {b} · top-k {top_k}", - zh="k1 {k1} · b {b} · top-k {top_k}", + en="k1 {k1}, b {b}, top-k {top_k}", + es="k1 {k1}, b {b}, top-k {top_k}", + pt="k1 {k1}, b {b}, top-k {top_k}", + de="k1 {k1}, b {b}, top-k {top_k}", + zh="k1 {k1},b {b},top-k {top_k}", ) SCHEMA = BM25RetrieverSchema diff --git a/DashAI/back/models/RAG/retrievers/sparse/tfidf_retriever.py b/DashAI/back/models/RAG/retrievers/sparse/tfidf_retriever.py index 8ef8e25d40..f69affb78f 100644 --- a/DashAI/back/models/RAG/retrievers/sparse/tfidf_retriever.py +++ b/DashAI/back/models/RAG/retrievers/sparse/tfidf_retriever.py @@ -110,11 +110,11 @@ class TFIDFRetriever(SparseRetriever, ChunkScorer): ) REPRESENTATION = MultilingualString( - en="similarity {similarity_function} · top-k {top_k}", - es="similitud {similarity_function} · top-k {top_k}", - pt="similaridade {similarity_function} · top-k {top_k}", - de="Ähnlichkeit {similarity_function} · top-k {top_k}", - zh="相似度 {similarity_function} · top-k {top_k}", + en="similarity {similarity_function}, top-k {top_k}", + es="similitud {similarity_function}, top-k {top_k}", + pt="similaridade {similarity_function}, top-k {top_k}", + de="Ähnlichkeit {similarity_function}, top-k {top_k}", + zh="相似度 {similarity_function},top-k {top_k}", ) SCHEMA = TFIDFRetrieverSchema diff --git a/DashAI/back/models/RAG/retrievers/trace_utils.py b/DashAI/back/models/RAG/retrievers/trace_utils.py index 64ae0b7430..657ce4d537 100644 --- a/DashAI/back/models/RAG/retrievers/trace_utils.py +++ b/DashAI/back/models/RAG/retrievers/trace_utils.py @@ -30,7 +30,13 @@ from DashAI.back.models.RAG.retrievers.retrieval_contracts import SchemaSummary #: Text rendered when a representation placeholder cannot be resolved. -_MISSING_VALUE = "—" +_MISSING_VALUE = MultilingualString( + en="not set", + es="sin definir", + pt="não definido", + de="nicht gesetzt", + zh="未设置", +) #: Languages declared by :class:`MultilingualString`. _LANGUAGES = ("en", "es", "pt", "de", "zh") @@ -41,43 +47,57 @@ _CANONICAL_KEYS = ("name", "chunks", "description", "representation", "schema_summary") -def _render_primitive(value: Any) -> str: - """Render a scalar parameter value, or :data:`_MISSING_VALUE`.""" +def _render_primitive(value: Any) -> str | None: + """Render a scalar parameter value, or ``None`` when it cannot be shown.""" if isinstance(value, (str, int, float, bool)): - text = str(value) - return text if text else _MISSING_VALUE - return _MISSING_VALUE + return str(value) or None + return None -def _resolve_param(params: Any, path: List[str]) -> str: - """Resolve a dotted parameter path against raw construction parameters.""" +def _resolve_param(params: Any, path: List[str]) -> str | None: + """Resolve a dotted parameter path, or ``None`` when it does not resolve.""" if not isinstance(params, dict) or not path: - return _MISSING_VALUE + return None head, *rest = path if not head: - return _MISSING_VALUE + return None raw = params.get(head) if raw is None: - return _MISSING_VALUE + return None ref = raw if is_component_ref(raw) else None if not rest: if ref is not None: - return raw["component"] or _MISSING_VALUE + return raw["component"] or None return _render_primitive(raw) if ref is None: - return _MISSING_VALUE + return None return _resolve_param(ref.get("params"), rest) -def _render_template(template: str, params: Any) -> str | None: +def _render_template(template: str, params: Any, missing: str) -> str | None: """Interpolate a representation template. - A template without placeholders is returned as-is. A template whose + A template without placeholders is returned as is. A template whose placeholders all fail to resolve returns ``None`` so the frontend can fall back to the component description. + + Parameters + ---------- + template : str + The representation template in one language. + params : Any + The raw construction parameters the placeholders resolve against. + missing : str + The text shown, in the template's language, for a placeholder that + does not resolve. + + Returns + ------- + str | None + The rendered template, or ``None`` when no placeholder resolves. """ if not isinstance(template, str) or not template: return None @@ -89,9 +109,10 @@ def replace(match: re.Match) -> str: nonlocal saw_placeholder, resolved_placeholder saw_placeholder = True path = [segment for segment in match.group(1).strip().split(".") if segment] - value = _resolve_param(params, path) if path else _MISSING_VALUE - if value != _MISSING_VALUE: - resolved_placeholder = True + value = _resolve_param(params, path) if path else None + if value is None: + return missing + resolved_placeholder = True return value rendered = _PLACEHOLDER_RE.sub(replace, template) @@ -126,11 +147,11 @@ def _render_representation(model: Any) -> Dict[str, str] | None: return None params = getattr(model, "_trace_params", {}) - rendered = { - language: text - for language, template in templates.items() - if (text := _render_template(template, params)) is not None - } + rendered = {} + for language, template in templates.items(): + text = _render_template(template, params, _MISSING_VALUE.get(language)) + if text is not None: + rendered[language] = text return rendered or None diff --git a/DashAI/back/models/RAG/transformation/base_query_transformation.py b/DashAI/back/models/RAG/transformation/base_query_transformation.py index 4e5d0cc84f..5cfaed5aa1 100644 --- a/DashAI/back/models/RAG/transformation/base_query_transformation.py +++ b/DashAI/back/models/RAG/transformation/base_query_transformation.py @@ -103,7 +103,7 @@ class BaseQueryTransformation(ConfigObject): en="Query Transformation", es="Transformación de Consulta", pt="Transformação de Consulta", - de="Abfrage-Transformation", + de="Abfragetransformation", zh="查询转换", ) diff --git a/DashAI/back/models/RAG/transformation/decomposition.py b/DashAI/back/models/RAG/transformation/decomposition.py index 8996f76f21..5e012e98ad 100644 --- a/DashAI/back/models/RAG/transformation/decomposition.py +++ b/DashAI/back/models/RAG/transformation/decomposition.py @@ -39,7 +39,7 @@ class LLMQueryDecomposerSchema(MultiQueryTransformationSchema): Attributes: prompt: The transformation prompt, defaulting to the decomposition prompt. - max_subqueries: Optional upper bound on the number of sub-queries. + max_subqueries: Optional upper bound on the number of subqueries. A new session suggests :data:`DEFAULT_MAX_SUBQUERIES`; ``None`` removes the cap. """ @@ -59,7 +59,7 @@ class LLMQueryDecomposerSchema(MultiQueryTransformationSchema): none_type(int_field(ge=1)), DEFAULT_MAX_SUBQUERIES, description=MultilingualString( - en="Optional upper bound on the number of sub-queries. Defaults to" + en="Optional upper bound on the number of subqueries. Defaults to" " three; set it to null for no limit.", es="Límite superior opcional del número de subconsultas. Por defecto" " son tres; establécelo en null para no poner límite.", @@ -70,7 +70,7 @@ class LLMQueryDecomposerSchema(MultiQueryTransformationSchema): zh="子查询数量的可选上限。默认为三个;设为 null 表示不限制。", ), alias=MultilingualString( - en="Max sub-queries", + en="Max subqueries", es="Subconsultas máximas", pt="Subconsultas máximas", de="Maximale Teilfragen", @@ -96,7 +96,7 @@ class LLMQueryDecomposer(LLMQueryTransformation): zh="LLM 查询分解器", ) DESCRIPTION: str = MultilingualString( - en="Decomposes a complex question into independently retrievable sub-queries.", + en="Decomposes a complex question into independently retrievable subqueries.", es="Descompone una pregunta compleja en subconsultas recuperables de" " forma independiente.", pt="Decompõe uma pergunta complexa em subconsultas recuperáveis de" diff --git a/DashAI/back/models/RAG/transformation/llm_query_transformation.py b/DashAI/back/models/RAG/transformation/llm_query_transformation.py index 154a40ed6b..c7593ca6cf 100644 --- a/DashAI/back/models/RAG/transformation/llm_query_transformation.py +++ b/DashAI/back/models/RAG/transformation/llm_query_transformation.py @@ -107,7 +107,7 @@ def format_history(history: Sequence[Dict[str, str]], window: int) -> str: if not isinstance(role, str) or not role: raise RAGTransformationConfigError( f"Conversation history entry at index {index} must have a " - "non-empty string 'role'." + "'role' string with text." ) if not isinstance(content, str): raise RAGTransformationConfigError( @@ -750,7 +750,7 @@ def _require_list(self, arguments: Dict[str, Any]) -> List[Any]: entries = arguments.get(self.ARGUMENT_KEY) if not isinstance(entries, list) or not entries: raise RAGTransformationOutputError( - f"The model output does not contain a non-empty " - f"'{self.ARGUMENT_KEY}' list." + f"The model output does not contain a '{self.ARGUMENT_KEY}' list " + "with at least one entry." ) return entries diff --git a/DashAI/back/models/RAG/transformation/rewriting.py b/DashAI/back/models/RAG/transformation/rewriting.py index 1f0de96969..4bb2ff309b 100644 --- a/DashAI/back/models/RAG/transformation/rewriting.py +++ b/DashAI/back/models/RAG/transformation/rewriting.py @@ -103,6 +103,6 @@ def _parse_arguments(self, arguments: Dict[str, Any]) -> List[str]: query = arguments.get(self.ARGUMENT_KEY) if not isinstance(query, str) or not query.strip(): raise RAGTransformationOutputError( - "The rewriting model did not return a non-empty 'query' string." + "The rewriting model did not return a 'query' string with text." ) return [query] diff --git a/DashAI/back/models/cnn_image_classifier.py b/DashAI/back/models/cnn_image_classifier.py index 86b4f0e836..44c9c3d7c7 100644 --- a/DashAI/back/models/cnn_image_classifier.py +++ b/DashAI/back/models/cnn_image_classifier.py @@ -141,17 +141,17 @@ class CNNImageClassifierSchema(BaseSchema): description=MultilingualString( en=( "Number of convolutional blocks. Each block applies a " - "convolution, ReLU activation, and max-pooling that halves " + "convolution, ReLU activation, and max pooling that halves " "the spatial dimensions." ), es=( "Número de bloques convolucionales. Cada bloque aplica una " - "convolución, activación ReLU y max-pooling que reduce a la " + "convolución, activación ReLU y max pooling que reduce a la " "mitad las dimensiones espaciales." ), pt=( "Número de blocos convolucionais. Cada bloco aplica uma " - "convolução, ativação ReLU e max-pooling que reduz à metade " + "convolução, ativação ReLU e max pooling que reduz à metade " "as dimensões espaciais." ), de=( diff --git a/DashAI/back/models/faiss/faiss_dbscan_clustering.py b/DashAI/back/models/faiss/faiss_dbscan_clustering.py index 569399994a..0e29a8a997 100644 --- a/DashAI/back/models/faiss/faiss_dbscan_clustering.py +++ b/DashAI/back/models/faiss/faiss_dbscan_clustering.py @@ -117,11 +117,11 @@ class FaissDBSCANClustering(FaissLikeClusterer): SCHEMA = FaissDBSCANClusteringSchema DISPLAY_NAME = MultilingualString( - en="FAISS-DBSCAN", - es="FAISS-DBSCAN", - pt="FAISS-DBSCAN", - de="FAISS-DBSCAN", - zh="FAISS-DBSCAN", + en="FAISS DBSCAN", + es="FAISS DBSCAN", + pt="FAISS DBSCAN", + de="FAISS DBSCAN", + zh="FAISS DBSCAN", ) DESCRIPTION = MultilingualString( en="DBSCAN with FAISS-accelerated neighbourhood search for large datasets.", diff --git a/DashAI/back/models/faiss/faiss_kmeans_clustering.py b/DashAI/back/models/faiss/faiss_kmeans_clustering.py index e1685e8ccc..8522971c09 100644 --- a/DashAI/back/models/faiss/faiss_kmeans_clustering.py +++ b/DashAI/back/models/faiss/faiss_kmeans_clustering.py @@ -106,22 +106,22 @@ class FaissKMeansClustering(FaissLikeClusterer): ) DESCRIPTION = MultilingualString( en=( - "K-Means via FAISS — C++ vectorised and faster than sklearn " + "K-Means via FAISS: C++ vectorised and faster than sklearn " "on large datasets." ), es=( - "K-Means vía FAISS — vectorización C++, más rápido que sklearn " + "K-Means vía FAISS: vectorización C++, más rápido que sklearn " "en datasets grandes." ), pt=( - "K-Means via FAISS — vetorizado em C++, mais rápido que o sklearn " + "K-Means via FAISS: vetorizado em C++, mais rápido que o sklearn " "em datasets grandes." ), de=( - "K-Means über FAISS — C++-vektorisiert und schneller als sklearn " + "K-Means über FAISS: C++-vektorisiert und schneller als sklearn " "bei großen Datensätzen." ), - zh="通过FAISS实现的K-Means——C++向量化,在大型数据集上比sklearn更快。", + zh="通过FAISS实现的K-Means:C++向量化,在大型数据集上比sklearn更快。", ) COLOR = "#66BB6A" ICON = "FlashOn" diff --git a/DashAI/back/models/forecasting/drift.py b/DashAI/back/models/forecasting/drift.py index d0a24eef8f..2923457775 100644 --- a/DashAI/back/models/forecasting/drift.py +++ b/DashAI/back/models/forecasting/drift.py @@ -61,7 +61,7 @@ class DriftForecaster(SingleSeriesForecastingModel): en="Drift Forecaster", es="Pronóstico con Deriva", pt="Previsão com Deriva", - de="Drift-Prognose", + de="Driftprognose", zh="漂移预测", ) COLOR: str = "#FFCA28" diff --git a/DashAI/back/models/forecasting/mean.py b/DashAI/back/models/forecasting/mean.py index 23cda2c81b..d2dc29d176 100644 --- a/DashAI/back/models/forecasting/mean.py +++ b/DashAI/back/models/forecasting/mean.py @@ -57,7 +57,7 @@ class MeanForecaster(SingleSeriesForecastingModel): en="Mean Forecaster", es="Pronóstico de la Media", pt="Previsão pela Média", - de="Mittelwert-Prognose", + de="Mittelwertprognose", zh="均值预测", ) COLOR: str = "#78909C" diff --git a/DashAI/back/models/forecasting/recursive_regression.py b/DashAI/back/models/forecasting/recursive_regression.py index 33fc8f37f3..97d0513606 100644 --- a/DashAI/back/models/forecasting/recursive_regression.py +++ b/DashAI/back/models/forecasting/recursive_regression.py @@ -231,7 +231,7 @@ class RecursiveRegressionForecasterSchema(BaseSchema): ), de=( "Wie viele Schritte eine Saison bilden. Nur für die " - "Standard-Verzögerungen verwendet: legt fest, wie viele " + "Standardverzögerungen verwendet: legt fest, wie viele " "Verzögerungen gelesen werden, wenn Verzögerungen leer bleibt; " "die Saisonalität modelliert sie nicht. " f"{SEASON_FROM_FREQUENCY.de}" diff --git a/DashAI/back/models/hugging_face/gguf_text_generation_base.py b/DashAI/back/models/hugging_face/gguf_text_generation_base.py index 76fb9c236e..a9465ec4b9 100644 --- a/DashAI/back/models/hugging_face/gguf_text_generation_base.py +++ b/DashAI/back/models/hugging_face/gguf_text_generation_base.py @@ -246,7 +246,7 @@ def _require_gguf_chat_template(model: Any, label: str) -> str: if not isinstance(template, str) or not template.strip(): raise RuntimeError( f"{label} has no chat template in its GGUF metadata, so template " - "variables cannot be applied. Re-download the checkpoint." + "variables cannot be applied. Download the checkpoint again." ) return template @@ -337,35 +337,35 @@ class GGUFTextGenerationSchema(BaseSchema): description=MultilingualString( en=( "Maximum number of new tokens the model will generate per response. " - "Roughly 1 token ≈ 0.75 English words. Set to 100-200 for short " - "answers, 500-1000 for detailed explanations or code. Must not " + "Roughly 1 token ≈ 0.75 English words. Set to 100 to 200 for short " + "answers, 500 to 1000 for detailed explanations or code. Must not " "exceed the context window minus the prompt length." ), es=( "Número máximo de tokens nuevos que el modelo generará por respuesta. " - "Aproximadamente 1 token ≈ 0.75 palabras en español. Use 100-200 " - "para respuestas cortas, 500-1000 para explicaciones detalladas o " + "Aproximadamente 1 token ≈ 0.75 palabras en español. Use 100 a 200 " + "para respuestas cortas, 500 a 1000 para explicaciones detalladas o " "código. No debe superar la ventana de contexto menos la longitud " "del prompt." ), pt=( "Número máximo de tokens novos que o modelo gerará por resposta. " - "Aproximadamente 1 token ≈ 0.75 palavras em português. Use 100-200 " - "para respostas curtas, 500-1000 para explicações detalhadas ou " + "Aproximadamente 1 token ≈ 0.75 palavras em português. Use 100 a 200 " + "para respostas curtas, 500 a 1000 para explicações detalhadas ou " "código. Não deve exceder a janela de contexto menos o comprimento " "do prompt." ), de=( "Maximale Anzahl neuer Token, die das Modell pro Antwort erzeugt. " - "Ungefähr 1 Token ≈ 0,75 englische Wörter. 100-200 für kurze " - "Antworten, 500-1000 für ausführliche Erklärungen oder Code. " + "Ungefähr 1 Token ≈ 0,75 englische Wörter. 100 bis 200 für kurze " + "Antworten, 500 bis 1000 für ausführliche Erklärungen oder Code. " "Darf die Kontextfenstergröße abzüglich der Prompt-Länge nicht " "überschreiten." ), zh=( "模型每次响应生成的最大新 token 数量。" - "大约 1 token 约等于 0.75 个英文单词。短答案设为 100-200," - "详细说明或代码设为 500-1000。不得超过上下文窗口减去提示词长度的值。" + "大约 1 token 约等于 0.75 个英文单词。短答案设为 100至200," + "详细说明或代码设为 500至1000。不得超过上下文窗口减去提示词长度的值。" ), ), alias=MultilingualString( @@ -382,34 +382,36 @@ class GGUFTextGenerationSchema(BaseSchema): placeholder=0.7, description=MultilingualString( en=( - "Sampling temperature controlling output randomness (range 0.0-1.0). " + "Sampling temperature controlling output randomness (range 0.0 to " + "1.0). " "At 0.0 the model always picks the most likely token (greedy, fully " "deterministic). Around 0.7 is a good balance for conversational " "tasks. At 1.0 outputs are maximally varied and unpredictable." ), es=( "Temperatura de muestreo que controla la aleatoriedad de la salida " - "(rango 0.0-1.0). En 0.0 el modelo siempre elige el token más " + "(rango 0.0 a 1.0). En 0.0 el modelo siempre elige el token más " "probable (greedy, totalmente determinista). Alrededor de 0.7 es " "un buen equilibrio para tareas conversacionales. En 1.0 las " "salidas son máximamente variadas e impredecibles." ), pt=( "Temperatura de amostragem que controla a aleatoriedade da saída " - "(intervalo 0.0-1.0). Em 0.0 o modelo sempre escolhe o token mais " + "(intervalo 0.0 a 1.0). Em 0.0 o modelo sempre escolhe o token mais " "provável (greedy, totalmente determinístico). Em torno de 0.7 é " "um bom equilíbrio para tarefas conversacionais. Em 1.0 as " "saídas são maximamente variadas e imprevisíveis." ), de=( - "Stichprobentemperatur zur Steuerung der Ausgabezufälligkeit (0.0-1.0)." + "Stichprobentemperatur zur Steuerung der Ausgabezufälligkeit (0.0 bis " + "1.0)." "Bei 0.0 wählt das Modell stets den wahrscheinlichsten Token (greedy, " "vollständig deterministisch). Um 0.7 ist ein gutes Gleichgewicht für " "Konversationsaufgaben. Bei 1.0 sind Ausgaben maximal variiert und " "unvorhersehbar." ), zh=( - "控制输出随机性的采样温度(范围 0.0-1.0)。" + "控制输出随机性的采样温度(范围 0.0至1.0)。" "0.0 时模型始终选择最可能的 token(贪心,完全确定性)。" "0.7 左右是对话任务的良好平衡点。1.0 时输出变化最大,不可预测。" ), @@ -429,37 +431,37 @@ class GGUFTextGenerationSchema(BaseSchema): description=MultilingualString( en=( "Penalizes tokens that have already appeared in the output based on " - "how often they occur (range 0.0-2.0). At 0.0 there is no penalty " - "and the model may repeat itself. Values around 0.1-0.3 gently " + "how often they occur (range 0.0 to 2.0). At 0.0 there is no penalty " + "and the model may repeat itself. Values around 0.1 to 0.3 gently " "discourage repetition. High values (1.5+) strongly prevent reuse " "of any word, which may produce less coherent text." ), es=( "Penaliza los tokens que ya aparecieron en la salida según su " - "frecuencia (rango 0.0-2.0). En 0.0 no hay penalización y el modelo " - "puede repetirse. Valores en torno a 0.1-0.3 desincentivan " + "frecuencia (rango 0.0 a 2.0). En 0.0 no hay penalización y el modelo " + "puede repetirse. Valores entre 0.1 y 0.3 desincentivan " "suavemente la repetición. Valores altos (1.5+) previenen " "fuertemente la reutilización de palabras, lo que puede producir " "texto menos coherente." ), pt=( "Penaliza os tokens que já apareceram na saída com base em " - "sua frequência (intervalo 0.0-2.0). Em 0.0 não há penalização e o " - "modelo pode se repetir. Valores em torno de 0.1-0.3 desestimulam " + "sua frequência (intervalo 0.0 a 2.0). Em 0.0 não há penalização e o " + "modelo pode se repetir. Valores entre 0.1 e 0.3 desestimulam " "suavemente a repetição. Valores altos (1.5+) impedem fortemente a " "reutilização de palavras, o que pode produzir texto menos coerente." ), de=( "Bestraft Token, die bereits in der Ausgabe erschienen sind, " - "basierend auf ihrer Häufigkeit (0.0-2.0). Bei 0.0 gibt es keine " - "Strafe und das Modell kann sich wiederholen. Werte um 0.1-0.3 " + "basierend auf ihrer Häufigkeit (0.0 bis 2.0). Bei 0.0 gibt es keine " + "Strafe und das Modell kann sich wiederholen. Werte um 0.1 bis 0.3 " "hemmen Wiederholungen sanft. Hohe Werte (1.5+) verhindern die " "Wiederverwendung von Wörtern stark, was zu weniger kohärentem Text " "führen kann." ), zh=( - "根据 token 在输出中出现的频率对其进行惩罚(范围 0.0-2.0)。" - "0.0 时无惩罚,模型可能重复输出。0.1-0.3 左右可轻微抑制重复。" + "根据 token 在输出中出现的频率对其进行惩罚(范围 0.0至2.0)。" + "0.0 时无惩罚,模型可能重复输出。0.1至0.3 左右可轻微抑制重复。" "高值(1.5+)会强烈阻止任何词的复用,可能导致文本连贯性下降。" ), ), @@ -640,7 +642,7 @@ def _local_gguf_path(cls): f"{cls.__name__} could not find a downloaded GGUF file for repo " f"{cls.REPO_ID!r} in '{repo_dir}' matching GGUF_PATTERN " f"{pattern!r}. The download is missing or incomplete; " - "re-download the component before using it." + "download the component again before using it." ) return matches[0] diff --git a/DashAI/back/models/hugging_face/llama_utils.py b/DashAI/back/models/hugging_face/llama_utils.py index fe7e73a353..646911a194 100644 --- a/DashAI/back/models/hugging_face/llama_utils.py +++ b/DashAI/back/models/hugging_face/llama_utils.py @@ -89,8 +89,8 @@ _FILE_ERROR_HEADER = "Could not read GGUF model file '{model_label}' from {model_path}." _FILE_ERROR_ORIGINAL = "file: {original}" _FILE_ERROR_HINT = ( - "The model file is missing, unreadable or incomplete. Re-download the " - "checkpoint and try again." + "The model file is missing, unreadable or incomplete. Download the " + "checkpoint again and retry." ) #: Sentence used when llama.cpp reports free GPU memory. diff --git a/DashAI/back/models/hugging_face/opus_mt_en_roa_transformer.py b/DashAI/back/models/hugging_face/opus_mt_en_roa_transformer.py index c6a090c5db..cd927301b6 100644 --- a/DashAI/back/models/hugging_face/opus_mt_en_roa_transformer.py +++ b/DashAI/back/models/hugging_face/opus_mt_en_roa_transformer.py @@ -87,7 +87,7 @@ class OpusMtEnRoaTransformer(OpusMtTransformerMixin): es="Transformer Opus MT En-Roa", pt="Transformer Opus MT En-Roa", de="Opus MT En-Roa Transformer", - zh="Opus MT 英语-罗曼语翻译 Transformer", + zh="Opus MT 英语到罗曼语翻译 Transformer", ) DESCRIPTION: str = MultilingualString( en=( diff --git a/DashAI/back/models/hugging_face/opus_mt_roa_en_transformer.py b/DashAI/back/models/hugging_face/opus_mt_roa_en_transformer.py index 5d1f189f0b..43d653a4c1 100644 --- a/DashAI/back/models/hugging_face/opus_mt_roa_en_transformer.py +++ b/DashAI/back/models/hugging_face/opus_mt_roa_en_transformer.py @@ -37,7 +37,7 @@ class OpusMtRoaEnTransformer(OpusMtTransformerMixin): es="Transformer Opus MT Roa-En", pt="Transformer Opus MT Roa-En", de="Opus MT Roa-En Transformer", - zh="Opus MT 罗曼语-英语翻译 Transformer", + zh="Opus MT 罗曼语到英语翻译 Transformer", ) DESCRIPTION: str = MultilingualString( en=( diff --git a/DashAI/back/models/hugging_face/phi_4_mini_instruct_model.py b/DashAI/back/models/hugging_face/phi_4_mini_instruct_model.py index 12d1bf0f08..0dc70bc209 100644 --- a/DashAI/back/models/hugging_face/phi_4_mini_instruct_model.py +++ b/DashAI/back/models/hugging_face/phi_4_mini_instruct_model.py @@ -39,7 +39,7 @@ class Phi4MiniInstructSchema(BaseSchema): description=MultilingualString( en=( "Phi-4-mini-instruct is a lightweight open model built upon" - " synthetic data and filtered publicly available websites -" + " synthetic data and filtered publicly available websites," " with a focus on high-quality, reasoning dense data. The" " model belongs to the Phi-4 model family and supports" " 128K token context length. The model underwent an" @@ -169,30 +169,30 @@ class Phi4MiniInstructSchema(BaseSchema): description=MultilingualString( en=( "Maximum number of new tokens the model will generate per response. " - "Roughly 1 token ≈ 0.75 English words. Set to 100-200 for short " - "answers, 500-1000 for detailed explanations or code." + "Roughly 1 token ≈ 0.75 English words. Set to 100 to 200 for short " + "answers, 500 to 1000 for detailed explanations or code." ), es=( "Número máximo de tokens nuevos que el modelo generará por respuesta. " - "Aproximadamente 1 token ≈ 0.75 palabras en español. Use 100-200 " - "para respuestas cortas, 500-1000 para explicaciones detalladas " + "Aproximadamente 1 token ≈ 0.75 palabras en español. Use 100 a 200 " + "para respuestas cortas, 500 a 1000 para explicaciones detalladas " "o código." ), pt=( "Número máximo de tokens novos que o modelo gerará por resposta. " - "Aproximadamente 1 token ≈ 0.75 palavras em português. Use 100-200 " - "para respostas curtas, 500-1000 para explicações detalhadas ou " + "Aproximadamente 1 token ≈ 0.75 palavras em português. Use 100 a 200 " + "para respostas curtas, 500 a 1000 para explicações detalhadas ou " "código." ), de=( "Maximale Anzahl neuer Token, die das Modell pro Antwort erzeugt. " - "Ungefähr 1 Token ≈ 0,75 englische Wörter. 100-200 für kurze " - "Antworten, 500-1000 für ausführliche Erklärungen oder Code." + "Ungefähr 1 Token ≈ 0,75 englische Wörter. 100 bis 200 für kurze " + "Antworten, 500 bis 1000 für ausführliche Erklärungen oder Code." ), zh=( "模型每次响应生成的最大新 token 数量。" - "大约 1 token 约等于 0.75 个英文单词。短答案设为 100-200," - "详细说明或代码设为 500-1000。" + "大约 1 token 约等于 0.75 个英文单词。短答案设为 100至200," + "详细说明或代码设为 500至1000。" ), ), alias=MultilingualString( @@ -209,31 +209,34 @@ class Phi4MiniInstructSchema(BaseSchema): placeholder=0.7, description=MultilingualString( en=( - "Sampling temperature controlling output randomness (range 0.0-1.0). " + "Sampling temperature controlling output randomness (range 0.0 to " + "1.0). " "At 0.0 the model picks the most likely token (deterministic). " "Around 0.7 balances quality and creativity. At 1.0 outputs are " "maximally varied." ), es=( - "Temperatura de muestreo que controla la aleatoriedad (rango 0.0-1.0). " + "Temperatura de muestreo que controla la aleatoriedad (rango 0.0 a " + "1.0). " "En 0.0 el modelo elige el token más probable (determinista). " "Alrededor de 0.7 equilibra calidad y creatividad. En 1.0 las salidas " "son máximamente variadas." ), pt=( "Temperatura de amostragem que controla a aleatoriedade da saída " - "(intervalo 0.0-1.0). Em 0.0 o modelo escolhe o token mais " + "(intervalo 0.0 a 1.0). Em 0.0 o modelo escolhe o token mais " "provável (determinístico). Em torno de 0.7 equilibra qualidade " "e criatividade. Em 1.0 as saídas são maximamente variadas." ), de=( "Stichprobentemperatur zur Steuerung der Ausgabezufälligkeit " - "(Bereich 0.0-1.0). Bei 0.0 wählt das Modell den wahrscheinlichsten " + "(Bereich 0.0 bis 1.0). Bei 0.0 wählt das Modell den " + "wahrscheinlichsten " "Token (deterministisch). Um 0.7 werden Qualität und Kreativität " "ausbalanciert. Bei 1.0 sind die Ausgaben maximal variiert." ), zh=( - "控制输出随机性的采样温度(范围 0.0-1.0)。" + "控制输出随机性的采样温度(范围 0.0至1.0)。" "0.0 时模型选择最可能的 token(确定性)。" "0.7 左右可平衡质量与创造力。1.0 时输出变化最大。" ), @@ -253,25 +256,25 @@ class Phi4MiniInstructSchema(BaseSchema): description=MultilingualString( en=( "Penalizes tokens that have already appeared in the output based on " - "frequency (range 0.0-2.0). Higher values discourage repetition." + "frequency (range 0.0 to 2.0). Higher values discourage repetition." ), es=( "Penaliza los tokens que ya aparecieron en la salida según su " - "frecuencia (rango 0.0-2.0). Valores más altos desincentivan " + "frecuencia (rango 0.0 a 2.0). Valores más altos desincentivan " "la repetición." ), pt=( "Penaliza os tokens que já apareceram na saída com base em sua " - "frequência (intervalo 0.0-2.0). Valores mais altos desestimulam " + "frequência (intervalo 0.0 a 2.0). Valores mais altos desestimulam " "a repetição." ), de=( "Bestraft Token, die bereits in der Ausgabe erschienen sind, " - "basierend auf ihrer Häufigkeit (Bereich 0.0-2.0). Höhere Werte " + "basierend auf ihrer Häufigkeit (Bereich 0.0 bis 2.0). Höhere Werte " "verhindern Wiederholungen." ), zh=( - "根据 token 在输出中出现的频率对其进行惩罚(范围 0.0-2.0)。" + "根据 token 在输出中出现的频率对其进行惩罚(范围 0.0至2.0)。" "更高的值可抑制重复。" ), ), @@ -375,7 +378,7 @@ class Phi4MiniInstructModel(TextToTextGenerationTaskModel): DESCRIPTION: str = MultilingualString( en=( "Phi-4-mini-instruct is a lightweight open model built upon" - " synthetic data and filtered publicly available websites -" + " synthetic data and filtered publicly available websites," " with a focus on high-quality, reasoning dense data. The" " model belongs to the Phi-4 model family and supports" " 128K token context length. The model underwent an" diff --git a/DashAI/back/models/hugging_face/pixart_sigma_model.py b/DashAI/back/models/hugging_face/pixart_sigma_model.py index 523fbd2f96..0987ade72c 100644 --- a/DashAI/back/models/hugging_face/pixart_sigma_model.py +++ b/DashAI/back/models/hugging_face/pixart_sigma_model.py @@ -123,27 +123,28 @@ class PixArtSigmaSchema(BaseSchema): description=MultilingualString( en=( "Number of denoising steps. PixArt-Sigma achieves good quality with " - "14-25 steps due to its efficient transformer architecture. " + "14 to 25 steps due to its efficient transformer architecture. " "More steps refine details but increase generation time." ), es=( "Número de pasos de eliminación de ruido. PixArt-Sigma logra buena " - "calidad con 14-25 pasos gracias a su eficiente arquitectura " + "calidad con 14 a 25 pasos gracias a su eficiente arquitectura " "transformer. Más pasos refinan detalles pero aumentan el tiempo." ), pt=( "Número de etapas de inferência. PixArt-Sigma atinge boa qualidade " - "com 14-25 etapas graças à sua eficiente arquitetura transformer. " + "com 14 a 25 etapas graças à sua eficiente arquitetura transformer. " "Mais etapas refinam detalhes, mas aumentam o tempo de geração." ), de=( "Anzahl der Entrauschungsschritte. PixArt-Sigma erreicht dank seiner " - "effizienten Transformer-Architektur mit 14-25 Schritten gute Qualität." + "effizienten Transformer-Architektur mit 14 bis 25 Schritten gute " + "Qualität." "Mehr Schritte verfeinern Details, erhöhen aber die Generierungszeit." ), zh=( "去噪步数。PixArt-Sigma 凭借其高效的 Transformer 架构," - "使用 14-25 步即可获得良好质量。" + "使用 14至25 步即可获得良好质量。" "步数越多,细节越精细,但生成时间也会增加。" ), ), @@ -163,25 +164,25 @@ class PixArtSigmaSchema(BaseSchema): description=MultilingualString( en=( "Classifier-Free Guidance (CFG) scale. PixArt-Sigma works best " - "with lower values (3.5-5.5) compared to U-Net models. " + "with lower values (3.5 to 5.5) compared to U-Net models. " "Higher values enforce the prompt more strictly but may saturate " "colors. The default of 4.5 is recommended." ), es=( "Escala de Classifier-Free Guidance (CFG). PixArt-Sigma funciona " - "mejor con valores más bajos (3.5-5.5) comparado con modelos U-Net. " + "mejor con valores más bajos (3.5 a 5.5) comparado con modelos U-Net. " "Valores más altos refuerzan el prompt pero pueden saturar colores. " "El valor por defecto de 4.5 es recomendado." ), pt=( "Escala de Classifier-Free Guidance (CFG). PixArt-Sigma funciona " - "melhor com valores mais baixos (3.5-5.5) em comparação com modelos " + "melhor com valores mais baixos (3.5 a 5.5) em comparação com modelos " "U-Net. Valores mais altos reforçam o prompt, mas podem saturar as " "cores. O valor padrão de 4.5 é recomendado." ), de=( "Classifier-Free Guidance (CFG)-Skala. PixArt-Sigma funktioniert " - "am besten mit niedrigeren Werten (3,5-5,5) im Vergleich zu " + "am besten mit niedrigeren Werten (3,5 bis 5,5) im Vergleich zu " "U-Net-Modellen. " "Höhere Werte erzwingen den Prompt stärker, können aber Farben " "übersättigen. " @@ -189,7 +190,7 @@ class PixArtSigmaSchema(BaseSchema): ), zh=( "无分类器引导(CFG)缩放值。与 U-Net 模型相比,PixArt-Sigma " - "在较低值(3.5-5.5)下效果最佳。" + "在较低值(3.5至5.5)下效果最佳。" "较高的值会更严格地执行提示词,但可能导致颜色过饱和。" "推荐使用默认值 4.5。" ), @@ -258,7 +259,8 @@ class PixArtSigmaSchema(BaseSchema): "fixo sempre produz a mesma imagem. Use -1 para uma semente aleatória." ), de=( - "Zufalls-Seed für reproduzierbare Generierung. Ein fester positiver " + "Zufallsstartwert für reproduzierbare Generierung. Ein fester " + "positiver " "Integer erzeugt stets dasselbe Bild. Verwenden Sie -1 für einen " "zufälligen Seed." ), diff --git a/DashAI/back/models/hugging_face/sd15_depth_controlnet_model.py b/DashAI/back/models/hugging_face/sd15_depth_controlnet_model.py index 128dd3978f..1aecf2dae6 100644 --- a/DashAI/back/models/hugging_face/sd15_depth_controlnet_model.py +++ b/DashAI/back/models/hugging_face/sd15_depth_controlnet_model.py @@ -37,27 +37,27 @@ class SD15DepthControlNetSchema(BaseSchema): description=MultilingualString( en=( "Number of denoising steps to run. More steps refine the image but " - "increase generation time. Typical range: 20-30 for fast results, " - "40-50 for higher quality." + "increase generation time. Typical range: 20 to 30 for fast results, " + "40 to 50 for higher quality." ), es=( "Número de pasos de eliminación de ruido. Más pasos refinan la imagen " - "pero aumentan el tiempo de generación. Rango típico: 20-30 para " - "resultados rápidos, 40-50 para mayor calidad." + "pero aumentan el tiempo de generación. Rango típico: 20 a 30 para " + "resultados rápidos, 40 a 50 para mayor calidad." ), pt=( "Número de passos de eliminação de ruído. Mais passos refinam a imagem " - "mas aumentam o tempo de geração. Intervalo típico: 20-30 para " - "resultados rápidos, 40-50 para maior qualidade." + "mas aumentam o tempo de geração. Intervalo típico: 20 a 30 para " + "resultados rápidos, 40 a 50 para maior qualidade." ), de=( "Anzahl der Entrauschungsschritte. Mehr Schritte verfeinern das Bild, " - "erhöhen aber die Generierungszeit. Typischer Bereich: 20-30 für " - "schnelle Ergebnisse, 40-50 für höhere Qualität." + "erhöhen aber die Generierungszeit. Typischer Bereich: 20 bis 30 für " + "schnelle Ergebnisse, 40 bis 50 für höhere Qualität." ), zh=( "去噪步数。步数越多图像越精细,但生成时间也越长。" - "典型范围:20-30 步适合快速生成,40-50 步适合更高质量。" + "典型范围:20至30 步适合快速生成,40至50 步适合更高质量。" ), ), alias=MultilingualString( @@ -75,30 +75,32 @@ class SD15DepthControlNetSchema(BaseSchema): description=MultilingualString( en=( "Weight of the ControlNet depth conditioning relative to the base " - "diffusion pipeline (range 0.0-2.0). At 0.0 the depth map has no " + "diffusion pipeline (range 0.0 to 2.0). At 0.0 the depth map has no " "effect; at 1.0 the output closely follows the input structure; " "above 1.5 depth dominates and may produce rigid results." ), es=( - "Peso del condicionamiento de profundidad ControlNet (rango 0.0-2.0). " + "Peso del condicionamiento de profundidad ControlNet (rango 0.0 a " + "2.0). " "En 0.0 el mapa de profundidad no tiene efecto; en 1.0 la salida sigue " "la estructura de la entrada; por encima de 1.5 domina la profundidad " "y puede producir resultados rígidos." ), pt=( "Peso do condicionamento de profundidade do ControlNet (intervalo " - "0.0-2.0). Em 0.0 o mapa de profundidade não tem efeito; em 1.0 a " + "0.0 a 2.0). Em 0.0 o mapa de profundidade não tem efeito; em 1.0 a " "saída segue de perto a estrutura da entrada; acima de 1.5 a " "profundidade domina e pode produzir resultados rígidos." ), de=( - "Gewichtung des ControlNet-Tiefenkonditionierens (Bereich 0.0-2.0). " + "Gewichtung des ControlNet-Tiefenkonditionierens (Bereich 0.0 bis " + "2.0). " "Bei 0.0 hat die Tiefenkarte keinen Effekt; bei 1.0 folgt die Ausgabe " "eng der Eingangsstruktur; über 1.5 dominiert die Tiefe und kann zu " "starren Ergebnissen führen." ), zh=( - "ControlNet 深度条件权重(范围 0.0-2.0)。" + "ControlNet 深度条件权重(范围 0.0至2.0)。" "0.0 时深度图无效果;1.0 时输出紧随输入结构;" "超过 1.5 时深度主导,可能产生僵硬结果。" ), @@ -119,24 +121,24 @@ class SD15DepthControlNetSchema(BaseSchema): description=MultilingualString( en=( "Classifier-Free Guidance (CFG) scale. Controls how strictly the " - "image follows the text prompt. Values 7-9 are typical for SD 1.5." + "image follows the text prompt. Values 7 to 9 are typical for SD 1.5." ), es=( "Escala de Classifier-Free Guidance (CFG). Controla qué tan " - "estrictamente la imagen sigue el prompt. Valores 7-9 son típicos " + "estrictamente la imagen sigue el prompt. Valores 7 a 9 son típicos " "para SD 1.5." ), pt=( "Escala de Orientação Livre de Classificador (CFG). Controla com que " - "rigor a imagem segue o prompt. Valores 7-9 são típicos para SD 1.5." + "rigor a imagem segue o prompt. Valores 7 a 9 são típicos para SD 1.5." ), de=( "Classifier-Free Guidance (CFG)-Skala. Steuert, wie streng das Bild " - "dem Text-Prompt folgt. Werte 7-9 sind typisch für SD 1.5." + "dem Text-Prompt folgt. Werte 7 bis 9 sind typisch für SD 1.5." ), zh=( "无分类器引导(CFG)缩放系数。控制图像对文本提示的遵从程度。" - "SD 1.5 典型值为 7-9。" + "SD 1.5 典型值为 7至9。" ), ), alias=MultilingualString( diff --git a/DashAI/back/models/hugging_face/sd15_hed_controlnet_model.py b/DashAI/back/models/hugging_face/sd15_hed_controlnet_model.py index 4d7aabc3fa..08ffdc33dd 100644 --- a/DashAI/back/models/hugging_face/sd15_hed_controlnet_model.py +++ b/DashAI/back/models/hugging_face/sd15_hed_controlnet_model.py @@ -36,22 +36,23 @@ class SD15HEDControlNetSchema(BaseSchema): placeholder=20, description=MultilingualString( en=( - "Number of denoising steps. Typical range: 20-30 for fast results, " - "40-50 for higher quality." + "Number of denoising steps. Typical range: 20 to 30 for fast results, " + "40 to 50 for higher quality." ), es=( - "Número de pasos de eliminación de ruido. Rango típico: 20-30 para " - "resultados rápidos, 40-50 para mayor calidad." + "Número de pasos de eliminación de ruido. Rango típico: 20 a 30 para " + "resultados rápidos, 40 a 50 para mayor calidad." ), pt=( - "Número de passos de eliminação de ruído. Intervalo típico: 20-30 para " - "resultados rápidos, 40-50 para maior qualidade." + "Número de passos de eliminação de ruído. Intervalo típico: 20 a 30 " + "para " + "resultados rápidos, 40 a 50 para maior qualidade." ), de=( - "Anzahl der Entrauschungsschritte. Typischer Bereich: 20-30 für " - "schnelle Ergebnisse, 40-50 für höhere Qualität." + "Anzahl der Entrauschungsschritte. Typischer Bereich: 20 bis 30 für " + "schnelle Ergebnisse, 40 bis 50 für höhere Qualität." ), - zh="去噪步数。典型范围:20-30 步获得快速结果,40-50 步获得更高质量。", + zh="去噪步数。典型范围:20至30 步获得快速结果,40至50 步获得更高质量。", ), alias=MultilingualString( en="Num inference steps", @@ -67,13 +68,14 @@ class SD15HEDControlNetSchema(BaseSchema): placeholder=1.0, description=MultilingualString( en=( - "Weight of the ControlNet soft-edge conditioning (range 0.0-2.0). " + "Weight of the ControlNet soft-edge conditioning (range 0.0 to 2.0). " "HED produces soft, sketch-like edge maps that are less strict than " "Canny. At 1.0 the output closely follows the input edges. " "Lower values give more creative freedom." ), es=( - "Peso del condicionamiento de borde suave ControlNet (rango 0.0-2.0). " + "Peso del condicionamiento de borde suave ControlNet (rango 0.0 a " + "2.0). " "HED produce mapas de bordes suaves tipo boceto, menos estrictos " "que Canny. " "En 1.0 la salida sigue de cerca los bordes de entrada. " @@ -81,19 +83,19 @@ class SD15HEDControlNetSchema(BaseSchema): ), pt=( "Peso do condicionamento de borda suave do ControlNet (intervalo " - "0.0-2.0). HED produz mapas de bordas suaves estilo esboço, menos " + "0.0 a 2.0). HED produz mapas de bordas suaves estilo esboço, menos " "rígidos que o Canny. Em 1.0 a saída segue de perto as bordas de " "entrada. Valores menores oferecem mais liberdade criativa." ), de=( "Gewicht der weichen ControlNet-Kantenkonditionierung (Bereich " - "0.0-2.0). " + "0.0 bis 2.0). " "HED erzeugt weiche, skizzenartige Kantenkarten, die weniger streng " "als Canny sind. Bei 1.0 folgt die Ausgabe den Eingabekanten eng. " "Niedrigere Werte bieten mehr kreative Freiheit." ), zh=( - "ControlNet 软边缘条件权重(范围 0.0-2.0)。" + "ControlNet 软边缘条件权重(范围 0.0至2.0)。" "HED 生成类素描的柔和边缘图,比 Canny 更宽松。" "值为 1.0 时输出紧随输入边缘,较低值提供更多创意自由度。" ), @@ -114,23 +116,23 @@ class SD15HEDControlNetSchema(BaseSchema): description=MultilingualString( en=( "Classifier-Free Guidance (CFG) scale. Controls prompt adherence. " - "Values 7-9 are typical for SD 1.5." + "Values 7 to 9 are typical for SD 1.5." ), es=( "Escala CFG. Controla la adherencia al prompt. " - "Valores 7-9 son típicos para SD 1.5." + "Valores 7 a 9 son típicos para SD 1.5." ), pt=( "Escala CFG. Controla a aderência ao prompt. " - "Valores 7-9 são típicos para SD 1.5." + "Valores 7 a 9 são típicos para SD 1.5." ), de=( "CFG-Skala. Steuert die Prompt-Treue. " - "Werte 7-9 sind typisch für SD 1.5." + "Werte 7 bis 9 sind typisch für SD 1.5." ), zh=( "无分类器引导(CFG)比例。控制对提示词的遵循程度。" - "SD 1.5 的典型值为 7-9。" + "SD 1.5 的典型值为 7至9。" ), ), alias=MultilingualString( diff --git a/DashAI/back/models/hugging_face/sd15_openpose_controlnet_model.py b/DashAI/back/models/hugging_face/sd15_openpose_controlnet_model.py index 72d422a3d9..1c5fb6a321 100644 --- a/DashAI/back/models/hugging_face/sd15_openpose_controlnet_model.py +++ b/DashAI/back/models/hugging_face/sd15_openpose_controlnet_model.py @@ -36,22 +36,23 @@ class SD15OpenPoseControlNetSchema(BaseSchema): placeholder=20, description=MultilingualString( en=( - "Number of denoising steps. Typical range: 20-30 for fast results, " - "40-50 for higher quality." + "Number of denoising steps. Typical range: 20 to 30 for fast results, " + "40 to 50 for higher quality." ), es=( - "Número de pasos de eliminación de ruido. Rango típico: 20-30 para " - "resultados rápidos, 40-50 para mayor calidad." + "Número de pasos de eliminación de ruido. Rango típico: 20 a 30 para " + "resultados rápidos, 40 a 50 para mayor calidad." ), pt=( - "Número de passos de eliminação de ruído. Intervalo típico: 20-30 para " - "resultados rápidos, 40-50 para maior qualidade." + "Número de passos de eliminação de ruído. Intervalo típico: 20 a 30 " + "para " + "resultados rápidos, 40 a 50 para maior qualidade." ), de=( - "Anzahl der Entrauschungsschritte. Typischer Bereich: 20-30 für " - "schnelle Ergebnisse, 40-50 für höhere Qualität." + "Anzahl der Entrauschungsschritte. Typischer Bereich: 20 bis 30 für " + "schnelle Ergebnisse, 40 bis 50 für höhere Qualität." ), - zh=("去噪步数。典型范围:20-30 步获得快速结果,40-50 步获得更高质量。"), + zh=("去噪步数。典型范围:20至30 步获得快速结果,40至50 步获得更高质量。"), ), alias=MultilingualString( en="Num inference steps", @@ -67,27 +68,27 @@ class SD15OpenPoseControlNetSchema(BaseSchema): placeholder=1.0, description=MultilingualString( en=( - "Weight of the ControlNet pose conditioning (range 0.0-2.0). " + "Weight of the ControlNet pose conditioning (range 0.0 to 2.0). " "At 1.0 the output closely follows the input pose. Lower values " "allow more creative freedom while preserving the general pose." ), es=( - "Peso del condicionamiento de pose ControlNet (rango 0.0-2.0). " + "Peso del condicionamiento de pose ControlNet (rango 0.0 a 2.0). " "En 1.0 la salida sigue de cerca la pose de entrada. Valores menores " "permiten más libertad creativa manteniendo la pose general." ), pt=( - "Peso do condicionamento de pose do ControlNet (intervalo 0.0-2.0). " + "Peso do condicionamento de pose do ControlNet (intervalo 0.0 a 2.0). " "Em 1.0 a saída segue de perto a pose de entrada. Valores menores " "permitem mais liberdade criativa mantendo a pose geral." ), de=( - "Gewicht der ControlNet-Posenkonditionierung (Bereich 0.0-2.0). " + "Gewicht der ControlNet-Posenkonditionierung (Bereich 0.0 bis 2.0). " "Bei 1.0 folgt die Ausgabe der Eingabepose eng. Niedrigere Werte " "erlauben mehr kreative Freiheit bei Beibehaltung der allgemeinen Pose." ), zh=( - "ControlNet 姿态条件权重(范围 0.0-2.0)。" + "ControlNet 姿态条件权重(范围 0.0至2.0)。" "1.0 时输出紧随输入姿态;较低值在保持整体姿态的同时允许更多创意自由度。" ), ), @@ -107,22 +108,23 @@ class SD15OpenPoseControlNetSchema(BaseSchema): description=MultilingualString( en=( "Classifier-Free Guidance (CFG) scale. Controls prompt adherence. " - "Values 7-9 are typical for SD 1.5." + "Values 7 to 9 are typical for SD 1.5." ), es=( "Escala CFG. Controla la adherencia al prompt. " - "Valores 7-9 son típicos para SD 1.5." + "Valores 7 a 9 son típicos para SD 1.5." ), pt=( "Escala CFG. Controla a aderência ao prompt. " - "Valores 7-9 são típicos para SD 1.5." + "Valores 7 a 9 são típicos para SD 1.5." ), de=( "CFG-Skala. Steuert die Prompt-Treue. " - "Werte 7-9 sind typisch für SD 1.5." + "Werte 7 bis 9 sind typisch für SD 1.5." ), zh=( - "无分类器引导(CFG)缩放。控制提示词的遵循程度。SD 1.5 的典型值为 7-9。" + "无分类器引导(CFG)缩放。控制提示词的遵循程度。SD 1.5 的典型值为 " + "7至9。" ), ), alias=MultilingualString( diff --git a/DashAI/back/models/hugging_face/sdxl_canny_controlnet_model.py b/DashAI/back/models/hugging_face/sdxl_canny_controlnet_model.py index df4429875a..3d5edc8ec9 100644 --- a/DashAI/back/models/hugging_face/sdxl_canny_controlnet_model.py +++ b/DashAI/back/models/hugging_face/sdxl_canny_controlnet_model.py @@ -39,34 +39,35 @@ class SDXLCannyControlNetSchema(BaseSchema): placeholder=100, description=MultilingualString( en=( - "Lower threshold for Canny edge detection (range 0-255). " + "Lower threshold for Canny edge detection (range 0 to 255). " "Edges with gradient below this value are discarded. " "Lower values detect more edges, including weaker ones. " - "Typical range: 50-150." + "Typical range: 50 to 150." ), es=( - "Umbral inferior para la detección de bordes Canny (rango 0-255). " + "Umbral inferior para la detección de bordes Canny (rango 0 a 255). " "Los bordes con gradiente inferior a este valor se descartan. " "Valores menores detectan más bordes, incluyendo los más débiles. " - "Rango típico: 50-150." + "Rango típico: 50 a 150." ), pt=( - "Limiar inferior para detecção de bordas Canny (intervalo 0-255). " + "Limiar inferior para detecção de bordas Canny (intervalo 0 a 255). " "Bordas com gradiente abaixo deste valor são descartadas. " "Valores menores detectam mais bordas, incluindo as mais fracas. " - "Intervalo típico: 50-150." + "Intervalo típico: 50 a 150." ), de=( - "Unterer Schwellenwert für die Canny-Kantenerkennung (Bereich 0-255). " + "Unterer Schwellenwert für die Canny-Kantenerkennung (Bereich 0 bis " + "255). " "Kanten mit Gradientwert unterhalb dieses Werts werden verworfen. " "Niedrigere Werte erkennen mehr Kanten, einschließlich schwächerer. " - "Typischer Bereich: 50-150." + "Typischer Bereich: 50 bis 150." ), zh=( - "Canny 边缘检测的下限阈值(范围 0-255)。" + "Canny 边缘检测的下限阈值(范围 0至255)。" "梯度低于此值的边缘将被丢弃。" "较低的值会检测到更多边缘,包括较弱的边缘。" - "典型范围:50-150。" + "典型范围:50至150。" ), ), alias=MultilingualString( @@ -83,34 +84,35 @@ class SDXLCannyControlNetSchema(BaseSchema): placeholder=200, description=MultilingualString( en=( - "Upper threshold for Canny edge detection (range 0-255). " + "Upper threshold for Canny edge detection (range 0 to 255). " "Edges with gradient above this value are detected. " "Higher values produce fewer but stronger edges. " - "Typical range: 150-250. Must be greater than low_threshold." + "Typical range: 150 to 250. Must be greater than low_threshold." ), es=( - "Umbral superior para la detección de bordes Canny (rango 0-255). " + "Umbral superior para la detección de bordes Canny (rango 0 a 255). " "Los bordes con gradiente superior a este valor se detectan. " "Valores mayores producen menos bordes pero más fuertes. " - "Rango típico: 150-250. Debe ser mayor que low_threshold." + "Rango típico: 150 a 250. Debe ser mayor que low_threshold." ), pt=( - "Limiar superior para detecção de bordas Canny (intervalo 0-255). " + "Limiar superior para detecção de bordas Canny (intervalo 0 a 255). " "Bordas com gradiente acima deste valor são detectadas. " "Valores maiores produzem menos bordas, porém mais fortes. " - "Intervalo típico: 150-250. Deve ser maior que low_threshold." + "Intervalo típico: 150 a 250. Deve ser maior que low_threshold." ), de=( - "Oberer Schwellenwert für die Canny-Kantenerkennung (Bereich 0-255). " + "Oberer Schwellenwert für die Canny-Kantenerkennung (Bereich 0 bis " + "255). " "Kanten mit Gradientwert oberhalb dieses Werts werden erkannt. " "Höhere Werte erzeugen weniger, aber stärkere Kanten. " - "Typischer Bereich: 150-250. Muss größer als low_threshold sein." + "Typischer Bereich: 150 bis 250. Muss größer als low_threshold sein." ), zh=( - "Canny 边缘检测的上限阈值(范围 0-255)。" + "Canny 边缘检测的上限阈值(范围 0至255)。" "梯度高于此值的边缘将被检测。" "较高的值产生更少但更强的边缘。" - "典型范围:150-250。必须大于 low_threshold。" + "典型范围:150至250。必须大于 low_threshold。" ), ), alias=MultilingualString( @@ -128,26 +130,26 @@ class SDXLCannyControlNetSchema(BaseSchema): description=MultilingualString( en=( "Number of denoising steps. SDXL Canny achieves good quality with " - "20-30 steps. More steps improve quality at the cost of " + "20 to 30 steps. More steps improve quality at the cost of " "generation time." ), es=( "Número de pasos de eliminación de ruido. SDXL Canny logra buena " - "calidad con 20-30 pasos. Más pasos mejoran la calidad a costa de " + "calidad con 20 a 30 pasos. Más pasos mejoran la calidad a costa de " "tiempo de generación." ), pt=( "Número de passos de eliminação de ruído. SDXL Canny alcança boa " - "qualidade com 20-30 passos. Mais passos melhoram a qualidade ao " + "qualidade com 20 a 30 passos. Mais passos melhoram a qualidade ao " "custo do tempo de geração." ), de=( "Anzahl der Entrauschungsschritte. SDXL Canny erreicht gute " - "Qualität mit 20-30 Schritten. Mehr Schritte verbessern die " + "Qualität mit 20 bis 30 Schritten. Mehr Schritte verbessern die " "Qualität auf Kosten der Generierungszeit." ), zh=( - "去噪步数。SDXL Canny 在 20-30 步时可达到良好质量。" + "去噪步数。SDXL Canny 在 20至30 步时可达到良好质量。" "更多步数可提升质量,但会增加生成时间。" ), ), @@ -165,31 +167,31 @@ class SDXLCannyControlNetSchema(BaseSchema): placeholder=0.5, description=MultilingualString( en=( - "Weight of the Canny edge conditioning (range 0.0-2.0). " + "Weight of the Canny edge conditioning (range 0.0 to 2.0). " "At 0.5 the edges guide the composition loosely. " "At 1.0 the output closely follows the input edges. " "Higher values produce more rigid edge adherence." ), es=( - "Peso del condicionamiento de bordes Canny (rango 0.0-2.0). " + "Peso del condicionamiento de bordes Canny (rango 0.0 a 2.0). " "En 0.5 los bordes guían la composición ligeramente. " "En 1.0 la salida sigue de cerca los bordes de entrada. " "Valores más altos producen mayor adherencia a los bordes." ), pt=( - "Peso do condicionamento de bordas Canny (intervalo 0.0-2.0). " + "Peso do condicionamento de bordas Canny (intervalo 0.0 a 2.0). " "Em 0.5 as bordas guiam a composição levemente. " "Em 1.0 a saída segue de perto as bordas de entrada. " "Valores mais altos produzem maior aderência às bordas." ), de=( - "Gewicht der Canny-Kantenkonditionierung (Bereich 0.0-2.0). " + "Gewicht der Canny-Kantenkonditionierung (Bereich 0.0 bis 2.0). " "Bei 0.5 führen die Kanten die Komposition lose. " "Bei 1.0 folgt die Ausgabe den Eingabekanten genau. " "Höhere Werte erzeugen stärkere Kantentreue." ), zh=( - "Canny 边缘条件权重(范围 0.0-2.0)。" + "Canny 边缘条件权重(范围 0.0至2.0)。" "0.5 时边缘对构图的引导较为宽松;" "1.0 时输出与输入边缘高度吻合。" "更高的值产生更严格的边缘约束。" diff --git a/DashAI/back/models/hugging_face/sdxl_turbo_model.py b/DashAI/back/models/hugging_face/sdxl_turbo_model.py index 8b2bf2de32..cfcfe8968a 100644 --- a/DashAI/back/models/hugging_face/sdxl_turbo_model.py +++ b/DashAI/back/models/hugging_face/sdxl_turbo_model.py @@ -25,7 +25,7 @@ class SDXLTurboSchema(BaseSchema): """Configuration schema for SDXL Turbo text-to-image generation. Configures the prompt conditioning (``negative_prompt``), number of - denoising steps (``num_inference_steps``; 1-4 is optimal for this + denoising steps (``num_inference_steps``; 1 to 4 is optimal for this distilled model), output dimensions (``width``, ``height``), reproducibility (``seed``), hardware target (``device``), and batch size (``num_images_per_prompt``) for ``SDXLTurboModel``. @@ -90,33 +90,36 @@ class SDXLTurboSchema(BaseSchema): description=MultilingualString( en=( "Number of denoising steps. SDXL Turbo is a distilled model that " - "generates high quality images in just 1-4 steps. Using 1 step is " - "fastest; 2-4 steps improve quality slightly. Values above 4 provide " + "generates high quality images in just 1 to 4 steps. Using 1 step is " + "fastest; 2 to 4 steps improve quality slightly. Values above 4 " + "provide " "diminishing returns for this model." ), es=( "Número de pasos de eliminación de ruido. SDXL Turbo es un modelo " - "destilado que genera imágenes de alta calidad en solo 1-4 pasos. " - "Usar 1 paso es lo más rápido; 2-4 pasos mejoran la calidad " + "destilado que genera imágenes de alta calidad en solo 1 a 4 pasos. " + "Usar 1 paso es lo más rápido; 2 a 4 pasos mejoran la calidad " "ligeramente. Valores superiores a 4 tienen rendimientos " "decrecientes para este modelo." ), pt=( "Número de etapas de inferência. SDXL Turbo é um modelo destilado " - "que gera imagens de alta qualidade em apenas 1-4 etapas. Usar " - "1 etapa é o mais rápido; 2-4 etapas melhoram ligeiramente a " + "que gera imagens de alta qualidade em apenas 1 a 4 etapas. Usar " + "1 etapa é o mais rápido; 2 a 4 etapas melhoram ligeiramente a " "qualidade. Valores acima de 4 têm retornos decrescentes para " "este modelo." ), de=( "Anzahl der Inferenzschritte. SDXL Turbo ist ein destilliertes Modell, " - "das hochwertige Bilder in nur 1-4 Schritten generiert. 1 Schritt ist " - "am schnellsten; 2-4 Schritte verbessern die Qualität leicht. " + "das hochwertige Bilder in nur 1 bis 4 Schritten generiert. 1 Schritt " + "ist " + "am schnellsten; 2 bis 4 Schritte verbessern die Qualität leicht. " "Werte über 4 bieten für dieses Modell abnehmende Erträge." ), zh=( - "去噪步骤数。SDXL Turbo 是一个蒸馏模型,仅需 1-4 步即可生成高质量图像。" - "1 步最快;2-4 步可略微提升质量。超过 4 步对此模型收益递减。" + "去噪步骤数。SDXL Turbo 是一个蒸馏模型,仅需 1至4 " + "步即可生成高质量图像。" + "1 步最快;2至4 步可略微提升质量。超过 4 步对此模型收益递减。" ), ), alias=MultilingualString( @@ -134,28 +137,28 @@ class SDXLTurboSchema(BaseSchema): description=MultilingualString( en=( "Hardware device for inference. SDXL Turbo is fast enough that CPU " - "inference is feasible (30-60 seconds per image). GPU is still " + "inference is feasible (30 to 60 seconds per image). GPU is still " "recommended for real time or batch generation." ), es=( "Dispositivo de hardware para inferencia. SDXL Turbo es lo " "suficientemente rápido como para que la inferencia en CPU sea " - "factible (30-60 segundos por imagen). La GPU sigue siendo " + "factible (30 a 60 segundos por imagen). La GPU sigue siendo " "recomendada para generación en tiempo real o por lotes." ), pt=( "Dispositivo de hardware para inferência. SDXL Turbo é rápido o " - "suficiente para que a inferência em CPU seja viável (30-60 segundos " + "suficiente para que a inferência em CPU seja viável (30 a 60 segundos " "por imagem). GPU ainda é recomendada para geração em tempo real " "ou em lote." ), de=( "Hardware-Gerät für die Inferenz. SDXL Turbo ist schnell genug, " - "dass CPU-Inferenz machbar ist (30-60 Sekunden pro Bild). GPU wird " + "dass CPU-Inferenz machbar ist (30 bis 60 Sekunden pro Bild). GPU wird " "für Echtzeit- oder Stapelgenerierung dennoch empfohlen." ), zh=( - "推理硬件设备。SDXL Turbo 足够快,CPU 推理可行(每张图约 30-60 秒)。" + "推理硬件设备。SDXL Turbo 足够快,CPU 推理可行(每张图约 30至60 秒)。" "实时或批量生成仍推荐使用 GPU。" ), ), @@ -188,7 +191,8 @@ class SDXLTurboSchema(BaseSchema): "cada execução." ), de=( - "Zufalls-Seed für reproduzierbare Generierung. Ein fester positiver " + "Zufallsstartwert für reproduzierbare Generierung. Ein fester " + "positiver " "Integer erzeugt stets dasselbe Bild bei identischen Einstellungen. " "Verwenden Sie einen negativen Wert (z.B. -1) für einen zufälligen " "Seed bei jedem Durchlauf." @@ -382,7 +386,7 @@ class SDXLTurboModel(HFPretrainedDownloadMixin, TextToImageGenerationTaskModel): "mithilfe von Adversarial Diffusion Distillation (ADD) generiert. Erzeugt " "fotorealistische Bilder bei 512x512 px bis zu 30x schneller als " "Standard-SDXL. " - "Ideal für interaktive und Echtzeit-Anwendungen. Hinweis: verwendet keine " + "Ideal für interaktive und Echtzeitanwendungen. Hinweis: verwendet keine " "classifier-free guidance (guidance_scale=0 intern). Modell verfügbar unter" "https://huggingface.co/stabilityai/sdxl-turbo." ), diff --git a/DashAI/back/models/hugging_face/stable_diffusion_v1_depth_controlnet.py b/DashAI/back/models/hugging_face/stable_diffusion_v1_depth_controlnet.py index 406c3196a7..eccd7372c2 100644 --- a/DashAI/back/models/hugging_face/stable_diffusion_v1_depth_controlnet.py +++ b/DashAI/back/models/hugging_face/stable_diffusion_v1_depth_controlnet.py @@ -34,25 +34,25 @@ class StableDiffusionXLV1ControlNetSchema(BaseSchema): description=MultilingualString( en=( "Number of denoising steps to run. More steps refine the image but " - "increase generation time. Typical range: 20-30 for fast results, " - "40-50 for higher quality. Values above 100 rarely improve output." + "increase generation time. Typical range: 20 to 30 for fast results, " + "40 to 50 for higher quality. Values above 100 rarely improve output." ), es=( "Número de pasos de eliminación de ruido a ejecutar. Más pasos " "refinan la imagen pero aumentan el tiempo de generación. Rango " - "típico: 20-30 para resultados rápidos, 40-50 para mayor calidad. " + "típico: 20 a 30 para resultados rápidos, 40 a 50 para mayor calidad. " "Valores superiores a 100 raramente mejoran el resultado." ), pt=( "Número de passos de eliminação de ruído a executar. Mais passos " "refinam a imagem mas aumentam o tempo de geração. Intervalo típico: " - "20-30 para resultados rápidos, 40-50 para maior qualidade. " + "20 a 30 para resultados rápidos, 40 a 50 para maior qualidade. " "Valores acima de 100 raramente melhoram o resultado." ), de=( "Anzahl der Entrauschungsschritte. Mehr Schritte verfeinern das Bild, " - "erhöhen aber die Generierungszeit. Typischer Bereich: 20-30 für " - "schnelle Ergebnisse, 40-50 für höhere Qualität. Werte über 100 " + "erhöhen aber die Generierungszeit. Typischer Bereich: 20 bis 30 für " + "schnelle Ergebnisse, 40 bis 50 für höhere Qualität. Werte über 100 " "verbessern das Ergebnis kaum." ), zh=( @@ -76,14 +76,14 @@ class StableDiffusionXLV1ControlNetSchema(BaseSchema): description=MultilingualString( en=( "Weight of the ControlNet depth conditioning relative to the base " - "diffusion pipeline. Valid range is 0.0-2.0. At 0.0 the depth map " + "diffusion pipeline. Valid range is 0.0 to 2.0. At 0.0 the depth map " "has no effect; at 1.0 (default) the output closely follows the " "input image structure; above 1.5 the depth constraint dominates " "and may produce overly rigid results." ), es=( "Peso del condicionamiento de profundidad ControlNet relativo al " - "pipeline de difusión base. Rango válido: 0.0-2.0. En 0.0 el mapa " + "pipeline de difusión base. Rango válido: 0.0 a 2.0. En 0.0 el mapa " "de profundidad no tiene efecto; en 1.0 (por defecto) la salida " "sigue de cerca la estructura de la imagen de entrada; por encima " "de 1.5 la restricción de profundidad domina y puede producir " @@ -91,13 +91,14 @@ class StableDiffusionXLV1ControlNetSchema(BaseSchema): ), pt=( "Peso do condicionamento de profundidade do ControlNet relativo ao " - "pipeline de difusão base. Intervalo válido: 0.0-2.0. Em 0.0 o mapa " + "pipeline de difusão base. Intervalo válido: 0.0 a 2.0. Em 0.0 o mapa " "de profundidade não tem efeito; em 1.0 (padrão) a saída segue de " "perto a estrutura da imagem de entrada; acima de 1.5 a restrição de " "profundidade domina e pode produzir resultados excessivamente rígidos." ), de=( - "Gewichtung des ControlNet-Tiefenkonditionierens (Bereich 0.0-2.0). " + "Gewichtung des ControlNet-Tiefenkonditionierens (Bereich 0.0 bis " + "2.0). " "Bei 0.0 hat die Tiefenkarte keinen Effekt; bei 1.0 (Standard) folgt " "die Ausgabe eng der Eingangsbildstruktur; über 1.5 dominiert die " "Tiefenbeschränkung und kann zu übermäßig starren Ergebnissen führen." diff --git a/DashAI/back/models/hugging_face/stable_diffusion_v2_model.py b/DashAI/back/models/hugging_face/stable_diffusion_v2_model.py index a7489ce84b..c73c81241b 100644 --- a/DashAI/back/models/hugging_face/stable_diffusion_v2_model.py +++ b/DashAI/back/models/hugging_face/stable_diffusion_v2_model.py @@ -83,31 +83,35 @@ class StableDiffusionSchema(BaseSchema): description=MultilingualString( en=( "Number of denoising steps to run. More steps refine the image but " - "increase generation time. Typical range: 15-30 for fast results, " - "40-50 for higher quality. Values above 100 rarely improve output." + "increase generation time. Typical range: 15 to 30 for fast results, " + "40 to 50 for higher quality. Values above 100 rarely improve output." ), es=( "Número de pasos de eliminación de ruido a ejecutar. Más pasos refinan " - "la imagen pero aumentan el tiempo de generación. Rango típico: 15-30 " - "para resultados rápidos, 40-50 para mayor calidad. Valores superiores " + "la imagen pero aumentan el tiempo de generación. Rango típico: 15 a " + "30 " + "para resultados rápidos, 40 a 50 para mayor calidad. Valores " + "superiores " "a 100 raramente mejoran el resultado." ), pt=( "Número de passos de remoção de ruído a executar. Mais passos refinam " - "a imagem mas aumentam o tempo de geração. Intervalo típico: 15-30 " - "para resultados rápidos, 40-50 para maior qualidade. Valores acima " + "a imagem mas aumentam o tempo de geração. Intervalo típico: 15 a 30 " + "para resultados rápidos, 40 a 50 para maior qualidade. Valores acima " "de 100 raramente melhoram o resultado." ), de=( "Anzahl der auszuführenden Entrauschungsschritte. Mehr Schritte " "verfeinern " - "das Bild, erhöhen aber die Generierungszeit. Typischer Bereich: 15-30 " - "für schnelle Ergebnisse, 40-50 für höhere Qualität. Werte über 100 " + "das Bild, erhöhen aber die Generierungszeit. Typischer Bereich: 15 " + "bis 30 " + "für schnelle Ergebnisse, 40 bis 50 für höhere Qualität. Werte über " + "100 " "verbessern das Ergebnis selten." ), zh=( "去噪步骤数。步骤越多图像越精细,但生成时间越长。" - "典型范围:15-30 步可快速出图,40-50 步质量更高。" + "典型范围:15至30 步可快速出图,40至50 步质量更高。" "超过 100 步时效果提升通常不明显。" ), ), @@ -127,33 +131,36 @@ class StableDiffusionSchema(BaseSchema): description=MultilingualString( en=( "Classifier-Free Guidance (CFG) scale. Controls how strictly the " - "image follows the text prompt. Low values (1-4) allow creative " - "freedom; medium values (5-9) balance quality and adherence; " + "image follows the text prompt. Low values (1 to 4) allow creative " + "freedom; medium values (5 to 9) balance quality and adherence; " "high values (10+) enforce the prompt but may produce artifacts." ), es=( "Escala de Classifier-Free Guidance (CFG). Controla qué tan " "estrictamente la imagen sigue el prompt de texto. Valores bajos " - "(1-4) permiten libertad creativa; valores medios (5-9) equilibran " + "(1 a 4) permiten libertad creativa; valores medios (5 a 9) equilibran " "calidad y adherencia; valores altos (10+) refuerzan el prompt pero " "pueden producir artefactos." ), pt=( "Escala de Classifier-Free Guidance (CFG). Controla quão " "estritamente a imagem segue o prompt de texto. Valores baixos " - "(1-4) permitem liberdade criativa; valores médios (5-9) equilibram " + "(1 a 4) permitem liberdade criativa; valores médios (5 a 9) " + "equilibram " "qualidade e aderência; valores altos (10+) reforçam o prompt mas " "podem produzir artefatos." ), de=( "Classifier-Free Guidance (CFG)-Skala. Steuert, wie streng das Bild " - "dem Textprompt folgt. Niedrige Werte (1-4) erlauben kreative Freiheit;" - "mittlere Werte (5-9) balancieren Qualität und Treue; hohe Werte (10+) " + "dem Textprompt folgt. Niedrige Werte (1 bis 4) erlauben kreative " + "Freiheit;" + "mittlere Werte (5 bis 9) balancieren Qualität und Treue; hohe Werte " + "(10+) " "erzwingen den Prompt, können aber Artefakte erzeugen." ), zh=( "无分类器引导(CFG)比例。控制图像遵循文本提示的严格程度。" - "低值(1-4)允许创意自由;中值(5-9)平衡质量与贴合度;" + "低值(1至4)允许创意自由;中值(5至9)平衡质量与贴合度;" "高值(10+)严格执行提示,但可能产生伪影。" ), ), @@ -228,7 +235,8 @@ class StableDiffusionSchema(BaseSchema): "execução." ), de=( - "Zufalls-Seed für reproduzierbare Generierung. Ein fester positiver " + "Zufallsstartwert für reproduzierbare Generierung. Ein fester " + "positiver " "Integer erzeugt stets dasselbe Bild bei identischen Einstellungen. " "Verwenden Sie einen negativen Wert (z.B. -1) für einen zufälligen " "Seed bei jedem Durchlauf." diff --git a/DashAI/back/models/hugging_face/stable_diffusion_v3_model.py b/DashAI/back/models/hugging_face/stable_diffusion_v3_model.py index 81394d2d2d..d05c4e97d3 100644 --- a/DashAI/back/models/hugging_face/stable_diffusion_v3_model.py +++ b/DashAI/back/models/hugging_face/stable_diffusion_v3_model.py @@ -49,7 +49,7 @@ class StableDiffusionSchema(BaseSchema): "2B-parameter model. 'sd-3.5-medium' improves quality at similar " "speed. 'sd-3.5-large' (8B) delivers the highest quality but needs " "more VRAM. 'sd-3.5-large-turbo' is a distilled large model that " - "requires far fewer steps (4-8) for fast high-quality generation. " + "requires far fewer steps (4 to 8) for fast high-quality generation. " "All variants target 1024x1024 px natively." ), es=( @@ -57,7 +57,7 @@ class StableDiffusionSchema(BaseSchema): "de 2B parámetros. 'sd-3.5-medium' mejora la calidad a velocidad " "similar. 'sd-3.5-large' (8B) ofrece la mayor calidad pero necesita " "más VRAM. 'sd-3.5-large-turbo' es un modelo large destilado que " - "requiere muchos menos pasos (4-8) para generación rápida de alta " + "requiere muchos menos pasos (4 a 8) para generación rápida de alta " "calidad. Todas las variantes apuntan a 1024x1024 px de forma nativa." ), pt=( @@ -65,7 +65,7 @@ class StableDiffusionSchema(BaseSchema): "de 2B parâmetros. 'sd-3.5-medium' melhora a qualidade a velocidade " "similar. 'sd-3.5-large' (8B) oferece a maior qualidade mas precisa " "de mais VRAM. 'sd-3.5-large-turbo' é um modelo large destilado que " - "requer muito menos passos (4-8) para geração rápida de alta " + "requer muito menos passos (4 a 8) para geração rápida de alta " "qualidade. " "Todas as variantes visam 1024x1024 px nativamente." ), @@ -74,14 +74,15 @@ class StableDiffusionSchema(BaseSchema): "2B-Parameter-Basismodell. 'sd-3.5-medium' verbessert die Qualität " "bei ähnlicher Geschwindigkeit. 'sd-3.5-large' (8B) liefert die höchste" "Qualität, benötigt aber mehr VRAM. 'sd-3.5-large-turbo' ist ein " - "destilliertes Large-Modell, das deutlich weniger Schritte (4-8) für " + "destilliertes Large-Modell, das deutlich weniger Schritte (4 bis 8) " + "für " "schnelle hochwertige Generierung benötigt. " "Alle Varianten zielen nativ auf 1024x1024 px ab." ), zh=( "要加载的 SD3/SD3.5 检查点。'sd-3-medium' 是 2B 参数基准模型。" "'sd-3.5-medium' 以相近速度提升质量。'sd-3.5-large'(8B)质量最高但" - "需要更多显存。'sd-3.5-large-turbo' 是蒸馏版大模型,仅需 4-8 步即可" + "需要更多显存。'sd-3.5-large-turbo' 是蒸馏版大模型,仅需 4至8 步即可" "快速生成高质量图像。所有变体原生目标分辨率为 1024x1024 像素。" ), ), @@ -144,34 +145,36 @@ class StableDiffusionSchema(BaseSchema): description=MultilingualString( en=( "Number of denoising steps to run. More steps refine the image but " - "increase generation time. Typical range: 20-40 for standard models; " - "use only 4-8 steps with 'large-turbo'. Values above 50 rarely " + "increase generation time. Typical range: 20 to 40 for standard " + "models; " + "use only 4 to 8 steps with 'large-turbo'. Values above 50 rarely " "improve output for SD3/SD3.5." ), es=( "Número de pasos de eliminación de ruido a ejecutar. Más pasos " "refinan la imagen pero aumentan el tiempo de generación. Rango " - "típico: 20-40 para modelos estándar; use solo 4-8 pasos con " + "típico: 20 a 40 para modelos estándar; use solo 4 a 8 pasos con " "'large-turbo'. Valores superiores a 50 raramente mejoran el " "resultado en SD3/SD3.5." ), pt=( "Número de passos de remoção de ruído a executar. Mais passos " "refinam a imagem mas aumentam o tempo de geração. Intervalo " - "típico: 20-40 para modelos padrão; use apenas 4-8 passos com " + "típico: 20 a 40 para modelos padrão; use apenas 4 a 8 passos com " "'large-turbo'. Valores acima de 50 raramente melhoram o " "resultado para SD3/SD3.5." ), de=( "Anzahl der auszuführenden Entrauschungsschritte. Mehr Schritte " "verfeinern das Bild, erhöhen aber die Generierungszeit. Typischer " - "Bereich: 20-40 für Standardmodelle; verwenden Sie nur 4-8 Schritte " + "Bereich: 20 bis 40 für Standardmodelle; verwenden Sie nur 4 bis 8 " + "Schritte " "mit 'large-turbo'. Werte über 50 verbessern das Ergebnis für " "SD3/SD3.5 selten." ), zh=( - "去噪步数。更多步数可细化图像但会增加生成时间。标准模型典型范围:20-40;" - "'large-turbo' 变体仅需 4-8 步。SD3/SD3.5 超过 50 步很少改善输出质量。" + "去噪步数。更多步数可细化图像但会增加生成时间。标准模型典型范围:20至40;" + "'large-turbo' 变体仅需 4至8 步。SD3/SD3.5 超过 50 步很少改善输出质量。" ), ), alias=MultilingualString( @@ -190,7 +193,7 @@ class StableDiffusionSchema(BaseSchema): description=MultilingualString( en=( "Classifier-Free Guidance (CFG) scale. Controls how strictly the " - "image follows the text prompt. SD3.5 works well at 3.5-4.5. " + "image follows the text prompt. SD3.5 works well at 3.5 to 4.5. " "The 'large-turbo' variant is designed for guidance_scale=1 " "(no CFG). Higher values enforce the prompt but may introduce " "oversaturation or artifacts." @@ -198,20 +201,20 @@ class StableDiffusionSchema(BaseSchema): es=( "Escala de Classifier-Free Guidance (CFG). Controla qué tan " "estrictamente la imagen sigue el prompt. SD3.5 funciona bien con " - "3.5-4.5. La variante 'large-turbo' está diseñada para " + "3.5 a 4.5. La variante 'large-turbo' está diseñada para " "guidance_scale=1 (sin CFG). Valores más altos refuerzan el prompt " "pero pueden introducir sobresaturación o artefactos." ), pt=( "Escala de Classifier-Free Guidance (CFG). Controla quão " "estritamente a imagem segue o prompt. SD3.5 funciona bem com " - "3.5-4.5. A variante 'large-turbo' é projetada para " + "3.5 a 4.5. A variante 'large-turbo' é projetada para " "guidance_scale=1 (sem CFG). Valores mais altos reforçam o prompt " "mas podem introduzir supersaturação ou artefatos." ), de=( "Classifier-Free Guidance (CFG)-Skala. Steuert, wie streng das Bild " - "dem Prompt folgt. SD3.5 funktioniert gut bei 3,5-4,5. Die " + "dem Prompt folgt. SD3.5 funktioniert gut bei 3,5 bis 4,5. Die " "'large-turbo'-" "Variante ist für guidance_scale=1 (kein CFG) ausgelegt. Höhere Werte " "erzwingen den Prompt, können aber Übersättigung oder Artefakte " @@ -219,7 +222,7 @@ class StableDiffusionSchema(BaseSchema): ), zh=( "无分类器引导(CFG)比例。控制图像对文本提示的遵循程度。" - "SD3.5 在 3.5-4.5 效果良好。'large-turbo' 变体设计用于 " + "SD3.5 在 3.5至4.5 效果良好。'large-turbo' 变体设计用于 " "guidance_scale=1(无 CFG)。较高值强化提示但可能引入过饱和或伪影。" ), ), @@ -294,7 +297,8 @@ class StableDiffusionSchema(BaseSchema): "execução." ), de=( - "Zufalls-Seed für reproduzierbare Generierung. Ein fester positiver " + "Zufallsstartwert für reproduzierbare Generierung. Ein fester " + "positiver " "Integer erzeugt stets dasselbe Bild bei identischen Einstellungen. " "Verwenden Sie einen negativen Wert (z.B. -1) für einen zufälligen " "Seed bei jedem Durchlauf." diff --git a/DashAI/back/models/hugging_face/stable_diffusion_xl_model.py b/DashAI/back/models/hugging_face/stable_diffusion_xl_model.py index aec6997c7a..5eeda91f9c 100644 --- a/DashAI/back/models/hugging_face/stable_diffusion_xl_model.py +++ b/DashAI/back/models/hugging_face/stable_diffusion_xl_model.py @@ -83,32 +83,36 @@ class StableDiffusionXLSchema(BaseSchema): description=MultilingualString( en=( "Number of denoising steps to run. More steps refine the image but " - "increase generation time. Typical range: 20-30 for fast results, " - "40-50 for higher quality. SDXL achieves good results with 25-40 steps." + "increase generation time. Typical range: 20 to 30 for fast results, " + "40 to 50 for higher quality. SDXL achieves good results with 25 to 40 " + "steps." ), es=( "Número de pasos de eliminación de ruido a ejecutar. Más pasos refinan " - "la imagen pero aumentan el tiempo de generación. Rango típico: 20-30 " - "para resultados rápidos, 40-50 para mayor calidad. SDXL logra buenos " - "resultados con 25-40 pasos." + "la imagen pero aumentan el tiempo de generación. Rango típico: 20 a " + "30 " + "para resultados rápidos, 40 a 50 para mayor calidad. SDXL logra " + "buenos " + "resultados con 25 a 40 pasos." ), pt=( "Número de passos de remoção de ruído a executar. Mais passos refinam " - "a imagem mas aumentam o tempo de geração. Intervalo típico: 20-30 " - "para resultados rápidos, 40-50 para maior qualidade. SDXL alcança " - "bons resultados com 25-40 passos." + "a imagem mas aumentam o tempo de geração. Intervalo típico: 20 a 30 " + "para resultados rápidos, 40 a 50 para maior qualidade. SDXL alcança " + "bons resultados com 25 a 40 passos." ), de=( "Anzahl der auszuführenden Entrauschungsschritte. Mehr Schritte " "refinieren " - "das Bild, erhöhen aber die Generierungszeit. Typischer Bereich: 20-30 " - "für schnelle Ergebnisse, 40-50 für höhere Qualität. SDXL erzielt " - "gute Ergebnisse mit 25-40 Schritten." + "das Bild, erhöhen aber die Generierungszeit. Typischer Bereich: 20 " + "bis 30 " + "für schnelle Ergebnisse, 40 bis 50 für höhere Qualität. SDXL erzielt " + "gute Ergebnisse mit 25 bis 40 Schritten." ), zh=( "去噪步数。步数越多图像越精细,但生成时间越长。" - "典型范围:20-30 步快速生成,40-50 步更高质量。" - "SDXL 在 25-40 步时效果良好。" + "典型范围:20至30 步快速生成,40至50 步更高质量。" + "SDXL 在 25至40 步时效果良好。" ), ), alias=MultilingualString( @@ -127,38 +131,41 @@ class StableDiffusionXLSchema(BaseSchema): description=MultilingualString( en=( "Classifier-Free Guidance (CFG) scale. Controls how strictly the " - "image follows the text prompt. Low values (1-4) allow creative " - "freedom; medium values (5-9) balance quality and adherence; " + "image follows the text prompt. Low values (1 to 4) allow creative " + "freedom; medium values (5 to 9) balance quality and adherence; " "high values (10+) enforce the prompt but may produce artifacts. " - "SDXL works well with values between 5-9." + "SDXL works well with values from 5 to 9." ), es=( "Escala de Classifier-Free Guidance (CFG). Controla qué tan " - "estrictamente la imagen sigue el prompt. Valores bajos (1-4) permiten " - "libertad creativa; valores medios (5-9) equilibran calidad y " + "estrictamente la imagen sigue el prompt. Valores bajos (1 a 4) " + "permiten " + "libertad creativa; valores medios (5 a 9) equilibran calidad y " "adherencia; valores altos (10+) refuerzan el prompt pero pueden " "producir artefactos. " - "SDXL funciona bien con valores entre 5-9." + "SDXL funciona bien con valores de 5 a 9." ), pt=( "Escala de Classifier-Free Guidance (CFG). Controla quão " - "estritamente a imagem segue o prompt. Valores baixos (1-4) permitem " - "liberdade criativa; valores médios (5-9) equilibram qualidade e " + "estritamente a imagem segue o prompt. Valores baixos (1 a 4) permitem " + "liberdade criativa; valores médios (5 a 9) equilibram qualidade e " "aderência; valores altos (10+) reforçam o prompt mas podem " "produzir artefatos. " - "SDXL funciona bem com valores entre 5-9." + "SDXL funciona bem com valores de 5 a 9." ), de=( "Classifier-Free Guidance (CFG)-Skala. Steuert, wie streng das Bild " - "dem Prompt folgt. Niedrige Werte (1-4) erlauben kreative Freiheit; " - "mittlere Werte (5-9) balancieren Qualität und Treue; hohe Werte (10+) " + "dem Prompt folgt. Niedrige Werte (1 bis 4) erlauben kreative " + "Freiheit; " + "mittlere Werte (5 bis 9) balancieren Qualität und Treue; hohe Werte " + "(10+) " "erzwingen den Prompt, können aber Artefakte erzeugen. " - "SDXL funktioniert gut mit Werten zwischen 5-9." + "SDXL funktioniert gut mit Werten von 5 bis 9." ), zh=( "无分类器引导(CFG)比例。控制图像对文本提示的遵循程度。" - "低值(1-4)允许创意自由;中值(5-9)平衡质量与忠实度;" - "高值(10+)强制执行提示但可能产生伪影。SDXL 在 5-9 之间效果最佳。" + "低值(1至4)允许创意自由;中值(5至9)平衡质量与忠实度;" + "高值(10+)强制执行提示但可能产生伪影。SDXL 在 5 到 9 之间效果最佳。" ), ), alias=MultilingualString( @@ -177,29 +184,29 @@ class StableDiffusionXLSchema(BaseSchema): en=( "Hardware device for inference. Select a GPU option for hardware " "acceleration, strongly recommended for SDXL. CPU inference is very " - "slow for this large model; expect 10-30 minutes per image on CPU." + "slow for this large model; expect 10 to 30 minutes per image on CPU." ), es=( "Dispositivo de hardware para la inferencia. Seleccione GPU para " "aceleración por hardware, muy recomendado para SDXL. La inferencia " - "en CPU es muy lenta para este modelo grande; espere 10-30 minutos " + "en CPU es muy lenta para este modelo grande; espere 10 a 30 minutos " "por imagen en CPU." ), pt=( "Dispositivo de hardware para inferência. Selecione GPU para " "aceleração por hardware, altamente recomendado para SDXL. A " "inferência em CPU é muito lenta para este modelo grande; espere " - "10-30 minutos por imagem em CPU." + "10 a 30 minutos por imagem em CPU." ), de=( "Hardware-Gerät für die Inferenz. Wählen Sie GPU für " "Hardwarebeschleunigung, " "für SDXL dringend empfohlen. CPU-Inferenz ist für dieses große Modell " - "sehr langsam; rechnen Sie mit 10-30 Minuten pro Bild auf CPU." + "sehr langsam; rechnen Sie mit 10 bis 30 Minuten pro Bild auf CPU." ), zh=( "推理硬件设备。强烈建议 SDXL 使用 GPU 加速。" - "CPU 推理对此大模型非常缓慢,每张图像预计需要 10-30 分钟。" + "CPU 推理对此大模型非常缓慢,每张图像预计需要 10至30 分钟。" ), ), alias=MultilingualString( @@ -231,7 +238,8 @@ class StableDiffusionXLSchema(BaseSchema): "cada execução." ), de=( - "Zufalls-Seed für reproduzierbare Generierung. Ein fester positiver " + "Zufallsstartwert für reproduzierbare Generierung. Ein fester " + "positiver " "Integer erzeugt stets dasselbe Bild bei identischen Einstellungen. " "Verwenden Sie einen negativen Wert (z.B. -1) für einen zufälligen " "Seed bei jedem Durchlauf." @@ -268,7 +276,7 @@ class StableDiffusionXLSchema(BaseSchema): de=( "Breite des Ausgabebildes in Pixeln. Muss ein Vielfaches von 8 sein. " "Die native Auflösung von SDXL ist 1024x1024 px. Die Verwendung " - "nicht-nativer Auflösungen kann die Qualität verringern." + "nicht nativer Auflösungen kann die Qualität verringern." ), zh=( "输出图像的宽度(像素),必须是 8 的倍数。" diff --git a/DashAI/back/models/hugging_face/t5_small_transformer.py b/DashAI/back/models/hugging_face/t5_small_transformer.py index 37a1ba8f6a..1a02c1152b 100644 --- a/DashAI/back/models/hugging_face/t5_small_transformer.py +++ b/DashAI/back/models/hugging_face/t5_small_transformer.py @@ -32,7 +32,7 @@ class T5SmallTransformerSchema(OpusMtEnESTransformerSchema): """Schema for the T5-small translation model. Extends the standard translation schema with a ``target_language`` field - restricted to the languages covered by T5's pre-training tasks: + restricted to the languages covered by T5's pretraining tasks: German, French, and Romanian (source is always English). """ @@ -98,7 +98,7 @@ class T5SmallTransformer(HFPretrainedDownloadMixin, TranslationModel): en="T5-Small Translation Transformer", es="Transformer de Traducción T5-Small", pt="Transformer de Tradução T5-Small", - de="T5-Small Übersetzungs-Transformer", + de="T5-Small Transformer für Übersetzung", zh="T5-Small 翻译 Transformer", ) DESCRIPTION: str = MultilingualString( diff --git a/DashAI/back/models/hugging_face/tongyi_z_image_model.py b/DashAI/back/models/hugging_face/tongyi_z_image_model.py index d657e97df3..c8ee25ec6f 100644 --- a/DashAI/back/models/hugging_face/tongyi_z_image_model.py +++ b/DashAI/back/models/hugging_face/tongyi_z_image_model.py @@ -83,26 +83,26 @@ class TongyiZImageSchema(BaseSchema): description=MultilingualString( en=( "Number of denoising steps. Tongyi Z-Image achieves high quality " - "results with 20-30 steps. More steps refine detail at the cost " + "results with 20 to 30 steps. More steps refine detail at the cost " "of generation time." ), es=( "Número de pasos de eliminación de ruido. Tongyi Z-Image logra " - "resultados de alta calidad con 20-30 pasos. Más pasos refinan " + "resultados de alta calidad con 20 a 30 pasos. Más pasos refinan " "el detalle a costa de tiempo de generación." ), pt=( "Número de etapas de inferência. Tongyi Z-Image atinge resultados " - "de alta qualidade com 20-30 etapas. Mais etapas refinam o detalhe " + "de alta qualidade com 20 a 30 etapas. Mais etapas refinam o detalhe " "ao custo do tempo de geração." ), de=( "Anzahl der Entrauschungsschritte. Tongyi Z-Image erzielt mit " - "20-30 Schritten hochwertige Ergebnisse. Mehr Schritte verfeinern " + "20 bis 30 Schritten hochwertige Ergebnisse. Mehr Schritte verfeinern " "Details auf Kosten der Generierungszeit." ), zh=( - "去噪步数。Tongyi Z-Image 在 20-30 步时可达到高质量效果。" + "去噪步数。Tongyi Z-Image 在 20至30 步时可达到高质量效果。" "步数越多细节越精细,但生成时间也越长。" ), ), @@ -122,26 +122,26 @@ class TongyiZImageSchema(BaseSchema): description=MultilingualString( en=( "Classifier-Free Guidance (CFG) scale. Controls how strictly the " - "image follows the text prompt. Values 4-7 work well for " + "image follows the text prompt. Values 4 to 7 work well for " "Tongyi Z-Image." ), es=( "Escala de Classifier-Free Guidance (CFG). Controla qué tan " - "estrictamente la imagen sigue el prompt. Valores 4-7 funcionan " + "estrictamente la imagen sigue el prompt. Valores 4 a 7 funcionan " "bien para Tongyi Z-Image." ), pt=( "Escala de Classifier-Free Guidance (CFG). Controla o quão " - "estritamente a imagem segue o prompt. Valores entre 4-7 funcionam " + "estritamente a imagem segue o prompt. Valores entre 4 e 7 funcionam " "bem para o Tongyi Z-Image." ), de=( "Classifier-Free Guidance (CFG)-Skala. Steuert, wie streng das Bild " - "dem Prompt folgt. Werte 4-7 funktionieren gut für Tongyi Z-Image." + "dem Prompt folgt. Werte 4 bis 7 funktionieren gut für Tongyi Z-Image." ), zh=( "无分类器引导(CFG)比例。控制图像与文本提示的匹配程度。" - "对 Tongyi Z-Image 而言,4-7 的值效果较好。" + "对 Tongyi Z-Image 而言,4至7 的值效果较好。" ), ), alias=MultilingualString( @@ -205,7 +205,8 @@ class TongyiZImageSchema(BaseSchema): "fixo sempre produz a mesma imagem. Use -1 para uma semente aleatória." ), de=( - "Zufalls-Seed für reproduzierbare Generierung. Ein fester positiver " + "Zufallsstartwert für reproduzierbare Generierung. Ein fester " + "positiver " "Integer erzeugt stets dasselbe Bild. Verwenden Sie -1 für einen " "zufälligen Seed." ), diff --git a/DashAI/back/models/lenet5_image_classifier.py b/DashAI/back/models/lenet5_image_classifier.py index e6900b7a10..767c1f9520 100644 --- a/DashAI/back/models/lenet5_image_classifier.py +++ b/DashAI/back/models/lenet5_image_classifier.py @@ -140,7 +140,7 @@ class LeNet5ImageClassifierSchema(BaseSchema): placeholder=0.0, description=MultilingualString( en=( - "Dropout rate applied between fully-connected layers. " + "Dropout rate applied between fully connected layers. " "Values between 0.2 and 0.5 help prevent overfitting. " "Use 0.0 to reproduce the original LeNet-5." ), @@ -341,7 +341,7 @@ class LeNet5ImageClassifier(SupervisedModel, GradCamCompatibleModel): DESCRIPTION: str = MultilingualString( en=( "The original CNN architecture (LeCun et al., 1998). Two " - "conv→tanh→pool blocks followed by three fully-connected layers. " + "conv→tanh→pool blocks followed by three fully connected layers. " "Ideal for small images and educational use." ), es=( diff --git a/DashAI/back/models/mlp_image_classifier.py b/DashAI/back/models/mlp_image_classifier.py index e8de5242d5..ecf8696055 100644 --- a/DashAI/back/models/mlp_image_classifier.py +++ b/DashAI/back/models/mlp_image_classifier.py @@ -371,8 +371,8 @@ class MLPImageClassifier(SupervisedModel, OcclusionSaliencyCompatibleModel): ) DESCRIPTION: str = MultilingualString( en=( - "A Multi-Layer Perceptron (MLP) image classifier that flattens " - "image pixels and passes them through configurable fully-connected " + "A Multilayer Perceptron (MLP) image classifier that flattens " + "image pixels and passes them through configurable fully connected " "hidden layers with ReLU activation for classification." ), es=( diff --git a/DashAI/back/models/pymc/bart_regression.py b/DashAI/back/models/pymc/bart_regression.py index a9026be1a2..46b93d8b83 100644 --- a/DashAI/back/models/pymc/bart_regression.py +++ b/DashAI/back/models/pymc/bart_regression.py @@ -298,7 +298,7 @@ class BARTRegressionSchema(BaseSchema): en="Leaf response", es="Respuesta de hoja", pt="Resposta de folha", - de="Blatt-Antwort", + de="Blattantwort", zh="叶响应", ), ) # type: ignore @@ -382,7 +382,7 @@ class BARTRegressionSchema(BaseSchema): en="Random seed", es="Semilla aleatoria", pt="Semente aleatória", - de="Zufalls-Seed", + de="Zufallsstartwert", zh="随机种子", ), ) # type: ignore diff --git a/DashAI/back/models/resnet18_image_classifier.py b/DashAI/back/models/resnet18_image_classifier.py index bcc8fee43e..c91be10418 100644 --- a/DashAI/back/models/resnet18_image_classifier.py +++ b/DashAI/back/models/resnet18_image_classifier.py @@ -29,7 +29,7 @@ class ResNet18ImageClassifier(TorchvisionDownloadMixin, TorchvisionImageClassifi en=( "ResNet-18 (He et al., 2015). An 18-layer residual network with " "skip connections that enable training very deep networks. " - "The most-cited CNN in academic literature." + "The most cited CNN in academic literature." ), es=( "ResNet-18 (He et al., 2015). Red residual de 18 capas con " diff --git a/DashAI/back/models/resnet50_image_classifier.py b/DashAI/back/models/resnet50_image_classifier.py index c556a3960e..0bad2382b7 100644 --- a/DashAI/back/models/resnet50_image_classifier.py +++ b/DashAI/back/models/resnet50_image_classifier.py @@ -29,7 +29,7 @@ class ResNet50ImageClassifier(TorchvisionDownloadMixin, TorchvisionImageClassifi DESCRIPTION: str = MultilingualString( en=( "ResNet-50 (He et al., 2015). A 50-layer residual network with " - "bottleneck blocks and skip connections. The most-cited CNN variant " + "bottleneck blocks and skip connections. The most cited CNN variant " "in academic papers; supports ImageNet pretrained weights." ), es=( diff --git a/DashAI/back/models/scikit_learn/adaboost_classifier.py b/DashAI/back/models/scikit_learn/adaboost_classifier.py index e62c002d83..bb66d7279c 100644 --- a/DashAI/back/models/scikit_learn/adaboost_classifier.py +++ b/DashAI/back/models/scikit_learn/adaboost_classifier.py @@ -19,7 +19,7 @@ class AdaBoostClassifierSchema(BaseSchema): """Schema that configures the AdaBoost Classifier. AdaBoost (Adaptive Boosting) fits a sequence of weak learners on repeatedly - re-weighted versions of the training data. Misclassified samples receive + reweighted versions of the training data. Misclassified samples receive increased weight so that subsequent learners focus on harder examples. The underlying implementation is ``sklearn.ensemble.AdaBoostClassifier``. """ @@ -101,7 +101,7 @@ class AdaBoostClassifierSchema(BaseSchema): placeholder=None, description=MultilingualString( en=( - "The seed of the pseudo-random number generator. Pass an int for " + "The seed of the pseudorandom number generator. Pass an int for " "reproducible output, or None to not set a specific seed." ), es=( diff --git a/DashAI/back/models/scikit_learn/adaboost_regression.py b/DashAI/back/models/scikit_learn/adaboost_regression.py index 1da798a984..7e5ddbb412 100644 --- a/DashAI/back/models/scikit_learn/adaboost_regression.py +++ b/DashAI/back/models/scikit_learn/adaboost_regression.py @@ -17,7 +17,7 @@ class AdaBoostRegressionSchema(BaseSchema): """Schema that configures the AdaBoost Regressor. - AdaBoost Regressor fits a sequence of weak regressors on re-weighted versions + AdaBoost Regressor fits a sequence of weak regressors on reweighted versions of the training data, concentrating on samples with high residuals. The underlying implementation is ``sklearn.ensemble.AdaBoostRegressor``. """ @@ -124,7 +124,7 @@ class AdaBoostRegressionSchema(BaseSchema): placeholder=None, description=MultilingualString( en=( - "The seed of the pseudo-random number generator. Pass an int for " + "The seed of the pseudorandom number generator. Pass an int for " "reproducible output, or None to not set a specific seed." ), es=( diff --git a/DashAI/back/models/scikit_learn/bagging_classifier.py b/DashAI/back/models/scikit_learn/bagging_classifier.py index fa2b9a266b..315e0c79ad 100644 --- a/DashAI/back/models/scikit_learn/bagging_classifier.py +++ b/DashAI/back/models/scikit_learn/bagging_classifier.py @@ -34,7 +34,7 @@ class BaggingClassifierSchema(BaseSchema): en="The number of base estimators in the ensemble.", es="El número de estimadores base en el conjunto.", pt="O número de estimadores base no conjunto.", - de="Die Anzahl der Basis-Schätzer im Ensemble.", + de="Die Anzahl der Basisschätzer im Ensemble.", zh="集成中基础估计器的数量。", ), alias=MultilingualString( @@ -65,7 +65,7 @@ class BaggingClassifierSchema(BaseSchema): "(0 < max_samples ≤ 1.0)." ), de=( - "Anteil der Trainingsstichproben für jeden Basis-Schätzer " + "Anteil der Trainingsstichproben für jeden Basisschätzer " "(0 < max_samples ≤ 1.0)." ), zh="每个基础估计器抽取的训练样本比例(0 < max_samples ≤ 1.0)。", @@ -98,7 +98,7 @@ class BaggingClassifierSchema(BaseSchema): "(0 < max_features ≤ 1.0)." ), de=( - "Anteil der Merkmale für jeden Basis-Schätzer (0 < max_features ≤ 1.0)." + "Anteil der Merkmale für jeden Basisschätzer (0 < max_features ≤ 1.0)." ), zh="每个基础估计器抽取的特征比例(0 < max_features ≤ 1.0)。", ), @@ -150,7 +150,7 @@ class BaggingClassifierSchema(BaseSchema): placeholder=None, description=MultilingualString( en=( - "The seed of the pseudo-random number generator. Pass an int for " + "The seed of the pseudorandom number generator. Pass an int for " "reproducible output, or None to not set a specific seed." ), es=( diff --git a/DashAI/back/models/scikit_learn/decision_tree_classifier.py b/DashAI/back/models/scikit_learn/decision_tree_classifier.py index 07869b9256..b1b11e4366 100644 --- a/DashAI/back/models/scikit_learn/decision_tree_classifier.py +++ b/DashAI/back/models/scikit_learn/decision_tree_classifier.py @@ -19,7 +19,7 @@ class DecisionTreeClassifierSchema(BaseSchema): """Schema that configures the Decision Tree Classifier. - Decision Trees are a non-parametric supervised classification method that + Decision Trees are a nonparametric supervised classification method that recursively partitions the feature space by learning axis-aligned decision rules inferred from training data. The tree structure is built using the CART algorithm. The underlying implementation is ``sklearn.tree.DecisionTreeClassifier``. diff --git a/DashAI/back/models/scikit_learn/decision_tree_regression.py b/DashAI/back/models/scikit_learn/decision_tree_regression.py index 695652d798..ba7f05d7f4 100644 --- a/DashAI/back/models/scikit_learn/decision_tree_regression.py +++ b/DashAI/back/models/scikit_learn/decision_tree_regression.py @@ -183,7 +183,7 @@ class DecisionTreeRegressionSchema(BaseSchema): placeholder=None, description=MultilingualString( en=( - "The seed of the pseudo-random number generator. Pass an int for " + "The seed of the pseudorandom number generator. Pass an int for " "reproducible output, or None to not set a specific seed." ), es=( @@ -195,7 +195,7 @@ class DecisionTreeRegressionSchema(BaseSchema): "saída reproduzível, ou None para não definir uma semente específica." ), de=( - "Der Startwert des Pseudo-Zufallszahlengenerators. Übergeben Sie eine " + "Der Startwert des Pseudozufallszahlengenerators. Übergeben Sie eine " "ganze Zahl für reproduzierbare Ausgaben oder None für keinen " "bestimmten Startwert." ), diff --git a/DashAI/back/models/scikit_learn/dummy_classifier.py b/DashAI/back/models/scikit_learn/dummy_classifier.py index 461975d6c5..e7f9698837 100644 --- a/DashAI/back/models/scikit_learn/dummy_classifier.py +++ b/DashAI/back/models/scikit_learn/dummy_classifier.py @@ -64,7 +64,7 @@ class (``most_frequent``), sampling from the training class distribution en="Baseline classifier using simple rules for comparison.", es=("Clasificador base que utiliza reglas simples para comparación."), pt=("Classificador de referência que usa regras simples para comparação."), - de=("Basis-Klassifikator, der einfache Regeln zum Vergleich verwendet."), + de=("Basisklassifikator, der einfache Regeln zum Vergleich verwendet."), zh="使用简单规则进行对比的基准分类器。", ) COLOR: str = "#4DB6AC" diff --git a/DashAI/back/models/scikit_learn/elastic_net_regression.py b/DashAI/back/models/scikit_learn/elastic_net_regression.py index 57309ac44d..f6c3cc4733 100644 --- a/DashAI/back/models/scikit_learn/elastic_net_regression.py +++ b/DashAI/back/models/scikit_learn/elastic_net_regression.py @@ -160,7 +160,7 @@ class ElasticNetRegressionSchema(BaseSchema): placeholder=None, description=MultilingualString( en=( - "The seed of the pseudo-random number generator. Pass an int for " + "The seed of the pseudorandom number generator. Pass an int for " "reproducible output, or None to not set a specific seed." ), es=( diff --git a/DashAI/back/models/scikit_learn/extra_trees_classifier.py b/DashAI/back/models/scikit_learn/extra_trees_classifier.py index e5875edbef..fd0da83d13 100644 --- a/DashAI/back/models/scikit_learn/extra_trees_classifier.py +++ b/DashAI/back/models/scikit_learn/extra_trees_classifier.py @@ -163,7 +163,7 @@ class ExtraTreesClassifierSchema(BaseSchema): placeholder=None, description=MultilingualString( en=( - "The seed of the pseudo-random number generator. Pass an int for " + "The seed of the pseudorandom number generator. Pass an int for " "reproducible output, or None to not set a specific seed." ), es=( diff --git a/DashAI/back/models/scikit_learn/extra_trees_regression.py b/DashAI/back/models/scikit_learn/extra_trees_regression.py index 9259dcd7bf..2dc28ddde8 100644 --- a/DashAI/back/models/scikit_learn/extra_trees_regression.py +++ b/DashAI/back/models/scikit_learn/extra_trees_regression.py @@ -160,7 +160,7 @@ class ExtraTreesRegressionSchema(BaseSchema): placeholder=None, description=MultilingualString( en=( - "The seed of the pseudo-random number generator. Pass an int for " + "The seed of the pseudorandom number generator. Pass an int for " "reproducible output, or None to not set a specific seed." ), es=( diff --git a/DashAI/back/models/scikit_learn/gaussian_mixture_clustering.py b/DashAI/back/models/scikit_learn/gaussian_mixture_clustering.py index 5e7ba67226..53a59eaa31 100644 --- a/DashAI/back/models/scikit_learn/gaussian_mixture_clustering.py +++ b/DashAI/back/models/scikit_learn/gaussian_mixture_clustering.py @@ -137,7 +137,7 @@ class GaussianMixtureClustering(SklearnLikeClusterer, _GaussianMixture): en="Gaussian Mixture", es="Mezcla Gaussiana", pt="Mistura Gaussiana", - de="Gauß-Mischmodell", + de="Gaußsches Mischmodell", zh="高斯混合模型", ) DESCRIPTION = MultilingualString( diff --git a/DashAI/back/models/scikit_learn/gradient_boosting_classifier.py b/DashAI/back/models/scikit_learn/gradient_boosting_classifier.py index c43820e5a8..c72e763ac9 100644 --- a/DashAI/back/models/scikit_learn/gradient_boosting_classifier.py +++ b/DashAI/back/models/scikit_learn/gradient_boosting_classifier.py @@ -107,7 +107,7 @@ class GradientBoostingClassifierSchema(BaseSchema): en="Maximum depth of the individual regression estimators.", es="Profundidad máxima de los estimadores de regresión individuales.", pt="Profundidade máxima dos estimadores de regressão individuais.", - de="Maximale Tiefe der einzelnen Regressions-Schätzer.", + de="Maximale Tiefe der einzelnen Regressionsschätzer.", zh="各回归估计器的最大深度。", ), alias=MultilingualString( @@ -206,7 +206,7 @@ class GradientBoostingClassifierSchema(BaseSchema): placeholder=None, description=MultilingualString( en=( - "The seed of the pseudo-random number generator. Pass an int for " + "The seed of the pseudorandom number generator. Pass an int for " "reproducible output, or None to not set a specific seed." ), es=( diff --git a/DashAI/back/models/scikit_learn/gradient_boosting_regression.py b/DashAI/back/models/scikit_learn/gradient_boosting_regression.py index 9e42247ea1..79bc82691d 100644 --- a/DashAI/back/models/scikit_learn/gradient_boosting_regression.py +++ b/DashAI/back/models/scikit_learn/gradient_boosting_regression.py @@ -262,7 +262,7 @@ class GradientBoostingRSchema(BaseSchema): placeholder=None, description=MultilingualString( en=( - "The seed of the pseudo-random number generator to use " + "The seed of the pseudorandom number generator to use " "when shuffling the data." ), es=( @@ -328,7 +328,7 @@ class GradientBoostingRSchema(BaseSchema): "quantile loss function." ), es=( - "El alfa-cuantil de la función de pérdida de Huber y " + "El cuantil alfa de la función de pérdida de Huber y " "la función de pérdida cuantil." ), pt=( diff --git a/DashAI/back/models/scikit_learn/hist_gradient_boosting_classifier.py b/DashAI/back/models/scikit_learn/hist_gradient_boosting_classifier.py index e1a1617d26..adf2104ebe 100644 --- a/DashAI/back/models/scikit_learn/hist_gradient_boosting_classifier.py +++ b/DashAI/back/models/scikit_learn/hist_gradient_boosting_classifier.py @@ -284,7 +284,7 @@ class HistGradientBoostingClassifier( en="Histogram-based Gradient Boosting", es="Gradient Boosting basado en histogramas", pt="Classificador por Gradient Boosting Histogramado", - de="Histogramm-basiertes Gradient Boosting", + de="Histogrammbasiertes Gradient Boosting", zh="基于直方图的梯度提升", ) DESCRIPTION: str = MultilingualString( diff --git a/DashAI/back/models/scikit_learn/k_neighbors_classifier.py b/DashAI/back/models/scikit_learn/k_neighbors_classifier.py index e7f90dab67..13bae65ca0 100644 --- a/DashAI/back/models/scikit_learn/k_neighbors_classifier.py +++ b/DashAI/back/models/scikit_learn/k_neighbors_classifier.py @@ -16,7 +16,7 @@ class KNeighborsClassifierSchema(BaseSchema): """Schema that configures the K-Nearest Neighbors Classifier. - K-Nearest Neighbors (KNN) is a non-parametric supervised classification method + K-Nearest Neighbors (KNN) is a nonparametric supervised classification method that assigns a class to each sample by majority vote of its ``k`` closest training points in the feature space. It is used for tabular classification tasks. The underlying implementation is ``sklearn.neighbors.KNeighborsClassifier``. @@ -115,7 +115,7 @@ class KNeighborsClassifier( SCHEMA = KNeighborsClassifierSchema DISPLAY_NAME: str = MultilingualString( en="K-Nearest Neighbors (KNN)", - es="K-Vecinos más Cercanos (KNN)", + es="K Vecinos más Cercanos (KNN)", pt="Classificador K-Vizinhos", de="K-Nächste-Nachbarn (KNN)", zh="K 近邻分类器(KNN)", diff --git a/DashAI/back/models/scikit_learn/k_neighbors_regression.py b/DashAI/back/models/scikit_learn/k_neighbors_regression.py index 964ad7a17e..d5e1ba6c36 100644 --- a/DashAI/back/models/scikit_learn/k_neighbors_regression.py +++ b/DashAI/back/models/scikit_learn/k_neighbors_regression.py @@ -166,13 +166,13 @@ class KNeighborsRegression(RegressionModel, SklearnLikeRegressor, _KNeighborsReg SCHEMA = KNeighborsRegressionSchema DISPLAY_NAME: str = MultilingualString( en="K-Nearest Neighbours Regression", - es="Regresión K-Vecinos Más Cercanos", + es="Regresión K Vecinos Más Cercanos", pt="Regressor K-Vizinhos", de="K-Nächste-Nachbarn-Regression", zh="K 近邻回归", ) DESCRIPTION: str = MultilingualString( - en="Non-parametric regression that predicts by averaging nearest neighbours.", + en="Nonparametric regression that predicts by averaging nearest neighbours.", es=( "Regresión no paramétrica que predice promediando los vecinos más cercanos." ), @@ -181,7 +181,7 @@ class KNeighborsRegression(RegressionModel, SklearnLikeRegressor, _KNeighborsReg "mais próximos." ), de=( - "Nicht-parametrische Regression, die durch Mittelung der nächsten " + "Nichtparametrische Regression, die durch Mittelung der nächsten " "Nachbarn vorhersagt." ), zh="通过对最近邻样本取平均进行预测的非参数回归方法。", diff --git a/DashAI/back/models/scikit_learn/kmeans_clustering.py b/DashAI/back/models/scikit_learn/kmeans_clustering.py index fce96dafea..80ed8f4b96 100644 --- a/DashAI/back/models/scikit_learn/kmeans_clustering.py +++ b/DashAI/back/models/scikit_learn/kmeans_clustering.py @@ -66,7 +66,7 @@ class KMeansClusteringSchema(BaseSchema): en="Init method", es="Método de inicio", pt="Método de inicialização", - de="Init-Methode", + de="Initialisierungsmethode", zh="初始化方法", ), ) # type: ignore diff --git a/DashAI/back/models/scikit_learn/lasso_regression.py b/DashAI/back/models/scikit_learn/lasso_regression.py index bb10e61e5f..82109053b5 100644 --- a/DashAI/back/models/scikit_learn/lasso_regression.py +++ b/DashAI/back/models/scikit_learn/lasso_regression.py @@ -127,7 +127,7 @@ class LassoRegressionSchema(BaseSchema): placeholder=None, description=MultilingualString( en=( - "The seed of the pseudo-random number generator. Pass an int for " + "The seed of the pseudorandom number generator. Pass an int for " "reproducible output, or None to not set a specific seed." ), es=( diff --git a/DashAI/back/models/scikit_learn/linearSVR.py b/DashAI/back/models/scikit_learn/linearSVR.py index b5a5c4681e..bd07982453 100644 --- a/DashAI/back/models/scikit_learn/linearSVR.py +++ b/DashAI/back/models/scikit_learn/linearSVR.py @@ -36,11 +36,11 @@ class LinearSVRSchema(BaseSchema): "which no penalty is associated." ), es=( - "Parámetro epsilon que especifica el tubo-epsilon dentro del cual " + "Parámetro epsilon que especifica el tubo épsilon dentro del cual " "no se asocia ninguna penalización." ), pt=( - "Parâmetro epsilon que especifica o tubo-epsilon dentro do qual " + "Parâmetro epsilon que especifica o tubo epsilon dentro do qual " "nenhuma penalidade é associada." ), de=( @@ -237,7 +237,7 @@ class LinearSVRSchema(BaseSchema): placeholder=None, description=MultilingualString( en=( - "The seed of the pseudo-random number generator to use " + "The seed of the pseudorandom number generator to use " "when shuffling the data." ), es=( @@ -313,14 +313,14 @@ class LinearSVR(RegressionModel, SklearnLikeRegressor, _LinearSVR): en="Linear Support Vector Regression", es="Regresión de Vectores de Soporte Lineal", pt="SVR Linear", - de="Lineare Stützvektor-Regression", + de="Lineare Stützvektorregression", zh="线性支持向量回归", ) DESCRIPTION: str = MultilingualString( en="Support Vector Regression with linear kernel.", es="Regresión de Vectores de Soporte con kernel lineal.", pt="Regressão de Vetores de Suporte com kernel linear.", - de="Stützvektor-Regression mit linearem Kernel.", + de="Stützvektorregression mit linearem Kernel.", zh="使用线性核的支持向量回归。", ) COLOR: str = "#2196F3" diff --git a/DashAI/back/models/scikit_learn/linear_svc_classifier.py b/DashAI/back/models/scikit_learn/linear_svc_classifier.py index d0b5e9a0b3..ecaf11872c 100644 --- a/DashAI/back/models/scikit_learn/linear_svc_classifier.py +++ b/DashAI/back/models/scikit_learn/linear_svc_classifier.py @@ -156,7 +156,7 @@ class LinearSVCClassifierSchema(BaseSchema): placeholder=None, description=MultilingualString( en=( - "The seed of the pseudo-random number generator. Pass an int for " + "The seed of the pseudorandom number generator. Pass an int for " "reproducible output, or None to not set a specific seed." ), es=( @@ -265,7 +265,7 @@ class LinearSVCClassifier( "calibração de probabilidades." ), de=( - "Schneller linearer Stützvektor-Klassifikator mit " + "Schneller linearer Stützvektorklassifikator mit " "Wahrscheinlichkeitskalibrierung." ), zh="带概率校准的快速线性支持向量分类器。", diff --git a/DashAI/back/models/scikit_learn/mlp_classifier.py b/DashAI/back/models/scikit_learn/mlp_classifier.py index 25a3e0fe14..20f0a6c50a 100644 --- a/DashAI/back/models/scikit_learn/mlp_classifier.py +++ b/DashAI/back/models/scikit_learn/mlp_classifier.py @@ -19,7 +19,7 @@ class MLPClassifierSchema(BaseSchema): """Schema that configures the MLP Classifier. - The Multi-layer Perceptron Classifier is a feedforward neural network trained + The Multilayer Perceptron Classifier is a feedforward neural network trained with backpropagation. It supports multiple hidden layers and several activation functions. The underlying implementation is ``sklearn.neural_network.MLPClassifier``. @@ -188,7 +188,7 @@ class MLPClassifierSchema(BaseSchema): placeholder=None, description=MultilingualString( en=( - "The seed of the pseudo-random number generator. Pass an int for " + "The seed of the pseudorandom number generator. Pass an int for " "reproducible output, or None to not set a specific seed." ), es=( @@ -243,7 +243,7 @@ class MLPClassifier(TabularClassificationModel, SklearnLikeClassifier, _MLPClass zh="多层感知机分类器", ) DESCRIPTION: str = MultilingualString( - en="Multi-layer perceptron neural network for tabular classification.", + en="Multilayer perceptron neural network for tabular classification.", es="Red neuronal perceptrón multicapa para clasificación tabular.", pt="Rede neural perceptrón multicamada para classificação tabular.", de="Mehrschichtiges Perzeptron-Netz für tabellarische Klassifikation.", diff --git a/DashAI/back/models/scikit_learn/mlp_regression.py b/DashAI/back/models/scikit_learn/mlp_regression.py index 90ae05e3f8..348f646ab6 100644 --- a/DashAI/back/models/scikit_learn/mlp_regression.py +++ b/DashAI/back/models/scikit_learn/mlp_regression.py @@ -22,9 +22,9 @@ class MLPRegressorSchema(BaseSchema): - """Schema that configures the Multi-layer Perceptron (MLP) Regressor. + """Schema that configures the Multilayer Perceptron (MLP) Regressor. - The MLP Regressor is a fully-connected feedforward neural network with a single + The MLP Regressor is a fully connected feedforward neural network with a single hidden layer, trained with backpropagation using the Adam optimiser and mean squared error loss. It is used for tabular regression tasks. The underlying implementation uses PyTorch (``torch.nn``). @@ -308,7 +308,7 @@ class MLPRegression(CategoricalEncoderMixin, RegressionModel): SCHEMA = MLPRegressorSchema DISPLAY_NAME: str = MultilingualString( - en="Multi-layer Perceptron (MLP) Regression", + en="Multilayer Perceptron (MLP) Regression", es="Perceptrón Multicapa (MLP) Regresión", pt="Regressor MLP", de="Mehrschichtiges Perzeptron (MLP) Regression", diff --git a/DashAI/back/models/scikit_learn/random_forest_regression.py b/DashAI/back/models/scikit_learn/random_forest_regression.py index 254db6f796..8c9c66e136 100644 --- a/DashAI/back/models/scikit_learn/random_forest_regression.py +++ b/DashAI/back/models/scikit_learn/random_forest_regression.py @@ -313,7 +313,7 @@ class RandomForestRegressionSchema(BaseSchema): placeholder=None, description=MultilingualString( en=( - "The seed of the pseudo-random number generator to use " + "The seed of the pseudorandom number generator to use " "when shuffling the data." ), es=( @@ -325,7 +325,7 @@ class RandomForestRegressionSchema(BaseSchema): "ao embaralhar os dados." ), de=( - "Der Startwert des Pseudo-Zufallszahlengenerators beim Mischen der " + "Der Startwert des Pseudozufallszahlengenerators beim Mischen der " "Daten." ), zh="打乱数据时使用的伪随机数生成器种子。", @@ -410,7 +410,7 @@ class RandomForestRegressionSchema(BaseSchema): ), de=( "Wenn Bootstrap True ist, die Anzahl der aus X zu ziehenden Proben " - "zum Trainieren jedes Basis-Schätzers." + "zum Trainieren jedes Basisschätzers." ), zh="若bootstrap为True,从X中抽取用于训练每个基估计器的样本数。", ), diff --git a/DashAI/back/models/scikit_learn/sgd_classifier.py b/DashAI/back/models/scikit_learn/sgd_classifier.py index 9a22959be4..c15a3b4f63 100644 --- a/DashAI/back/models/scikit_learn/sgd_classifier.py +++ b/DashAI/back/models/scikit_learn/sgd_classifier.py @@ -196,7 +196,7 @@ class SGDClassifierSchema(BaseSchema): placeholder=None, description=MultilingualString( en=( - "The seed of the pseudo-random number generator. Pass an int for " + "The seed of the pseudorandom number generator. Pass an int for " "reproducible output, or None to not set a specific seed." ), es=( @@ -208,7 +208,7 @@ class SGDClassifierSchema(BaseSchema): "para saída reproduzível, ou None para não definir uma semente." ), de=( - "Der Startwert des Pseudo-Zufallszahlengenerators. Übergeben Sie eine " + "Der Startwert des Pseudozufallszahlengenerators. Übergeben Sie eine " "ganze Zahl für reproduzierbare Ausgaben oder None für keinen " "bestimmten Startwert." ), diff --git a/DashAI/back/models/scikit_learn/svc.py b/DashAI/back/models/scikit_learn/svc.py index 0f42f8f2f3..e515a517eb 100644 --- a/DashAI/back/models/scikit_learn/svc.py +++ b/DashAI/back/models/scikit_learn/svc.py @@ -278,7 +278,7 @@ class SVC(TabularClassificationModel, SklearnLikeClassifier, _SVC): es="Máquina de Vectores de Soporte (SVM)", pt="Máquina de Vetores de Suporte (SVM)", zh="支持向量机(SVM)", - de="Support-Vektor-Maschine (SVM)", + de="Stützvektormaschine (SVM)", ) DESCRIPTION: str = MultilingualString( en="Finds the optimal hyperplane that maximises the margin between classes.", diff --git a/DashAI/back/models/scikit_learn/svr.py b/DashAI/back/models/scikit_learn/svr.py index d570aff7f5..8dc5b03058 100644 --- a/DashAI/back/models/scikit_learn/svr.py +++ b/DashAI/back/models/scikit_learn/svr.py @@ -182,7 +182,7 @@ class SVR(RegressionModel, SklearnLikeRegressor, _SVR): en="Support Vector Regression", es="Regresión de Vectores de Soporte", pt="Regressão de Vetores de Suporte", - de="Stützvektor-Regression", + de="Stützvektorregression", zh="支持向量回归", ) DESCRIPTION: str = MultilingualString( diff --git a/DashAI/back/models/scikit_learn/tfidf_logreg_text_classification_model.py b/DashAI/back/models/scikit_learn/tfidf_logreg_text_classification_model.py index 8fab234eac..ee00df898c 100644 --- a/DashAI/back/models/scikit_learn/tfidf_logreg_text_classification_model.py +++ b/DashAI/back/models/scikit_learn/tfidf_logreg_text_classification_model.py @@ -64,9 +64,9 @@ class TfIdfLogRegTextClassificationModelSchema(BaseSchema): bool_field(), placeholder=True, description=MultilingualString( - en="Enable inverse-document-frequency re-weighting.", - es="Activar re-ponderación por frecuencia inversa de documento.", - pt="Ativar re-ponderação por frequência inversa de documento.", + en="Enable inverse-document-frequency reweighting.", + es="Activar reponderación por frecuencia inversa de documento.", + pt="Ativar reponderação por frequência inversa de documento.", de="Inverse-Dokumenten-Häufigkeits-Neugewichtung aktivieren.", zh="启用逆文档频率重加权。", ), diff --git a/DashAI/back/optimizers/hyperopt_optimizer.py b/DashAI/back/optimizers/hyperopt_optimizer.py index 974b5505b8..88ac23e041 100644 --- a/DashAI/back/optimizers/hyperopt_optimizer.py +++ b/DashAI/back/optimizers/hyperopt_optimizer.py @@ -51,7 +51,7 @@ class HyperOptSchema(BaseSchema): "ou 'rand' (Aleatório)." ), de=( - "Der Abtastalgorithmus für die Hyperparameter-Optimierung. " + "Der Abtastalgorithmus für die Hyperparameteroptimierung. " "Muss 'tpe' (Tree-structured Parzen Estimator) oder 'rand' (Zufällig) " "sein." ), @@ -82,7 +82,7 @@ class HyperOptOptimizer(BaseOptimizer): en="Hyperparameter optimization using HyperOpt library.", es="Optimización de hiperparámetros usando la librería HyperOpt.", pt="Otimização de hiperparâmetros usando a biblioteca HyperOpt.", - de="Hyperparameter-Optimierung mit der HyperOpt-Bibliothek.", + de="Hyperparameteroptimierung mit der HyperOpt-Bibliothek.", zh="使用 HyperOpt 库进行超参数优化。", ) COLOR: str = "#FF5722" diff --git a/DashAI/back/optimizers/optuna_optimizer.py b/DashAI/back/optimizers/optuna_optimizer.py index 2bd3fba7d2..e219eff36e 100644 --- a/DashAI/back/optimizers/optuna_optimizer.py +++ b/DashAI/back/optimizers/optuna_optimizer.py @@ -71,9 +71,9 @@ class OptunaSchema(BaseSchema): "estratégias para explorar o espaço de hiperparâmetros." ), de=( - "Der Abtastalgorithmus für die Hyperparameter-Optimierung. " + "Der Abtastalgorithmus für die Hyperparameteroptimierung. " "Verschiedene Abtaster verwenden unterschiedliche Strategien " - "zur Erkundung des Hyperparameter-Raums." + "zur Erkundung des Hyperparameterraums." ), zh=( "用于超参数优化的采样算法。不同的采样器使用不同的策略来探索超参数空间。" @@ -213,7 +213,7 @@ class OptunaOptimizer(BaseOptimizer): en="Hyperparameter optimization using Optuna library.", es="Optimización de hiperparámetros usando la librería Optuna.", pt="Otimização de hiperparâmetros usando a biblioteca Optuna.", - de="Hyperparameter-Optimierung mit der Optuna-Bibliothek.", + de="Hyperparameteroptimierung mit der Optuna-Bibliothek.", zh="使用 Optuna 库进行超参数优化。", ) COLOR: str = "#E91E63" diff --git a/DashAI/back/reports/forecasting/residual_autocorrelation.py b/DashAI/back/reports/forecasting/residual_autocorrelation.py index 5d14c64de8..e72a784798 100644 --- a/DashAI/back/reports/forecasting/residual_autocorrelation.py +++ b/DashAI/back/reports/forecasting/residual_autocorrelation.py @@ -56,7 +56,7 @@ class ResidualAutocorrelation(ForecastingReport): en="Residual Autocorrelation", es="Autocorrelación de Residuos", pt="Autocorrelação dos Resíduos", - de="Residuen-Autokorrelation", + de="Autokorrelation der Residuen", zh="残差自相关", ) DESCRIPTION: str = MultilingualString( diff --git a/DashAI/back/reports/forecasting/residuals_over_time.py b/DashAI/back/reports/forecasting/residuals_over_time.py index 540d6203dd..b34eecb6d7 100644 --- a/DashAI/back/reports/forecasting/residuals_over_time.py +++ b/DashAI/back/reports/forecasting/residuals_over_time.py @@ -81,7 +81,7 @@ def compute_forecasts(self, forecasts: Dict[str, Any]) -> List[Artifact]: figure.update_layout( title="Residuals over time", xaxis_title="Date", - yaxis_title="Actual - forecast", + yaxis_title="Actual minus forecast", margin={"l": 20, "r": 20, "t": 50, "b": 40}, ) return [PlotlyArtifact(payload=figure, title="Residuals over time")] diff --git a/DashAI/back/reports/regression/residual_histogram.py b/DashAI/back/reports/regression/residual_histogram.py index 5c21eb051b..e4ec69d595 100644 --- a/DashAI/back/reports/regression/residual_histogram.py +++ b/DashAI/back/reports/regression/residual_histogram.py @@ -43,7 +43,7 @@ class ResidualHistogram(BaseReport): en="Residual Histogram", es="Histograma de Residuos", pt="Histograma de Resíduos", - de="Residuen-Histogramm", + de="Residuenhistogramm", zh="残差直方图", ) DESCRIPTION: str = MultilingualString( diff --git a/DashAI/back/services/RAG/index_status_service.py b/DashAI/back/services/RAG/index_status_service.py index 7e4c3d608d..a9838d6990 100644 --- a/DashAI/back/services/RAG/index_status_service.py +++ b/DashAI/back/services/RAG/index_status_service.py @@ -85,7 +85,7 @@ zh="这些文档尚未建立索引。", ), STATUS_STALE: MultilingualString( - en="The configuration changed, so the documents need to be re-indexed.", + en="The configuration changed, so the documents need to be indexed again.", es=("La configuración cambió, así que los documentos se deben reindexar."), pt=("A configuração mudou, então os documentos precisam ser reindexados."), de=( diff --git a/DashAI/back/services/RAG/prompt_service.py b/DashAI/back/services/RAG/prompt_service.py index 47e6975be8..f9306ba516 100644 --- a/DashAI/back/services/RAG/prompt_service.py +++ b/DashAI/back/services/RAG/prompt_service.py @@ -3044,13 +3044,13 @@ def validate_prompt_params_shape( if template is None: if allow_blank_template: return - raise RAGPromptValidationError("'template' must be a non-empty string.") + raise RAGPromptValidationError("'template' cannot be empty.") if not isinstance(template, str): raise RAGPromptValidationError( f"'template' must be a string, got {type(template).__name__}." ) if not template.strip() and not allow_blank_template: - raise RAGPromptValidationError("'template' must be a non-empty string.") + raise RAGPromptValidationError("'template' cannot be empty.") return if has_templates: self._validate_templates_map(parameters[_TEMPLATES_KEY]) @@ -3077,16 +3077,17 @@ def _validate_templates_map(templates: Any) -> None: """ if not isinstance(templates, dict) or not templates: raise RAGPromptValidationError( - "'templates' must be a non-empty object mapping languages to templates." + "'templates' must be an object mapping languages to templates, " + "with at least one language." ) for language, template in templates.items(): if not isinstance(language, str) or not language.strip(): raise RAGPromptValidationError( - "'templates' keys must be non-empty language codes." + "Every 'templates' key must be a language code." ) if not isinstance(template, str) or not template.strip(): raise RAGPromptValidationError( - f"'templates' entry '{language}' must be a non-empty string." + f"'templates' entry '{language}' must be a string with text." ) @staticmethod diff --git a/DashAI/back/statistical_tests/anova_test.py b/DashAI/back/statistical_tests/anova_test.py index c006674948..0cd5ffa13e 100644 --- a/DashAI/back/statistical_tests/anova_test.py +++ b/DashAI/back/statistical_tests/anova_test.py @@ -72,7 +72,7 @@ def get_metadata(cls) -> dict: en={ "significant": ( "There are significant differences between the models. " - "Post-hoc pairwise comparisons (Tukey HSD) identify which " + "Post hoc pairwise comparisons (Tukey HSD) identify which " "pairs differ." ), "not_significant": ( @@ -83,7 +83,7 @@ def get_metadata(cls) -> dict: es={ "significant": ( "Hay diferencias significativas entre los modelos. " - "Las comparaciones post-hoc (Tukey HSD) identifican qué " + "Las comparaciones post hoc (Tukey HSD) identifican qué " "pares difieren." ), "not_significant": ( @@ -94,7 +94,7 @@ def get_metadata(cls) -> dict: pt={ "significant": ( "Há diferenças significativas entre os modelos. " - "Comparações post-hoc (Tukey HSD) identificam quais " + "Comparações post hoc (Tukey HSD) identificam quais " "pares diferem." ), "not_significant": ( diff --git a/DashAI/back/statistical_tests/corrected_paired_t_test.py b/DashAI/back/statistical_tests/corrected_paired_t_test.py index 0d7a567d26..d14f08b762 100644 --- a/DashAI/back/statistical_tests/corrected_paired_t_test.py +++ b/DashAI/back/statistical_tests/corrected_paired_t_test.py @@ -173,7 +173,7 @@ def run( if len(scores) < 2: raise ValueError( - "Corrected Paired t-test requires at least two sets of scores." + "Corrected paired t-test requires at least two sets of scores." ) run_names = list(scores.keys()) diff --git a/DashAI/back/statistical_tests/friedman_test.py b/DashAI/back/statistical_tests/friedman_test.py index bea6687707..3d3b5bba60 100644 --- a/DashAI/back/statistical_tests/friedman_test.py +++ b/DashAI/back/statistical_tests/friedman_test.py @@ -36,7 +36,7 @@ class FriedmanTest(BaseStatisticalTest): ) DESCRIPTION: str = MultilingualString( en=( - "Non-parametric test for comparing multiple models on the same folds. ", + "Nonparametric test for comparing multiple models on the same folds. ", "Does not assume normality.", ), es=( @@ -44,7 +44,7 @@ class FriedmanTest(BaseStatisticalTest): "los mismos folds. No asume normalidad.", ), pt=( - "Teste não-paramétrico para comparar múltiplos modelos sobre ", + "Teste não paramétrico para comparar múltiplos modelos sobre ", "as mesmas folds. Não assume normalidade.", ), de=( @@ -75,7 +75,7 @@ def get_metadata(cls) -> dict: en={ "significant": ( "There are significant differences between the models. " - "Post-hoc pairwise comparisons (Nemenyi) identify which " + "Post hoc pairwise comparisons (Nemenyi) identify which " "pairs differ." ), "not_significant": ( @@ -86,7 +86,7 @@ def get_metadata(cls) -> dict: es={ "significant": ( "Hay diferencias significativas entre los modelos. " - "Las comparaciones post-hoc (Nemenyi) identifican qué " + "Las comparaciones post hoc (Nemenyi) identifican qué " "pares difieren." ), "not_significant": ( @@ -97,7 +97,7 @@ def get_metadata(cls) -> dict: pt={ "significant": ( "Há diferenças significativas entre os modelos. " - "Comparações post-hoc (Nemenyi) identificam quais " + "Comparações post hoc (Nemenyi) identificam quais " "pares diferem." ), "not_significant": ( diff --git a/DashAI/back/statistical_tests/post_hoc_tests/nemenyi_test.py b/DashAI/back/statistical_tests/post_hoc_tests/nemenyi_test.py index 9102dc98dc..7dd35f769a 100644 --- a/DashAI/back/statistical_tests/post_hoc_tests/nemenyi_test.py +++ b/DashAI/back/statistical_tests/post_hoc_tests/nemenyi_test.py @@ -31,15 +31,15 @@ class NemenyiTest(BaseStatisticalTest): ) DESCRIPTION: str = MultilingualString( en=( - "Non-parametric post-hoc test for pairwise comparisons between groups. ", + "Nonparametric post hoc test for pairwise comparisons between groups. ", "Does not assume normality and is usually applied after Friedman test.", ), es=( - "Prueba post-hoc no paramétrica para comparaciones por pares entre ", + "Prueba post hoc no paramétrica para comparaciones por pares entre ", "grupos. No asume normalidad y suele aplicarse tras el test de Friedman.", ), pt=( - "Teste post-hoc não-paramétrico para comparações por pares entre grupos. ", + "Teste post hoc não paramétrico para comparações por pares entre grupos. ", "Não assume normalidade e geralmente é aplicado após o teste de Friedman.", ), de=( @@ -72,7 +72,7 @@ def get_metadata(cls) -> dict: "p < α indicate significant differences." ), "not_significant": ( - "This is a post-hoc test automatically run after Friedman " + "This is a post hoc test automatically run after Friedman " "test. Results appear only when Friedman is significant." ), }, @@ -82,7 +82,7 @@ def get_metadata(cls) -> dict: "pares con p < α indican diferencias significativas." ), "not_significant": ( - "Esta es una prueba post-hoc ejecutada automáticamente " + "Esta es una prueba post hoc ejecutada automáticamente " "después de la prueba de Friedman. Los resultados " "aparecen solo cuando Friedman es significativo." ), @@ -93,7 +93,7 @@ def get_metadata(cls) -> dict: "com p < α indicam diferenças significativas." ), "not_significant": ( - "Este é um teste post-hoc executado automaticamente após " + "Este é um teste post hoc executado automaticamente após " "o teste de Friedman. Os resultados aparecem apenas " "quando Friedman é significativo." ), @@ -163,7 +163,7 @@ def run( if len(scores) < 3: raise ValueError( - "Nemenyi post-hoc test requires at least three sets of scores. " + "Nemenyi post hoc test requires at least three sets of scores. " "For pairwise comparisons use Wilcoxon or Paired t-test instead." ) diff --git a/DashAI/back/statistical_tests/post_hoc_tests/tukey_test.py b/DashAI/back/statistical_tests/post_hoc_tests/tukey_test.py index 71c1c2250e..f7b6027606 100644 --- a/DashAI/back/statistical_tests/post_hoc_tests/tukey_test.py +++ b/DashAI/back/statistical_tests/post_hoc_tests/tukey_test.py @@ -38,12 +38,12 @@ class TukeyHSDTest(BaseStatisticalTest): ) DESCRIPTION: str = MultilingualString( en=( - "Parametric post-hoc test for pairwise comparisons between groups. ", + "Parametric post hoc test for pairwise comparisons between groups. ", "Requires normality and homoscedasticity. Usually applied after a ", "significant ANOVA.", ), es=( - "Prueba post-hoc paramétrica para comparaciones por pares entre grupos. ", + "Prueba post hoc paramétrica para comparaciones por pares entre grupos. ", "Requiere normalidad y homocedasticidad. Suele aplicarse después de un ", "ANOVA significativo.", ), @@ -57,7 +57,7 @@ class TukeyHSDTest(BaseStatisticalTest): "要求正态性和方差齐性。通常在显著的 ANOVA 之后使用。", ), pt=( - "Teste post-hoc paramétrico para comparações pareadas de modelos. ", + "Teste post hoc paramétrico para comparações pareadas de modelos. ", "Requer normalidade e homocedasticidade. Geralmente aplicado após um ", "ANOVA significativo.", ), @@ -82,7 +82,7 @@ def get_metadata(cls) -> dict: "p < α indicate significant differences." ), "not_significant": ( - "This is a post-hoc test automatically run after ANOVA. " + "This is a post hoc test automatically run after ANOVA. " "Results appear only when ANOVA is significant." ), }, @@ -92,7 +92,7 @@ def get_metadata(cls) -> dict: "pares con p < α indican diferencias significativas." ), "not_significant": ( - "Esta es una prueba post-hoc ejecutada automáticamente " + "Esta es una prueba post hoc ejecutada automáticamente " "después de ANOVA. Los resultados aparecen solo cuando " "ANOVA es significativo." ), @@ -103,7 +103,7 @@ def get_metadata(cls) -> dict: "com p < α indicam diferenças significativas." ), "not_significant": ( - "Este é um teste post-hoc executado automaticamente " + "Este é um teste post hoc executado automaticamente " "após ANOVA. Os resultados aparecem apenas quando ANOVA " "é significativo." ), diff --git a/DashAI/back/statistical_tests/wilcoxon_sr_test.py b/DashAI/back/statistical_tests/wilcoxon_sr_test.py index a4ce7c9d45..2ace2fe5a5 100644 --- a/DashAI/back/statistical_tests/wilcoxon_sr_test.py +++ b/DashAI/back/statistical_tests/wilcoxon_sr_test.py @@ -35,7 +35,7 @@ class WilcoxonSRTest(BaseStatisticalTest): ) DESCRIPTION: str = MultilingualString( en=( - "Non-parametric test for comparing two related groups. ", + "Nonparametric test for comparing two related groups. ", "Requires paired observations and does not assume normality.", ), es=( @@ -43,7 +43,7 @@ class WilcoxonSRTest(BaseStatisticalTest): "Requiere observaciones emparejadas y no asume normalidad." ), pt=( - "Alternativa não-paramétrica ao teste t pareado para dois modelos. " + "Alternativa não paramétrica ao teste t pareado para dois modelos. " "Requer observações emparejadas e não assume normalidade." ), de=( diff --git a/DashAI/back/types/type_validation.py b/DashAI/back/types/type_validation.py index 75d7d42a60..51258296d6 100644 --- a/DashAI/back/types/type_validation.py +++ b/DashAI/back/types/type_validation.py @@ -112,7 +112,7 @@ def _validate_numeric_conversion( # Check if all values are numeric if pd.api.types.is_numeric_dtype(data): return True, "", data - return False, "Column contains non-numeric values", None + return False, "Column contains values that are not numbers", None except Exception as e: return False, f"Numeric conversion failed: {str(e)}", None @@ -122,7 +122,7 @@ def _validate_float_to_int(data: pd.Series) -> Tuple[bool, str, Optional[pd.Seri try: # Check if values are effectively integers if not pd.api.types.is_numeric_dtype(data): - return False, "Column contains non-numeric values", None + return False, "Column contains values that are not numbers", None # Check if there's decimal information that would be lost has_decimals = (data != data.astype(int)).any() diff --git a/DashAI/back/units/fit_model_over_folds_unit.py b/DashAI/back/units/fit_model_over_folds_unit.py index bb1e46b18a..e1dc02737b 100644 --- a/DashAI/back/units/fit_model_over_folds_unit.py +++ b/DashAI/back/units/fit_model_over_folds_unit.py @@ -211,7 +211,7 @@ def _score_folds(self, model, x_folds, y_folds, metric, record: bool) -> float: # The inner trials of a nested search score through here too. if not math.isfinite(score): raise RuntimeError( - f"Fold {index} scored a non-finite value ({score}) for the " + f"Fold {index} scored a value that is not finite ({score}) for the " f"optimization metric '{metric.__name__}'. Check that the " "metric is defined for the fold's data (a classification " "metric on a fold with a single class, say)." diff --git a/DashAI/back/units/generate_global_explanation_unit.py b/DashAI/back/units/generate_global_explanation_unit.py index 677929b196..3ab93e1504 100644 --- a/DashAI/back/units/generate_global_explanation_unit.py +++ b/DashAI/back/units/generate_global_explanation_unit.py @@ -22,7 +22,7 @@ class GenerateGlobalExplanationSchema(BaseSchema): placeholder=1, description=MultilingualString( en="Identifier of the global explanation being produced. It names " - "the files on disk, so a re-run overwrites its own artifacts and " + "the files on disk, so a rerun overwrites its own artifacts and " "never another explanation's.", es="Identificador de la explicación global que se produce. Da " "nombre a los archivos en disco, de modo que volver a ejecutarla " diff --git a/DashAI/back/units/generate_local_explanation_unit.py b/DashAI/back/units/generate_local_explanation_unit.py index debca6b413..46b70a3989 100644 --- a/DashAI/back/units/generate_local_explanation_unit.py +++ b/DashAI/back/units/generate_local_explanation_unit.py @@ -39,7 +39,7 @@ class GenerateLocalExplanationSchema(BaseSchema): placeholder=1, description=MultilingualString( en="Identifier of the local explanation being produced. It names " - "the files on disk, so a re-run overwrites its own artifacts.", + "the files on disk, so a rerun overwrites its own artifacts.", es="Identificador de la explicación local que se produce. Da nombre " "a los archivos en disco, de modo que volver a ejecutarla " "sobrescribe sus propios artefactos.", diff --git a/DashAI/back/units/load_dataset_unit.py b/DashAI/back/units/load_dataset_unit.py index cac25e15c5..f42294163e 100644 --- a/DashAI/back/units/load_dataset_unit.py +++ b/DashAI/back/units/load_dataset_unit.py @@ -57,7 +57,7 @@ class LoadDatasetSchema(BaseSchema): "dados deve ser carregada. Mutuamente exclusivo com o " "identificador do conjunto de dados.", de="Kennung des Notebooks, dessen Arbeitskopie des Datensatzes " - "geladen werden soll. Schließt die Datensatz-Kennung aus.", + "geladen werden soll. Schließt die Datensatzkennung aus.", zh="要加载其数据集工作副本的笔记本标识符。与数据集标识符互斥。", ), alias=MultilingualString( diff --git a/DashAI/back/units/run_exploration_unit.py b/DashAI/back/units/run_exploration_unit.py index 6999c5df09..59fe930a81 100644 --- a/DashAI/back/units/run_exploration_unit.py +++ b/DashAI/back/units/run_exploration_unit.py @@ -71,8 +71,8 @@ def _build_explorer_context( raise JobError( f"This explorer requires a report from the most recently finished " f"converter in the notebook, but the last converter was " - f"'{latest_converter.converter}', not '{required_class}'. Re-run " - f"the '{required_class}' converter before creating this explorer " + f"'{latest_converter.converter}', not '{required_class}'. Run " + f"the '{required_class}' converter again before creating this explorer " f"so its report reflects the current dataset." ) @@ -99,7 +99,7 @@ def _build_explorer_context( raise JobError( f"This explorer requires the '{required_algorithm}' clustering " f"algorithm, but the last Clustering converter ran '{used_algorithm}'" - f". Re-run the Clustering converter selecting the " + f". Run the Clustering converter again selecting the " f"'{required_algorithm}' algorithm." ) diff --git a/DashAI/back/units/save_exploration_unit.py b/DashAI/back/units/save_exploration_unit.py index 71146ac76e..bd89cccc30 100644 --- a/DashAI/back/units/save_exploration_unit.py +++ b/DashAI/back/units/save_exploration_unit.py @@ -22,7 +22,7 @@ class SaveExplorationSchema(BaseSchema): placeholder=1, description=MultilingualString( en="Identifier of the exploration being saved. It decides the " - "destination folder and the file name, so a re-run overwrites its " + "destination folder and the file name, so a rerun overwrites its " "own artifact and never another exploration's.", es="Identificador de la exploración que se guarda. Determina la " "carpeta de destino y el nombre del archivo, de modo que volver a " diff --git a/tests/back/RAG/test_RAG_pipeline_unit.py b/tests/back/RAG/test_RAG_pipeline_unit.py index c615d73237..b71f97b1a1 100644 --- a/tests/back/RAG/test_RAG_pipeline_unit.py +++ b/tests/back/RAG/test_RAG_pipeline_unit.py @@ -651,7 +651,7 @@ def test_chunk_label_renders_a_contiguous_range(): source_positions=(3, 4, 5), ) - assert _chunk_label(chunk) == "chunks nº 3–5" + assert _chunk_label(chunk) == "chunks nº 3 to 5" def test_chunk_label_lists_non_contiguous_positions(): diff --git a/tests/back/RAG/test_RAG_query_transformation_unit.py b/tests/back/RAG/test_RAG_query_transformation_unit.py index 751755d127..c72d97272d 100644 --- a/tests/back/RAG/test_RAG_query_transformation_unit.py +++ b/tests/back/RAG/test_RAG_query_transformation_unit.py @@ -527,7 +527,7 @@ def test_expander_numeric_array_not_tolerated(self): def test_expander_bare_empty_list_yields_precision_error(self): with pytest.raises( - RAGTransformationOutputError, match="does not contain a non-empty 'queries'" + RAGTransformationOutputError, match="does not contain a 'queries' list" ): _expander(['{"queries": []}']).transform("hi", []) diff --git a/tests/back/RAG/test_retriever_representation.py b/tests/back/RAG/test_retriever_representation.py index 0e09e55605..ad89a10c0c 100644 --- a/tests/back/RAG/test_retriever_representation.py +++ b/tests/back/RAG/test_retriever_representation.py @@ -144,9 +144,7 @@ def test_children_endpoint_serializes_the_representation(client: TestClient): assert isinstance(declared, MultilingualString) assert representation == declared.en - assert representation == ( - "max_iters {max_iters} · max_chunks {max_chunks} · {prompt}" - ) + assert representation == "max_iters {max_iters}, max_chunks {max_chunks}, {prompt}" assert "operation_summary" not in metadata diff --git a/tests/back/RAG/test_retriever_trace.py b/tests/back/RAG/test_retriever_trace.py index a62df8865b..4fc3374555 100644 --- a/tests/back/RAG/test_retriever_trace.py +++ b/tests/back/RAG/test_retriever_trace.py @@ -67,8 +67,11 @@ class _DescribedRetriever(_StubRetriever): es="Recuperador descrito.", ) REPRESENTATION = MultilingualString( - en="top-k {top_k} · {child.model_name}", - es="top-k {top_k} · {child.model_name}", + en="top-k {top_k}, {child.model_name}", + es="top-k {top_k}, {child.model_name}", + pt="top-k {top_k}, {child.model_name}", + de="top-k {top_k}, {child.model_name}", + zh="top-k {top_k},{child.model_name}", ) @@ -161,8 +164,11 @@ def test_retriever_trace_includes_description_and_representation(): "es": "Recuperador descrito.", } assert node["representation"] == { - "en": "top-k 3 · demo", - "es": "top-k 3 · demo", + "en": "top-k 3, demo", + "es": "top-k 3, demo", + "pt": "top-k 3, demo", + "de": "top-k 3, demo", + "zh": "top-k 3,demo", } assert node["chunks"] == ["1_0"] assert json.dumps(node) @@ -181,6 +187,22 @@ def test_retriever_trace_omits_unresolved_representation(): } +def test_retriever_trace_names_an_unresolved_placeholder_in_every_language(): + """A placeholder that misses reads as words, never as a dash.""" + retriever = _DescribedRetriever([], top_k=1) + retriever.set_trace_params({"top_k": 3}) + + node = retriever_trace(retriever, []) + + assert node["representation"] == { + "en": "top-k 3, not set", + "es": "top-k 3, sin definir", + "pt": "top-k 3, não definido", + "de": "top-k 3, nicht gesetzt", + "zh": "top-k 3,未设置", + } + + def test_retriever_trace_canonical_description_cannot_be_overridden(): """Extras may not shadow the rendered ``description``.""" stub = _DescribedRetriever([], top_k=1) diff --git a/tests/back/api/test_clustering_notebook_net.py b/tests/back/api/test_clustering_notebook_net.py index 1138b29fcf..cd4379b9a9 100644 --- a/tests/back/api/test_clustering_notebook_net.py +++ b/tests/back/api/test_clustering_notebook_net.py @@ -352,7 +352,7 @@ def test_an_explorer_after_another_converter_is_refused(client, notebook): assert message == ( "This explorer requires a report from the most recently finished " "converter in the notebook, but the last converter was 'ColumnRemover', " - "not 'Clustering'. Re-run the 'Clustering' converter before creating " + "not 'Clustering'. Run the 'Clustering' converter again before creating " "this explorer so its report reflects the current dataset." ) @@ -366,8 +366,8 @@ def test_an_explorer_for_another_algorithm_is_refused(client, notebook): assert message == ( "This explorer requires the 'agglomerative' clustering algorithm, but the " - "last Clustering converter ran 'kmeans'. Re-run the Clustering converter " - "selecting the 'agglomerative' algorithm." + "last Clustering converter ran 'kmeans'. Run the Clustering converter " + "again selecting the 'agglomerative' algorithm." ) diff --git a/tests/back/api/test_predict_preview_api.py b/tests/back/api/test_predict_preview_api.py index d9befe4576..340dff4303 100644 --- a/tests/back/api/test_predict_preview_api.py +++ b/tests/back/api/test_predict_preview_api.py @@ -472,7 +472,8 @@ def _explode(self, x): ), ( {"run_id": "1", "manual_input_data": "[]"}, - "manual_input_data must be a non-empty JSON array of objects (list[dict]).", + "manual_input_data must be a JSON array with at least one object " + "(list[dict]).", ), ( {"run_id": "1", "manual_input_data": "[1, 2]"}, diff --git a/tests/back/exploration/test_complexity_measures.py b/tests/back/exploration/test_complexity_measures.py index 9e05b9c23b..0c2c5f845f 100644 --- a/tests/back/exploration/test_complexity_measures.py +++ b/tests/back/exploration/test_complexity_measures.py @@ -118,7 +118,7 @@ def test_n2_skips_classes_with_a_single_member(): def test_n2_raises_when_no_point_has_a_same_class_neighbour(): X = np.array([[0.0], [1.0]]) y = np.array([0, 1]) - with pytest.raises(ValueError, match="same-class and a different-class"): + with pytest.raises(ValueError, match="neighbour of its own class and a neighbour"): intra_extra_nn_ratio(X, y) diff --git a/tests/back/models/test_gguf_text_generation.py b/tests/back/models/test_gguf_text_generation.py index 36cc36c565..795c9ed411 100644 --- a/tests/back/models/test_gguf_text_generation.py +++ b/tests/back/models/test_gguf_text_generation.py @@ -136,7 +136,7 @@ def test_partial_download_is_not_downloaded_and_error_is_actionable(component_ro assert cls.REPO_ID in message assert cls.GGUF_PATTERN in message assert "missing or incomplete" in message - assert "re-download" in message + assert "download the component again" in message def test_matching_gguf_is_downloaded_and_path_resolves(component_root): diff --git a/tests/back/test_visible_text_dashes.py b/tests/back/test_visible_text_dashes.py new file mode 100644 index 0000000000..51b33f47d7 --- /dev/null +++ b/tests/back/test_visible_text_dashes.py @@ -0,0 +1,584 @@ +"""Visible text keeps a hyphen only where the term is spelled with one. + +Display names, field and option labels, metadata labels and descriptions carry +no em or en dashes, no middle dots and no numeric ranges written with a hyphen. +A hyphenated word in a label is either a term whose standard spelling has the +hyphen (``STANDARD_TERMS``: Cross-Validation, K-Fold, Shapiro-Wilk, t-test, +TF-IDF, Feature-Engineering, ...) or an official model, package or checkpoint +name (``PRODUCT_NAMES``). The spellings that were cleaned (``CLEANED``) do not +come back in their language. +""" + +import re +from typing import Any, Dict, Iterator, List, Tuple + +import pytest + +from DashAI.back.core.schema_fields.enum_labels import SHARED_ENUM_LABELS +from DashAI.back.core.utils import MultilingualString +from DashAI.back.initial_components import get_initial_components +from DashAI.back.statistical_tests.base_statistical_test import BaseStatisticalTest + +LANGUAGES = ("en", "es", "pt", "de", "zh") + +DASH_PUNCTUATION = re.compile("[‒–—―·‧∙⋅・⸺⸻]") +NUMERIC_RANGE = re.compile(r"(? Iterator[Tuple[str, str]]: + if isinstance(value, MultilingualString): + for lang in LANGUAGES: + text = getattr(value, lang, None) + if isinstance(text, str): + yield lang, text + elif isinstance(value, str): + yield "en", value + + +def _schema_texts(node: Any) -> Iterator[Tuple[str, Any]]: + if isinstance(node, dict): + for key, value in node.items(): + if key == "title": + yield "label", value + elif key == "description": + yield "description", value + elif key == "enumNames" and isinstance(value, list): + for item in value: + yield "label", item + else: + yield from _schema_texts(value) + elif isinstance(node, list): + for item in node: + yield from _schema_texts(item) + + +def _metadata_texts(node: Any, key: str = "") -> Iterator[Tuple[str, Any]]: + if isinstance(node, MultilingualString): + if key in ("description", "short_description"): + yield "description", node + else: + yield "label", node + elif isinstance(node, dict): + for name, value in node.items(): + yield from _metadata_texts(value, str(name)) + elif isinstance(node, (list, tuple)): + for item in node: + yield from _metadata_texts(item, key) + + +def _visible_texts() -> Dict[str, List[Tuple[str, str, str]]]: + texts: Dict[str, List[Tuple[str, str, str]]] = {} + for component in get_initial_components(): + if not component.__module__.startswith("DashAI."): + continue + found: List[Tuple[str, Any]] = [ + ("label", getattr(component, "DISPLAY_NAME", None)), + ("description", getattr(component, "DESCRIPTION", None)), + ("description", getattr(component, "SHORT_DESCRIPTION", None)), + ] + if callable(getattr(component, "get_schema", None)): + found.extend(_schema_texts(component.get_schema())) + if callable(getattr(component, "get_metadata", None)): + found.extend(_metadata_texts(component.get_metadata())) + texts[component.__name__] = [ + (kind, lang, text) for kind, value in found for lang, text in _texts(value) + ] + texts["SHARED_ENUM_LABELS"] = [ + ("label", lang, text) + for labels in SHARED_ENUM_LABELS.values() + for label in labels.values() + for lang, text in _texts(label) + ] + return texts + + +VISIBLE_TEXTS = _visible_texts() +OWNERS = sorted(VISIBLE_TEXTS) + + +def _cleaned_pattern(term: str) -> re.Pattern: + if CJK.search(term): + return re.compile(re.escape(term)) + return re.compile(r"(? 400, len(OWNERS) + assert sum(len(texts) for texts in VISIBLE_TEXTS.values()) > 10000 + + +@pytest.mark.parametrize("owner", OWNERS) +def test_no_visible_text_uses_dashes_or_middle_dots_as_punctuation(owner: str): + offending = [ + (lang, text) + for _, lang, text in VISIBLE_TEXTS[owner] + if DASH_PUNCTUATION.search(text) + ] + assert not offending, f"{owner} shows an em or en dash or a middle dot: {offending}" + + +@pytest.mark.parametrize("owner", OWNERS) +def test_no_visible_text_writes_a_numeric_range_with_a_hyphen(owner: str): + offending = [] + for _, lang, text in VISIBLE_TEXTS[owner]: + stripped = text + for code in CODES: + stripped = stripped.replace(code, "") + offending.extend((lang, match) for match in NUMERIC_RANGE.findall(stripped)) + assert not offending, f"{owner} writes a range with a hyphen: {offending}" + + +@pytest.mark.parametrize("owner", OWNERS) +def test_every_hyphenated_label_word_is_a_standard_term_or_a_product_name( + owner: str, +): + unknown = set() + for kind, lang, text in VISIBLE_TEXTS[owner]: + if kind != "label": + continue + for match in HYPHENATED.finditer(text): + word = match.group(0).rstrip(".-") + if word not in STANDARD_TERMS and word not in PRODUCT_NAMES: + unknown.add((lang, word)) + assert not unknown, ( + f"{owner} labels use hyphenated words that are not standard terms: " + f"{sorted(unknown)}" + ) + + +@pytest.mark.parametrize("owner", OWNERS) +def test_cleaned_spellings_do_not_come_back(owner: str): + offending = set() + for _, lang, text in VISIBLE_TEXTS[owner]: + for term, pattern in CLEANED_PATTERNS.get(lang, []): + if pattern.search(text): + offending.add((lang, term)) + assert not offending, f"{owner} shows cleaned spellings: {sorted(offending)}" + + +@pytest.mark.parametrize( + ("owner", "expected"), + [ + ("CrossValidationEvaluationStrategy", "Cross-Validation"), + ("KFoldSplitter", "K-Fold"), + ("LeaveOneOutSplitter", "Leave-One-Out"), + ("ShapiroTest", "Shapiro-Wilk Test"), + ("PairedTTest", "Paired t-test"), + ("KMeansClustering", "K-Means"), + ("TFIDFConverter", "TF-IDF"), + ("GradCam", "Grad-CAM"), + ("RAGWorkflow", "Retrieval-Augmented Generation"), + ], +) +def test_standard_terms_keep_their_hyphen(owner: str, expected: str): + display_names = { + component.__name__: getattr(component, "DISPLAY_NAME", None) + for component in get_initial_components() + } + assert display_names[owner].en == expected + + +STATISTICAL_TESTS = [ + component + for component in get_initial_components() + if component.__module__.startswith("DashAI.") + and isinstance(component, type) + and issubclass(component, BaseStatisticalTest) +] + + +@pytest.mark.parametrize( + "component", STATISTICAL_TESTS, ids=[c.__name__ for c in STATISTICAL_TESTS] +) +def test_no_statistical_test_error_uses_dashes_as_punctuation(component: Any): + messages = [] + for scores in DEGENERATE_SCORES: + try: + component().run(scores) + except ValueError as error: + messages.append(str(error)) + except Exception: + continue + assert messages, f"{component.__name__} accepted every degenerate score set." + offending = [message for message in messages if DASH_PUNCTUATION.search(message)] + assert not offending, f"{component.__name__} reports {offending}." + + +def test_the_shapiro_wilk_errors_keep_the_hyphen(): + shapiro = next(c for c in STATISTICAL_TESTS if c.__name__ == "ShapiroTest") + with pytest.raises(ValueError, match="^Shapiro-Wilk Test requires exactly one"): + shapiro().run({})