Class LabelEscaper
java.lang.Object
ca.mcscert.jpipe.util.LabelEscaper
Converts a human-readable jPipe element label into a valid Python identifier
(snake_case).
The conversion is two-phase:
- Unicode NFD normalisation followed by stripping of combining diacritics,
so accented characters map to their ASCII base (e.g.
é→e,ü→u). - Lowercasing, collapsing any run of non-alphanumeric characters to a single underscore, and stripping leading/trailing underscores. If the result starts with a digit an underscore prefix is added.
Examples:
"The system is correct"→"the_system_is_correct""Accuracy <= 0.85"→"accuracy_0_85""café test"→"cafe_test""100% accurate"→"_100_accurate"
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringtoMethodName(String label) Convertlabelto a valid snake_case Python identifier.
-
Method Details
-
toMethodName
-