Design suggestion - create a single method to normalize all text
Closed this issue · 1 comments
The order of the normalizations may matter. In addition to the individual normalization methods, you could add a method to call all of the normalized methods in the correct order. This would move the logic from the main execution module to the class for the normalizations.
You should also avoid counting on side effects of one method in other methods. Since the only method with an input file is lowercase
, that method must be called first, which is counting on the side effect of that method call. A better approach would be to pass in the input value to the constructor for the class or only expose a single methods which performs all of the normalizations.
@goneall Done. I have a return function now in normalize_class file that implements all the normalized methods.