# “Rate” or “score” a word by various parameters

I’m working on a small project which involves a large list of words (single words, no sentence) and I would love to have a way to “rate” or “score” each word by some parameters.

Right now I have two parameters I’m looking at:
I’ll use example as example :-)

``````The length of the word: 7
The count of each letter: 6 (because **e** occurs twice in this word).
``````

I’ve also thought to divide the word into consonants and vowels but haven’t done so yet.

So, from the two parameters, I’ve experimented with two very basic algorithms for “rating” the word:

``````word-length * (word-length/chars-length) or vice versa
word-length * (chars-length/word-length)
``````

For first calculation it will be

7 * (7/6) = 8,16666666666669

And for the second it is:

7 * (6/7) = 6,00000000000002

While this might be useful I’m not sure that I’m actually knowing what I’m doing here :-)

Because if I have a word with a word-length of 15 but the chars-length is only 11, the same two calculations would be 20,4545454545454 and 10,99999999999995

This number is higher than the above and that might be okay because the length of the word is longer, but the uniqueness is less.

I’ve tried to searching Google if there is a more “general” way where a word is rated (not necessarily with these two parameters) but haven’t found anything.

Can anyone help me making a meaningful “rating” og “score” for a word so both is length and it’s “strengthens” is taken into consideration or maybe have some additional parameters to use for this?

I’m sorry if the question does not make sense or if I need to elaborate on something, please let me know.

Cheers,
- E

• You need some math lessons: 7*(6/7) is NOT 6.00000000000002. It is exactly 6. Also 15*(11/15) gives exactly 11, not 10,99999999999995. – Hubert Schölnast May 22 '14 at 10:03
• It would help if you explained your final goal for the project, rather than arbitrary ratings or parameters. – prash May 22 '14 at 10:17
• Also, you should know that what's being counted is letters, which have nothing to do with language or meaning; both are related to sound, not spelling. Also "vowel letters" and "consonant letters" are not the same thing at all as consonants and vowels; the only thing this can conceivably measure is the refractory structure of English spelling conventions. If that's your goal, go for it; otherwise, you might want to rethink some parameters. – jlawler May 22 '14 at 20:22

I apologize my answer does not directly say what specific formula should be used, but I'm pretty sure it will provide with suggestion how to arrange your research.

@prash is absolutely right in their comment: you should edit your answer and explain the goal of your computation.

Nevertheless, whatever your goal is, you may consider Test-Driven Development approach here:

1. Take some "testing corpus" of words, write it by yourself;
2. Manually sort it according to the expected result;
3. Probably, you don't even need the actual digital values. The goal is to make sure they appeared in correct order;
4. Then play with different algorithms so that they performed sorting according to your tests;
5. Modify the corpus whenever you need, and probably you will need to modify the sorting formula as well.

Don't be surprised if your resulting formula appears to be complicated and non-obvious, this is the nature of such tasks.