Skip to content

Commit

Permalink
Internationalization for filter options
Browse files Browse the repository at this point in the history
  • Loading branch information
joaquinvanschoren committed Jan 5, 2024
1 parent 529361f commit cf4db12
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 7 deletions.
47 changes: 43 additions & 4 deletions app/public/locales/en/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -639,43 +639,82 @@ filters:
Public: "Public Domain Mark"
public: "Public Domain Mark"
public domain: "Public Domain Mark"
Publicly available: "Public Domain Mark"
Public Domain (CC0): "CC0"
CC0: "CC0"
CC_BY: "CC BY"
CC-BY: "CC BY"
CC BY-NC 4.0: "CC BY-NC 4.0"
CC_BY-NC-ND: "CC BY-NC-ND"
CC BY-NC-SA 4.0: "CC BY-NC-ND"
CC BY 4.0: "CC BY 4.0"
Attribution 4.0 International (CC BY 4.0): "CC BY 4.0"
GPL-2: "GPL 2"
GPL 2: "GPL 2"
Open Database License (ODbL): "Open Database Licence"
Free: "Free"
See source: "See source"
tasktype: "Task type"
Clustering: "Clustering"
Supervised Regression: "Supervised Regression"
Supervised Classification: "Supervised Classification"
Supervised Data Stream Classification: "Supervised Data Stream Classification"
Survival Analysis: "Survival Analysis"
Machine Learning Challenge: "Machine Learning Challenge"
Learning Curve: "Learning Curve Analysis"
Subgroup Discovery: "Subgroup Discovery"
Regression: "Regression"
Binary Classification: "Binary Classification"
Multi-Class: "Multi-Class"
format: "Formatting"
ARFF: "Dense"
arff: "Dense"
Sparse_ARFF: "Sparse"
ARFF: "Dense Tabular"
arff: "Dense Tabular"
Sparse_ARFF: "Sparse Tabular"
sparse_arff: "Sparse Tabular"
csv: "CSV"
CSV: "CSV"
Rimage: "R image"
txt: "Text"
estimation_procedure: "Estimation Procedure"
evaluation_measures: "Evaluation Measure"
10-fold Crossvalidation: "10-fold Crossvalidation"
4-fold Crossvalidation: "4-fold Crossvalidation"
Custom 10-fold Crossvalidation: "Custom 10-fold Crossvalidation"
Custom holdout: "Custom holdout"
Custom Holdout: "Custom holdout"
10 times 10-fold Crossvalidation: "10 times 10-fold Crossvalidation"
100 times 10-fold Crossvalidation: "100 times 10-fold Crossvalidation"
10 times 10-fold Learning Curve: "10 times 10-fold Learning Curve"
33% holdout set: "33% holdout"
33% Holdout set: "33% holdout"
20% Holdout (Ordered): "20% holdout (ordered)"
10% Holdout set: "10% holdout"
Holdout unlabeled: "Holdout unlabeled"
5 times 2-fold Crossvalidation: "5 times 2-fold Crossvalidation"
50 times Clustering: "50 times Clustering"
10-fold Learning Curve: "10-fold Learning Curve"
Interleaved Test Then Train: "Interleaved Test Then Train"
Interleaved Test then Train: "Interleaved Test Then Train"
Test on Training Data: "Test on Training Data"
Leave one out: "Leave one out"
predictive_accuracy: "Predictive Accuracy"
area_under_roc_curve: "Area under ROC curve"
mean_absolute_error: "Mean absolute error"
Mean absolute error: "Mean absolute error"
precision: "Precision"
recall: "Recall"
root_mean_squared_error: "Root mean squared error"
root_relative_squared_error: "Root relative squared error"
c_index: "C-index"
f_measure: "F-measure"
average_cost: "Average cost"
matthews_correlation_coefficient: "Matthews correlation coefficient"
mean_precision: "Mean precision"
confusion_matrix: "Confusion matrix"
mean_class_complexity: "Mean class complexity"
class_complexity: "Class complexity"
binomial_test: "Binomial test"
f1: "F1 score"
pattern_team_auroc10: "Pattern team AUROC"
dependencies: "Libraries"
sklearn: "sklearn {{version}}"
torch: "Torch {{version}}"
Expand Down
4 changes: 3 additions & 1 deletion app/src/components/search/Filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ const processOption = (option) => {
return [`filters.${lib}`];
}
} else {
return [`filters.${option}`];
// If comma or newline separated, return the first
const segments = option.split(/,|\n/);
return [`filters.${segments[0]}`];
}
};

Expand Down
1 change: 0 additions & 1 deletion app/src/pages/d/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ const search_facets = [
{
label: "filters.licence",
field: "licence.keyword",
show: "10",
},
{
label: "filters.size",
Expand Down
2 changes: 1 addition & 1 deletion app/src/pages/d/searchConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const searchConfig = {
facets: {
"status.keyword": { type: "value" },
"name.keyword": { type: "value" },
"licence.keyword": { type: "value", size: 10 },
"licence.keyword": { type: "value" },
"qualities.NumberOfInstances": {
type: "range",
ranges: [
Expand Down

0 comments on commit cf4db12

Please sign in to comment.