# How to encode positional information of a string in a NN effectively

So I want to compare strings and find out there relation to one another. For this I figured out I also have to encode the positional info. For eg: aaaaassssssbbbbbb should be more relevant to aaaasssssbbbbrather than bbbbaaasssss. The output will be a relative measure and 1 and 2 should match more compared to 1 and 3. Also I will represent each character by a number.

So how can I re-design my feature vector (feature transformation) to be input in a NN to capture this information effectively?