safe_model.predict().unwrap() returns a Vec<String> with the string being separate by commas which is hard to work with because it's difficult to tell what number stands for what. Ideally would like it to return a vector of something like this:
struct Prediction {
pub file: String,
pub line: u32,
pub col: u32,
pub text: String,
pub class: String,
pub probability: String,
}
this could give an option to convert it to a JSON return returning a Vec in a Json file or directly use it if working with this crate in the library version.
safe_model.predict().unwrap()returns aVec<String>with the string being separate by commas which is hard to work with because it's difficult to tell what number stands for what. Ideally would like it to return a vector of something like this:this could give an option to convert it to a JSON return returning a Vec in a Json file or directly use it if working with this crate in the library version.