Instead of using `String => Double` as the type of these, we should create a `trait LabelParser` and have some implementations of it so that it becomes friendly to call from Java.