Exemple #1
0
 def testPluralDative(self):
     declensions = decline(self.noun)
     exVal = "\u0d24\u0d31\u0d15\u0d7e\u0d15\u0d4d\u0d15\u0d4d"  # /t̪arakaɭkːə/
     self.assertEqual(
         declensions["Plural"]["Dative"], exVal,
         "Expected {0} as the dative plural of {1}, but received {2}".
         format(exVal, self.noun, declensions["Plural"]["Dative"]))
Exemple #2
0
 def testPluralGenitive(self):
     declensions = decline(self.noun)
     exVal = "\u0d05\u0d24\u0d40\u0d24\u0d19\u0d4d\u0d19\u0d33\u0d41\u0d1f\u0d46"  # /at̪iːt̪aŋːaɭuʈe/
     self.assertEqual(
         declensions["Plural"]["Genitive"], exVal,
         "Expected {0} as genitive plural, but received {1}".format(
             exVal, declensions["Plural"]["Genitive"]))
Exemple #3
0
 def testPluralLocative(self):
     declensions = decline(self.noun)
     exVal = "\u0d05\u0d24\u0d40\u0d24\u0d19\u0d4d\u0d19\u0d33\u0d3f\u0d7d"  # /at̪iːt̪aŋːaɭil/
     self.assertEqual(
         declensions["Plural"]["Locative"], exVal,
         "Expected {0} as locative plural, but received {1}".format(
             exVal, declensions["Plural"]["Locative"]))
Exemple #4
0
 def testPluralGenitive(self):
     declensions = decline(self.noun)
     eVal = "\u0d15\u0d24\u0d15\u0d4d\u0d15\u0d33\u0d41\u0d1f\u0d46"  # /kat̪akəkaɭuʈe/
     self.assertEqual(
         declensions["Plural"]["Genitive"], eVal,
         "Expected {0} as the plural genitive of {1}, but received {2}".
         format(eVal, self.noun, declensions["Plural"]["Genitive"]))
Exemple #5
0
 def testPluralSociative(self):
     declensions = decline(self.noun)
     eVal = "\u0d15\u0d24\u0d15\u0d4d\u0d15\u0d33\u0d4b\u0d1f\u0d4d"  # /kat̪akəkaɭoːʈə/
     self.assertEqual(
         declensions["Plural"]["Sociative"], eVal,
         f"Expected {eVal} as the locative plural of {self.noun}, but received {declensions['Plural']['Sociative']}"
     )
Exemple #6
0
 def testSingularLocative(self):
     declensions = decline(self.noun)
     eVal = "\u0d15\u0d24\u0d15\u0d3f\u0d7d"  # /kat̪akil/
     self.assertEqual(
         declensions["Singular"]["Locative"], eVal,
         "Expected {0} as the singular locative of {1}, but received {2}".
         format(eVal, self.noun, declensions["Singular"]["Locative"]))
Exemple #7
0
 def testSingularInstrumental(self):
     declensions = decline(self.noun)
     eVal = "\u0d15\u0d24\u0d15\u0d3f\u0d28\u0d3e\u0d7d"  # /kat̪akinaːl/
     self.assertEqual(
         declensions["Singular"]["Instrumental"], eVal,
         "Expected {0} as the singular instrumental of {1}, but received {2}"
         .format(eVal, self.noun, declensions["Singular"]["Instrumental"]))
Exemple #8
0
 def testSingularLocative(self):
     declensions = decline(self.noun)
     eVal = "\u0d2a\u0d4a\u0d30\u0d41\u0d33\u0d3f\u0d7d"  # /poɾuɭil/
     self.assertEqual(
         declensions["Singular"]["Locative"], eVal,
         "Expected {0} as the locative singular of {1}, but received {2}".
         format(eVal, self.noun, declensions["Singular"]["Locative"]))
Exemple #9
0
 def testSingularSociative(self):
     declensions = decline(self.noun)
     eVal = "\u0d2a\u0d4a\u0d30\u0d41\u0d33\u0d4b\u0d1f\u0d4d"  # /poɾuɭoːʈə/
     self.assertEqual(
         declensions["Singular"]["Sociative"], eVal,
         "Expected {0} as the sociative singular of {1}, but received {2}".
         format(eVal, self.noun, declensions["Singular"]["Sociative"]))
Exemple #10
0
 def testSingularSociative(self):
     declensions = decline(self.noun)
     expectedVal = "\u0d05\u0d24\u0d40\u0d24\u0d24\u0d4d\u0d24\u0d3f\u0d28\u0d4b\u0d1f\u0d4d"  # atiitattinooDuh
     self.assertEqual(
         declensions["Singular"]["Sociative"], expectedVal,
         "The generated sociative singular should be {0}, but {1} was returned."
         .format(expectedVal, declensions["Singular"]["Sociative"]))
Exemple #11
0
 def testSingularDative(self):
     declensions = decline(self.noun)
     eVal = "\u0d2a\u0d4a\u0d30\u0d41\u0d7e\u0d15\u0d4d\u0d15\u0d4d"  # /poɾuɭkːə/
     self.assertEqual(
         declensions["Singular"]["Dative"], eVal,
         "Expected {0} as the dative singular of {1}, but received {2}".
         format(eVal, self.noun, declensions["Singular"]["Dative"]))
Exemple #12
0
 def testSingularNominative(self):
     declensions = decline(self.noun)
     eVal = "\u0d2a\u0d4a\u0d30\u0d41\u0d7e"  # Should be unchanged
     self.assertEqual(
         declensions["Singular"]["Nominative"], eVal,
         "Expected {0} as the nominative singular of {1}, but received {2}".
         format(eVal, self.noun, declensions["Singular"]["Nominative"]))
Exemple #13
0
 def testPluralInstrumental(self):
     declensions = decline(self.noun)
     exVal = "\u0d24\u0d31\u0d15\u0d33\u0d3e\u0d7d"  # /t̪arakaɭaːl/
     self.assertEqual(
         declensions["Plural"]["Instrumental"], exVal,
         "Expected {0} as the instrumental plural of {1}, but received {2}".
         format(exVal, self.noun, declensions["Plural"]["Instrumental"]))
Exemple #14
0
 def testPluralSociative(self):
     declensions = decline(self.noun)
     exVal = "\u0d24\u0d31\u0d15\u0d33\u0d4b\u0d1f\u0d4d"  # /t̪arakaɭoːʈə/
     self.assertEqual(
         declensions["Plural"]["Sociative"], exVal,
         "Expected {0} as the sociative plural of {1}, but received {2}".
         format(exVal, self.noun, declensions["Plural"]["Sociative"]))
Exemple #15
0
 def testSingularAccusative(self):
     declensions = decline(self.noun)
     eVal = "\u0d15\u0d24\u0d15\u0d3f\u0d28\u0d46"  # /katakin̪e/
     self.assertEqual(
         declensions["Singular"]["Accusative"], eVal,
         "Expected {0} as the accusative singular of {1}, but received {2}".
         format(eVal, self.noun, declensions["Singular"]["Accusative"]))
Exemple #16
0
 def testSingularInstrumental(self):
     declensions = decline(self.noun)
     eVal = "\u0d2a\u0d4a\u0d30\u0d41\u0d33\u0d3e\u0d7d"  # /poɾuɭaːl/
     self.assertEqual(
         declensions["Singular"]["Instrumental"], eVal,
         "Expected {0} as the instrumental singular of {1}, but received {2}"
         .format(eVal, self.noun, declensions["Singular"]["Instrumental"]))
Exemple #17
0
 def testSingularGenitive(self):
     declensions = decline(self.noun)
     eVal = "\u0d15\u0d24\u0d15\u0d3f\u0d28\u0d4d\u0d31\u0d4d\u0d31\u0d46"  # /katakinte/
     self.assertEqual(
         declensions["Singular"]["Genitive"], eVal,
         "Expected {0} as the singular genitive of {1}, but received {2}".
         format(eVal, self.noun, declensions["Singular"]["Genitive"]))
Exemple #18
0
 def testPluralGenitive(self):
     declensions = decline(self.noun)
     eVal = "\u0d2a\u0d4a\u0d30\u0d41\u0d7e\u0d15\u0d33\u0d41\u0d1f\u0d46"  # /poɾuɭkaɭuʈe/
     self.assertEqual(
         declensions["Plural"]["Genitive"], eVal,
         "Expected {0} as the genitive plural of {1}, but received {2}".
         format(eVal, self.noun, declensions["Plural"]["Genitive"]))
Exemple #19
0
 def testSingularSociative(self):
     declensions = decline(self.noun)
     eVal = "\u0d15\u0d24\u0d15\u0d3f\u0d28\u0d4b\u0d1f\u0d4d"  # /kat̪akinoːʈə/
     self.assertEqual(
         declensions["Singular"]["Sociative"], eVal,
         "Expected {0} as the singular sociative of {1}, but received {2}".
         format(eVal, self.noun, declensions["Singular"]["Sociative"]))
Exemple #20
0
 def testPluralDative(self):
     declensions = decline(self.noun)
     eVal = "\u0d2a\u0d4a\u0d30\u0d41\u0d7e\u0d15\u0d7e\u0d15\u0d4d\u0d15\u0d4d"  # /poɾuɭkaɭkːə/
     self.assertEqual(
         declensions["Plural"]["Dative"], eVal,
         "Expected {0} as the dative plural of {1} but received {2}".format(
             eVal, self.noun, declensions["Plural"]["Dative"]))
Exemple #21
0
 def testPluralNominative(self):
     declensions = decline(self.noun)
     eVal = "\u0d15\u0d24\u0d15\u0d4d\u0d15\u0d7e"  # /kat̪akəkaɭ/
     self.assertEqual(
         declensions["Plural"]["Nominative"], eVal,
         "Expected {0} as the plural nominative of {1}, but received {2}".
         format(eVal, self.noun, declensions["Plural"]["Nominative"]))
Exemple #22
0
 def testSingularInstrumental(self):
     declensions = decline(self.noun)
     expectedVal = "\u0d05\u0d24\u0d40\u0d24\u0d24\u0d4d\u0d24\u0d3f\u0d28\u0d3e\u0d7d"  # atiitattinaal
     self.assertEqual(
         declensions["Singular"]["Instrumental"], expectedVal,
         "The generated instrumental singular should be {0}, but {1} was returned."
         .format(expectedVal, declensions["Singular"]["Instrumental"]))
Exemple #23
0
 def testPluralLocative(self):
     declensions = decline(self.noun)
     eVal = "\u0d15\u0d24\u0d15\u0d4d\u0d15\u0d33\u0d3f\u0d7d"  # /kat̪akəkaɭil/
     self.assertEqual(
         declensions["Plural"]["Locative"], eVal,
         "Expected {0} as the locative plural of {1}, but received {2}".
         format(eVal, self.noun, declensions["Plural"]["Locative"]))
Exemple #24
0
 def testPluralSociative(self):
     declensions = decline(self.noun)
     eVal = "\u0d2a\u0d4a\u0d30\u0d41\u0d7e\u0d15\u0d33\u0d4b\u0d1f\u0d4d"  # /poɾuɭkaɭoːʈə/
     self.assertEqual(
         declensions["Plural"]["Sociative"], eVal,
         "Expected {0} as the plural sociative of {1}, but received {2}".
         format(eVal, self.noun, declensions["Plural"]["Sociative"]))
Exemple #25
0
 def testPluralInstrumental(self):
     declensions = decline(self.noun)
     eVal = "\u0d15\u0d24\u0d15\u0d4d\u0d15\u0d33\u0d3e\u0d7d"  # /kat̪akəkaɭaːl/
     self.assertEqual(
         declensions["Plural"]["Instrumental"], eVal,
         f"Expected {eVal} as the instrumental plural of {self.noun}, but received {declensions['Plural']['Instrumental']} instead."
     )
Exemple #26
0
 def testPluralInstrumental(self):
     declensions = decline(self.noun)
     eVal = "\u0d2a\u0d4a\u0d30\u0d41\u0d7e\u0d15\u0d33\u0d3e\u0d7d"  # /poɾuɭkaɭaːl/
     self.assertEqual(
         declensions["Plural"]["Instrumental"], eVal,
         "Expected {0} as the instrumental plural of {1}, but received {2}".
         format(eVal, self.noun, declensions["Plural"]["Sociative"]))
Exemple #27
0
 def testPluralDative(self):
     declensions = decline(self.noun)
     expectedVal = "\u0d05\u0d24\u0d40\u0d24\u0d19\u0d4d\u0d19\u0d7e\u0d15\u0d4d\u0d15\u0d4d"  # /at̪iːt̪aŋːaɭkːə/
     self.assertEqual(
         declensions["Plural"]["Dative"], expectedVal,
         "Expected {0} as dative plural, but received {1}".format(
             expectedVal, declensions["Plural"]["Dative"]))
Exemple #28
0
 def testSingularNominative(self):
     declensions = decline(self.noun)
     eVal = "\u0d15\u0d24\u0d15\u0d4d"  # /kat̪akə/ (unchanged)
     self.assertEqual(
         declensions["Singular"]["Nominative"], eVal,
         "Expected {0} as the nominative singular of {1}, but received {2}".
         format(eVal, self.noun, declensions["Singular"]["Nominative"]))
Exemple #29
0
def showDeclension(req=None, noun=""):
    template = loader.get_template("declension/noun.html")
    ctx = {
        "noun": noun,  # Pass the noun which was sent in
        "declensions": decline(noun)  # Pass the noun's declined forms
    }
    return HttpResponse(template.render(ctx, req))
Exemple #30
0
 def testPluralAccusative(self):
     declensions = decline(self.noun)
     exVal = "\u0d24\u0d31\u0d15\u0d33\u0d46"  # /t̪arakaɭe/
     self.assertEqual(
         declensions["Plural"]["Accusative"], exVal,
         "Expected {0} as the accusative plural of {1}, but received {2}".
         format(exVal, self.noun, declensions["Plural"]["Accusative"]))