Compare commits

..

No commits in common. "3977cc4c63c48efc5bba701777443ad8c639c1ab" and "8e47dc24d7041d0ca1d5ed23c453e2aa633d59c0" have entirely different histories.

4 changed files with 4 additions and 107 deletions

View File

@ -1,7 +1,7 @@
module IkaConjugations module IkaConjugations
U_VOWEL_CHANGES = { U_VOWEL_CHANGES = {
"" => { "a" => "", "i" => "", "u" => "", "e" => "", "o" => "" }, "" => { "a" => "", "i" => "", "u" => "", "e" => "", "o" => "" },
"" => { "a" => "", "i" => "", "u" => "", "e" => "", "o" => "" }, "" => { "a" => "", "i" => "", "u" => "", "e" => "", "o" => "" },
"" => { "a" => "", "i" => "", "u" => "", "e" => "", "o" => "" }, "" => { "a" => "", "i" => "", "u" => "", "e" => "", "o" => "" },
"" => { "a" => "", "i" => "", "u" => "", "e" => "", "o" => "" }, "" => { "a" => "", "i" => "", "u" => "", "e" => "", "o" => "" },
"" => { "a" => "", "i" => "", "u" => "", "e" => "", "o" => "" }, "" => { "a" => "", "i" => "", "u" => "", "e" => "", "o" => "" },

View File

@ -64,19 +64,6 @@ module IkaConjugations
def potential def potential
Ichidan.new(potential_starter.kanji, potential_starter.kana, "to be able #{definition}") Ichidan.new(potential_starter.kanji, potential_starter.kana, "to be able #{definition}")
end end
def excessive
Ichidan.new(stem.kanji + "すぎる", stem.kana + "すぎる", "#{definition} too much")
end
def volitional
negative_stem + "よう"
end
def passive
Ichidan.new(passive_starter.kanji, passive_starter.kana, "#{definition} (dissatisfied)")
end
class Ichidan < Verb class Ichidan < Verb
def stem def stem
all_but_last_character all_but_last_character
@ -93,14 +80,6 @@ module IkaConjugations
def potential_starter def potential_starter
stem + "られる" stem + "られる"
end end
def ba
stem + "れば"
end
def passive_starter
stem + "られる"
end
end end
class Godan < Verb class Godan < Verb
@ -152,18 +131,6 @@ module IkaConjugations
"んで" "んで"
end end
end end
def volitional
all_but_last_character + last_character("o") + ""
end
def ba
all_but_last_character + last_character("e") + ""
end
def passive_starter
all_but_last_character + last_character("a") + "れる"
end
end end
class Suru < Verb class Suru < Verb
@ -186,14 +153,6 @@ module IkaConjugations
def potential_starter def potential_starter
prefix + "できる" prefix + "できる"
end end
def ba
prefix + "すれば"
end
def passive_starter
prefix + "される"
end
end end
class Kuru < Verb class Kuru < Verb
@ -216,14 +175,6 @@ module IkaConjugations
def potential_starter def potential_starter
negative_stem + "られる" negative_stem + "られる"
end end
def ba
prefix + KanaKanji.new("", "") + "れば"
end
def passive_starter
prefix + KanaKanji.new("", "") + "られる"
end
end end
end end
end end

View File

@ -44,7 +44,7 @@ module IkaConjugations
au = KanaKanji.new("会う", "あう") au = KanaKanji.new("会う", "あう")
assert_equal "", au.last_character assert_equal "", au.last_character
assert_equal "", au.last_character("a") assert_equal "", au.last_character("a")
assert_equal "", au.last_character("i") assert_equal "", au.last_character("i")
assert_equal "", au.last_character("u") assert_equal "", au.last_character("u")
assert_equal "", au.last_character("e") assert_equal "", au.last_character("e")

View File

@ -4,7 +4,7 @@ require "minitest/autorun"
module IkaConjugations module IkaConjugations
class TestVerb < Minitest::Test class TestVerb < Minitest::Test
def setup def setup
@miru = Verb::Ichidan.new("見る", "みる", "to see") @miru = Verb::Ichidan.new("見る", "みる", "to look")
@nomu = Verb::Godan.new("飲む", "のむ", "to drink") @nomu = Verb::Godan.new("飲む", "のむ", "to drink")
@au = Verb::Godan.new("会う", "あう", "to meet") @au = Verb::Godan.new("会う", "あう", "to meet")
@matsu = Verb::Godan.new("待つ", "まつ", "to wait") @matsu = Verb::Godan.new("待つ", "まつ", "to wait")
@ -23,7 +23,7 @@ module IkaConjugations
@aru = Verb::Godan.new("ある", "ある", "to be") @aru = Verb::Godan.new("ある", "ある", "to be")
end end
def test_te def test_te_form
assert_equal "見て", @miru.te.kanji assert_equal "見て", @miru.te.kanji
assert_equal "みて", @miru.te.kana assert_equal "みて", @miru.te.kana
assert_equal "飲んで", @nomu.te.kanji assert_equal "飲んで", @nomu.te.kanji
@ -111,8 +111,6 @@ module IkaConjugations
assert_equal "連れて来ない", @tsuretekuru.short_form_present_negative.kanji assert_equal "連れて来ない", @tsuretekuru.short_form_present_negative.kanji
assert_equal "つれてこない", @tsuretekuru.short_form_present_negative.kana assert_equal "つれてこない", @tsuretekuru.short_form_present_negative.kana
assert_equal "ない", @aru.short_form_present_negative.kana assert_equal "ない", @aru.short_form_present_negative.kana
assert_equal "会わない", @au.short_form_present_negative.kanji
assert_equal "あわない", @au.short_form_present_negative.kana
end end
def test_long_form_past_positive def test_long_form_past_positive
@ -177,8 +175,6 @@ module IkaConjugations
assert_equal "連れて来なかった", @tsuretekuru.short_form_past_negative.kanji assert_equal "連れて来なかった", @tsuretekuru.short_form_past_negative.kanji
assert_equal "つれてこなかった", @tsuretekuru.short_form_past_negative.kana assert_equal "つれてこなかった", @tsuretekuru.short_form_past_negative.kana
assert_equal "なかった", @aru.short_form_past_negative.kana assert_equal "なかった", @aru.short_form_past_negative.kana
assert_equal "会わなかった", @au.short_form_past_negative.kanji
assert_equal "あわなかった", @au.short_form_past_negative.kana
end end
def test_desire def test_desire
@ -195,13 +191,11 @@ module IkaConjugations
assert_equal "連れて来たい", @tsuretekuru.desire.kanji assert_equal "連れて来たい", @tsuretekuru.desire.kanji
assert_equal "つれてきたい", @tsuretekuru.desire.kana assert_equal "つれてきたい", @tsuretekuru.desire.kana
assert_equal "ありたい", @aru.desire.kana assert_equal "ありたい", @aru.desire.kana
assert_equal "あいたい", @au.desire.kana
end end
def test_potential def test_potential
assert_equal "見られる", @miru.potential.dictionary.kanji assert_equal "見られる", @miru.potential.dictionary.kanji
assert_equal "みられる", @miru.potential.dictionary.kana assert_equal "みられる", @miru.potential.dictionary.kana
assert_equal "to be able to see", @miru.potential.definition
assert_equal "飲める", @nomu.potential.dictionary.kanji assert_equal "飲める", @nomu.potential.dictionary.kanji
assert_equal "のめる", @nomu.potential.dictionary.kana assert_equal "のめる", @nomu.potential.dictionary.kana
assert_equal "できる", @suru.potential.dictionary.kanji assert_equal "できる", @suru.potential.dictionary.kanji
@ -214,53 +208,5 @@ module IkaConjugations
assert_equal "つれてこられる", @tsuretekuru.potential.dictionary.kana assert_equal "つれてこられる", @tsuretekuru.potential.dictionary.kana
assert_equal "あれる", @aru.potential.dictionary.kana assert_equal "あれる", @aru.potential.dictionary.kana
end end
def test_excessive
assert_equal "見すぎる", @miru.excessive.dictionary.kanji
assert_equal "飲みすぎる", @nomu.excessive.dictionary.kanji
assert_equal "to drink too much", @nomu.excessive.definition
assert_equal "べんきょうしすぎました", @benkyousuru.excessive.long_form_past_positive.kana
end
def test_volitional
assert_equal "見よう", @miru.volitional.kanji
assert_equal "みよう", @miru.volitional.kana
assert_equal "飲もう", @nomu.volitional.kanji
assert_equal "のもう", @nomu.volitional.kana
assert_equal "しよう", @suru.volitional.kanji
assert_equal "しよう", @suru.volitional.kana
assert_equal "勉強しよう", @benkyousuru.volitional.kanji
assert_equal "べんきょうしよう", @benkyousuru.volitional.kana
assert_equal "来よう", @kuru.volitional.kanji
assert_equal "こよう", @kuru.volitional.kana
assert_equal "連れて来よう", @tsuretekuru.volitional.kanji
assert_equal "つれてこよう", @tsuretekuru.volitional.kana
assert_equal "あろう", @aru.volitional.kana
assert_equal "あおう", @au.volitional.kana
end
def test_ba
assert_equal "見れば", @miru.ba.kanji
assert_equal "飲めば", @nomu.ba.kanji
assert_equal "すれば", @suru.ba.kanji
assert_equal "勉強すれば", @benkyousuru.ba.kanji
assert_equal "来れば", @kuru.ba.kanji
assert_equal "連れて来れば", @tsuretekuru.ba.kanji
assert_equal "あれば", @aru.ba.kanji
assert_equal "会えば", @au.ba.kanji
end
def test_passive
assert_equal "見られる", @miru.passive.dictionary.kanji
assert_equal "飲まれる", @nomu.passive.dictionary.kanji
assert_equal "される", @suru.passive.dictionary.kanji
assert_equal "勉強される", @benkyousuru.passive.dictionary.kanji
assert_equal "来られる", @kuru.passive.dictionary.kanji
assert_equal "こられる", @kuru.passive.dictionary.kana
assert_equal "連れて来られる", @tsuretekuru.passive.dictionary.kanji
assert_equal "つれてこられる", @tsuretekuru.passive.dictionary.kana
assert_equal "あられる", @aru.passive.dictionary.kanji
assert_equal "会われる", @au.passive.dictionary.kanji
end
end end
end end