Example #1
0
def test_match():
    # (n)eun
    assert Eun.match(u'은') == u''
    assert Eun.match(u'는') == u''
    assert Eun.match(u'은(는)') == u''
    assert Eun.match(u'는(은)') == u''
    assert Eun.match(u'(은)는') == u''
    assert Eun.match(u'(는)은') == u''
    assert Eun.match(u'는는') == u'는'
    # (r)eul (final=True)
    assert Eul.match(u'를') == u''
    assert Eul.match(u'을을') is None
    # (g)wa
    assert Gwa.match(u'과') == u''
    assert Gwa.match(u'과는') == u'는'
    assert Gwa.match(u'관') == u'ㄴ'
    # (eu)ro
    assert Euro.match(u'으로도') == u'도'
    assert Euro.match(u'론') == u'ㄴ'
Example #2
0
def test_match():
    # (n)eun
    assert Eun.match(u'은') == u''
    assert Eun.match(u'는') == u''
    assert Eun.match(u'은(는)') == u''
    assert Eun.match(u'는(은)') == u''
    assert Eun.match(u'(은)는') == u''
    assert Eun.match(u'(는)은') == u''
    assert Eun.match(u'는는') == u'는'
    # (r)eul (final=True)
    assert Eul.match(u'를') == u''
    assert Eul.match(u'을을') is None
    # (g)wa
    assert Gwa.match(u'과') == u''
    assert Gwa.match(u'과는') == u'는'
    assert Gwa.match(u'관') == u'ㄴ'
    # (eu)ro
    assert Euro.match(u'으로도') == u'도'
    assert Euro.match(u'론') == u'ㄴ'
Example #3
0
def test_custom_guess_coda():
    def dont_guess_coda(word):
        return None

    assert Euro.allomorph(u'밖', u'으로', guess_coda=dont_guess_coda) == u'(으)로'
Example #4
0
def test_custom_guess_coda():
    def dont_guess_coda(word):
        return None
    assert Euro.allomorph(u'밖', u'으로',
                          guess_coda=dont_guess_coda) == u'(으)로'