I am trying to find some sort of encoding algorithm that would allow to transform system file paths eg. "c:/users/file1/subfile2/targetfile" into a feature that I could use in machine learning like a float value. It would be best if the folders/files located in the end of the path would have a smaller impact on the output value.
I am thinking maybe some combination of hashing and arithmetics but not sure for now.
I tried looking for something like that in scientific papers and on the internet in general but with no success.
Have anyone ever done something like that or similar?
Sorry if there are some stupid errors in my question. I am just starting my data science adventure.