From 561ae87e953ada3f2a20a45f203c300bdce7f2ac Mon Sep 17 00:00:00 2001 From: Ross Armstrong <52817125+rossarmstrong@users.noreply.github.com> Date: Thu, 26 Oct 2023 16:00:09 +1100 Subject: [PATCH] Add enhancements to new version --- werpy/normalize.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/werpy/normalize.py b/werpy/normalize.py index 36239c8..bda736e 100644 --- a/werpy/normalize.py +++ b/werpy/normalize.py @@ -81,7 +81,7 @@ def remove_leading_trailing_spaces(self): def remove_whitespace(self): """ Method that removes leading/trailing spaces and multiple spaces within text - """ + """ if isinstance(self.text, np.ndarray): if self.text.ndim == 0: # For scalar arrays, convert to a string, split, and join @@ -90,7 +90,7 @@ def remove_whitespace(self): # For 1-dimensional arrays, split and join self.text = ' '.join(self.text.astype(str).tolist()) elif isinstance(self.text, str): - self.text = ' '.join(self.text.split()) + self.text = ' '.join(self.text.split()) def apply_normalization(self) -> np.ndarray: """