Is there a way to calculate some kind of numerical 'score' for arbitrary strings which when compared with score of some other string will preserve '<' relation?
I've searched for order preserving compression/hashing but what I've found is either based on precomputing with known set of strings or is a some for of lossless compression.
To clarify - I don't need it to preserve order exactly. When I need is to have guarantee that if score(A) < score(B) than A < B. If score(A) >= score(B) than it still can be true that A < B. I just would be nice if probability of incorrect relation was 'low'.