Skip to content

Commit

Permalink
Fix typo in fasttext preprocessor class
Browse files Browse the repository at this point in the history
  • Loading branch information
tomseimandi committed Mar 22, 2024
1 parent a7aca3c commit f2ef23e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/fasttext_classifier/fasttext_preprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ def preprocess_for_model(
# Recase parameter is not used here.
df = self.clean_lib(df, text_feature, "training")

if add_codes:
# Adding missing APE codes in the database by adding the official label as text feature
df_train = self.add_missing_codes(df, df_naf, y, text_feature)

# Train/test split
features = [text_feature]
if categorical_features is not None:
Expand All @@ -75,8 +71,8 @@ def preprocess_for_model(

# Adding missing APE codes in the train database by adding the official label as
# text feature

df_train = self.add_missing_codes(df_train, df_naf, y, text_feature)
if add_codes:
df_train = self.add_missing_codes(df_train, df_naf, y, text_feature)

if oversampling is not None:
print("\t*** Oversampling the train database...\n")
Expand Down

0 comments on commit f2ef23e

Please sign in to comment.