# Domain scoring based on ranking

I am a computer science student working on a small information retrieval project. I have a dictionary with a domain as a key and it's ranking as value.

Based on that ranking, I need to score every domains. I was thinking to do 1/ranking but the disparity is too high. For example the first domain will have a score of 1 (1/1) and the domain ranked 10th will have a score of 0.1 which does not make sense for this.

I have 1000 domains in total and the last one should be close to 0.10 and the first one close to 1

You are essentially asking how Google calculates the score of the domains. The correspondence of the score with ranking is different for every search. Sometimes it is closer to x(i) = alpha*x(i-1) (exponential weights). Sometimes it could be linear x(i) = (n-i)*2/((n+1)*n). I've seen some papers that just use the number of the ranking for regression (linear), but this was not about internet domains, but some other topic.
You are using 1/1, 1/2, 1/3 ... 1/100 ... 1/1000
Instead you could use 1/1, 1/1.01, 1/1.02, 1/1.03 ... 1/2 ... 1/10
So your weights are $$weights = \frac{1}{1+ranking*0.01*\frac{9}{9.99}}$$ where ranking starts with 0 and ends with 999