Skip to content

Commit 4e9aba0

Browse files
Fix various typos (#323)
1 parent 1b730ee commit 4e9aba0

20 files changed

+50
-50
lines changed

.github/workflows/unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ jobs:
214214
git config --global --add safe.directory $(Resolve-Path '.' | % {$_.toString()})
215215
python setup.py egg_info
216216
217-
# Install the Pyrhon requirements
217+
# Install the Python requirements
218218
Get-Content .\khiops.egg-info\requires.txt `
219219
| Select-String -Pattern '^\[' -NotMatch `
220220
| Select-String -Pattern '^$' -NotMatch `

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787

8888
### Fixed
8989
- `core`
90-
- Metric name search in estimator analyis report.
90+
- Metric name search in estimator analysis report.
9191

9292
## 10.2.1.0 - 2024-03-26
9393

@@ -219,7 +219,7 @@ Note: This release marks the open sourcing of Khiops:
219219
- Estimators now accept dataframes with numerical column indexes.
220220
- `KhiopsClassifier` now accepts integer target vectors.
221221
- `classes_` estimator attribute for `KhiopsClassifier` (available once fitted).
222-
- `feature_names_out_` estimator attirbute for `KhiopsEncoder` (available once fitted).
222+
- `feature_names_out_` estimator attribute for `KhiopsEncoder` (available once fitted).
223223
- `export_report_file` and `export_dictionary_file` to export Khiops report and dictionary files
224224
once the estimators are fitted.
225225
- `internal_sort` parameter for estimators that may be used to not sort the tables on the

doc/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Khiops Python library.
1515

1616
# You'll also need a system-wide installation of pandoc (https://pandoc.org)
1717

18-
# Execute this if there were non commited updates to samples.py or samples_sklearn.py:
18+
# Execute this if there were non committed updates to samples.py or samples_sklearn.py:
1919
# ./convert-samples-hook
2020

2121
# To clean the html documentation

doc/samples/samples_sklearn.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ Samples
400400
os.path.join(accidents_dataset_path, "Vehicles.txt"), sep="\t"
401401
)
402402
403-
# Split the secondary dataframe with the keys of the splitted root dataframe
403+
# Split the secondary dataframe with the keys of the split root dataframe
404404
X_train_ids = X_train_main["AccidentId"].to_frame()
405405
X_test_ids = X_test_main["AccidentId"].to_frame()
406406
X_train_secondary = X_train_ids.merge(vehicles_df, on="AccidentId")
@@ -825,7 +825,7 @@ Samples
825825
# Load the secondary table of the dataset into a pandas dataframe
826826
vehicles_df = pd.read_csv(os.path.join(accidents_data_dir, "Vehicles.txt"), sep="\t")
827827
828-
# Split the secondary dataframe with the keys of the splitted root dataframe
828+
# Split the secondary dataframe with the keys of the split root dataframe
829829
X_train_ids = X_train["AccidentId"].to_frame()
830830
X_test_ids = X_test["AccidentId"].to_frame()
831831
X_train_secondary = X_train_ids.merge(vehicles_df, on="AccidentId")
@@ -891,7 +891,7 @@ Samples
891891
os.path.join(accidents_dataset_path, "Vehicles.txt"), sep="\t"
892892
)
893893
894-
# Split the secondary dataframe with the keys of the splitted root dataframe
894+
# Split the secondary dataframe with the keys of the split root dataframe
895895
X_train_ids = X_train_main["AccidentId"].to_frame()
896896
X_test_ids = X_test_main["AccidentId"].to_frame()
897897
X_train_secondary = X_train_ids.merge(vehicles_df, on="AccidentId")

khiops/core/api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ def train_predictor(
757757
Pairs specified with ``specific_pairs`` have top priority: they are constructed
758758
first.
759759
only_pairs_with : str, default ""
760-
Constructs only pairs with the specifed variable name. If equal to the empty
760+
Constructs only pairs with the specified variable name. If equal to the empty
761761
string "" it considers all variables to make pairs.
762762
**Deprecated** will be removed in Khiops Python 11, use ``specific_pairs``.
763763
group_target_value : bool, default ``False``
@@ -1083,7 +1083,7 @@ def train_recoder(
10831083
Pairs specified with ``specific_pairs`` have top priority: they are constructed
10841084
first.
10851085
only_pairs_with : str, default ""
1086-
Constructs only pairs with the specifed variable name. If equal to the empty
1086+
Constructs only pairs with the specified variable name. If equal to the empty
10871087
string "" it considers all variables to make pairs.
10881088
**Deprecated** will be removed in Khiops Python 11, use ``specific_pairs``.
10891089
group_target_value : bool, default ``False``
@@ -1133,7 +1133,7 @@ def train_recoder(
11331133
- "conditional info": Conditional information of the interval/group
11341134
- "none": Keeps the variable as-is
11351135
grouping_method : str
1136-
Name of the grouping method. Its vaild values depend on the task:
1136+
Name of the grouping method. Its valid values depend on the task:
11371137
- Supervised: "MODL" (default) or "BasicGrouping"
11381138
- Unsupervised: "BasicGrouping" (default) or "None"
11391139
min_group_frequency : int, default 0

khiops/core/coclustering_results.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ class CoclusteringDimension:
490490
"""A coclustering dimension (variable)
491491
492492
A coclustering dimension is a hierarchical clustering of an input variable. The
493-
leafs of this hierarchy are linked to an element of a partition of the input
493+
leaves of this hierarchy are linked to an element of a partition of the input
494494
variable. Leaf clusters have variable parts as their children.
495495
496496
It only has a no-parameter constructor.
@@ -553,7 +553,7 @@ def __init__(self):
553553
# Default group attribute only for categorical dimensions
554554
self.default_group = None
555555

556-
# List of the hierarchy clusters, ranging from the root to the leafs
556+
# List of the hierarchy clusters, ranging from the root to the leaves
557557
self.root_cluster = None
558558
self.clusters = []
559559

@@ -939,7 +939,7 @@ def __init__(self, json_data=None):
939939
# Transform to an empty dictionary if json_data is not specified
940940
if json_data is None:
941941
json_data = {}
942-
# Otherise check the validity of json_data
942+
# Otherwise check the validity of json_data
943943
elif "cluster" not in json_data:
944944
raise KhiopsJSONError("'cluster' key not found")
945945

@@ -955,7 +955,7 @@ class CoclusteringDimensionPartInterval(CoclusteringDimensionPart):
955955
json_data : dict, optional
956956
Python dictionary representing an element of type "Numerical" of the list at the
957957
``dimensionPartitions`` field of a Khiops Coclustering JSON report file. If not
958-
specifed it returns an empty instance.
958+
specified it returns an empty instance.
959959
960960
Raises
961961
------
@@ -1205,7 +1205,7 @@ def __init__(self, json_data=None):
12051205
# Transform to an empty dictionary if json_data is not specified
12061206
if json_data is None:
12071207
json_data = {}
1208-
# Otherwise check the "cluter" and "parentCluster" keys
1208+
# Otherwise check the "cluster" and "parentCluster" keys
12091209
else:
12101210
if "cluster" not in json_data:
12111211
raise KhiopsJSONError("'cluster' key not found")
@@ -1224,7 +1224,7 @@ def __init__(self, json_data=None):
12241224
self.short_description = json_data.get("shortDescription", "")
12251225
self.description = json_data.get("description", "")
12261226

1227-
# Link to child clusters, None for the leafs of the hierarchy
1227+
# Link to child clusters, None for the leaves of the hierarchy
12281228
# The user must specify the CoclusteringCluster references parent_cluster
12291229
# and child_cluster that link this instance to the hierarchy
12301230
self.parent_cluster = None

khiops/core/internals/filesystems.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# pylint: disable=invalid-name
2020

2121
# Import boto3 if available
22-
# Delay the raising of an ImportError to an instantation of a AmazonS3Resource
22+
# Delay an ImportError raising to an instantiation of a AmazonS3Resource
2323
try:
2424
import boto3
2525
import boto3.session
@@ -30,7 +30,7 @@
3030
boto3_import_error = import_error
3131

3232
# Import google.could if available
33-
# Delay the raising of an ImportError to an instantation of a GoogleCloudStorageResource
33+
# Delay an ImportError raising to an instantiation of a GoogleCloudStorageResource
3434
try:
3535
from google.cloud import storage
3636

khiops/core/internals/runner.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ def samples_dir(self):
365365
return self._get_samples_dir()
366366

367367
def _get_samples_dir(self):
368-
"""To be overriden by subclasses"""
368+
"""To be overridden by subclasses"""
369369
return self._samples_dir
370370

371371
@samples_dir.setter
@@ -386,7 +386,7 @@ def khiops_version(self):
386386
return self._get_khiops_version()
387387

388388
def _get_khiops_version(self):
389-
"""khiops_version getter to be overriden by subclasses"""
389+
"""khiops_version getter to be overridden by subclasses"""
390390
return self._khiops_version
391391

392392
def _build_status_message(self):
@@ -1072,7 +1072,7 @@ def _set_samples_dir(self, samples_dir):
10721072
super()._set_samples_dir(samples_dir)
10731073

10741074
def _get_samples_dir(self):
1075-
# Check the samples dir once (the check emmits only warnings)
1075+
# Check the samples dir once (the check emits only warnings)
10761076
if not self._samples_dir_checked:
10771077
_check_samples_dir(self._samples_dir)
10781078
self._samples_dir_checked = True

khiops/core/internals/scenario.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def _parse_template(self):
8282
line = next(line_iter, None)
8383
line_num += 1
8484

85-
# Eliminate empty lines at the beggining and end if any
85+
# Eliminate empty lines at the beginning and end if any
8686
if self._parsed_template[0] == "":
8787
self._parsed_template.pop(0)
8888
if self._parsed_template[-1] == "":
@@ -128,7 +128,7 @@ def _parse_section(self, section_keyword, line_iter):
128128
if statement_re.match(statement) is None:
129129
raise ValueError(
130130
"Statement must contain only alphabetic characters and '.' "
131-
f"(no '.' at the beggining): '{statement}'"
131+
f"(no '.' at the beginning): '{statement}'"
132132
)
133133

134134
return section_param_name, section_spec

khiops/core/internals/task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def __init__(
210210
for kwarg_signature in self.kwargs_signature
211211
}
212212

213-
# Post-intialization checks
213+
# Post-initialization checks
214214
# Check that the path_valued_arg_names are contained in either args or kwargs
215215
all_arg_names = list(self._args_signature_by_name.keys()) + list(
216216
self._kwargs_signature_by_name.keys()

0 commit comments

Comments
 (0)