Skip to content

Commit

Permalink
Attempt to add letter scores for small kanji letters.
Browse files Browse the repository at this point in the history
According to this wiki page:

> Modified letters with the diacritics ゛ and ゜ , as well as the
small letters (ぁぃぅぇぉっゃゅょゎ) are played as if
they were not modified.

So, with zero knowledge of Kanji, I tried to find the corresponding
letters that looked like these small letters, and put these small
letters next to the larger versions with the same score.
  • Loading branch information
pserwylo committed May 18, 2018
1 parent 4e70bc4 commit 0ad1bbd
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions libraries/trie/src/main/java/com/serwylo/lexica/lang/Japanese.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ public class Japanese extends Language {
// These point values are from an "unofficial Japanese Hiragana Scrabble set" according to
// wikipedia: https://en.wikipedia.org/wiki/Scrabble_letter_distributions#Japanese_Hiragana
letterPoints.put("い", 1);
letterPoints.put("ぃ", 1);
letterPoints.put("う", 1);
letterPoints.put("ぅ", 1);
letterPoints.put("か", 1);
letterPoints.put("し", 1);
letterPoints.put("た", 1);
Expand All @@ -25,20 +27,24 @@ public class Japanese extends Language {
letterPoints.put("く", 2);
letterPoints.put("こ", 2);
letterPoints.put("つ", 2);
letterPoints.put("っ", 2);
letterPoints.put("な", 2);
letterPoints.put("に", 2);
letterPoints.put("は", 2);
letterPoints.put("よ", 2);
letterPoints.put("ょ", 2);
letterPoints.put("れ", 2);

letterPoints.put("あ", 3);
letterPoints.put("ぁ", 3);
letterPoints.put("け", 3);
letterPoints.put("す", 3);
letterPoints.put("せ", 3);
letterPoints.put("も", 3);
letterPoints.put("り", 3);
letterPoints.put("る", 3);
letterPoints.put("わ", 3);
letterPoints.put("ゎ", 3);
letterPoints.put("ら", 3);

letterPoints.put("さ", 4);
Expand All @@ -47,15 +53,19 @@ public class Japanese extends Language {
letterPoints.put("ま", 4);

letterPoints.put("お", 5);
letterPoints.put("ぉ", 5);
letterPoints.put("ひ", 5);
letterPoints.put("ふ", 5);
letterPoints.put("ゆ", 5);
letterPoints.put("ゅ", 5);

letterPoints.put("ほ", 6);
letterPoints.put("め", 6);
letterPoints.put("や", 6);
letterPoints.put("ゃ", 6);

letterPoints.put("え", 8);
letterPoints.put("ぇ", 8);
letterPoints.put("へ", 8);
letterPoints.put("み", 8);

Expand All @@ -67,20 +77,11 @@ public class Japanese extends Language {

// All the tiles below were not directly listed in the wikipedia article. But rather, they
// are variations of the above with diacritics added (and perhaps other variations?).
letterPoints.put("ゃ", 1);
letterPoints.put("ゅ", 1);
letterPoints.put("ょ", 1);
letterPoints.put("ゎ", 1);
letterPoints.put("ゐ", 1);
letterPoints.put("ゑ", 1);
letterPoints.put("を", 1);
letterPoints.put("ゔ", 1);
letterPoints.put("〜", 1);
letterPoints.put("ぁ", 1);
letterPoints.put("ぃ", 1);
letterPoints.put("ぅ", 1);
letterPoints.put("ぇ", 1);
letterPoints.put("ぉ", 1);
letterPoints.put("が", 1);
letterPoints.put("ぎ", 1);
letterPoints.put("ぐ", 1);
Expand All @@ -93,7 +94,6 @@ public class Japanese extends Language {
letterPoints.put("ぞ", 1);
letterPoints.put("だ", 1);
letterPoints.put("ぢ", 1);
letterPoints.put("っ", 1);
letterPoints.put("づ", 1);
letterPoints.put("で", 1);
letterPoints.put("ど", 1);
Expand Down

0 comments on commit 0ad1bbd

Please sign in to comment.