Details
ScrabbleScore assumes the letter values and distribution of a standard English-language edition Scrabble game. Other language-versions have different letters and letter distributions. This is not yet considered here.
Input can be in uppercase or lowercase. "?" represents a blank tile.
English-language editions of Scrabble contain 100 tiles, in the following distribution:
0 points: 'blank' indicated by ? x2
1 point: E ×12, A ×9, I ×9, O ×8, N ×6, R ×6, T ×6, L ×4, S ×4, U ×4
2 points: D ×4, G ×3
3 points: B ×2, C ×2, M ×2, P ×2
4 points: F ×2, H ×2, V ×2, W ×2, Y ×2
5 points: K ×1
8 points: J ×1, X ×1
10 points: Q ×1, Z ×1
ResourceFunction["ScrabbleScore"] returns a single integer indicating the total points scored for a valid input.
The awarded score assumes the limits on each character shown above. A zero value, constitent with a blank, is given for each instance of a character above the limit. When the number of possible blanks is exceeded, an error is returned instead of a score. For example, "pizzazz" has four "z" characters more than the number of "z" tiles and blank tiles combined.