Replaced JOS XML specifications with preprocessed pickle

This commit is contained in:
2021-09-30 00:22:43 +02:00
parent eca02ebdd3
commit a088025026
9 changed files with 38 additions and 37878 deletions

View File

@@ -6,10 +6,7 @@ from conversion_utils.jos_msds_and_properties import SpecificationsParser, Conve
class JosMsdToPropertiesTestCase(unittest.TestCase):
def setUp(self):
specifications_file_name = os.path.join(os.path.dirname(__file__), '../resources/msd-sl.spc.xml')
parser = SpecificationsParser()
specifications = parser.parse(specifications_file_name)
self.converter = Converter(specifications)
self.converter = Converter()
def test_en_en(self):
properties = self.converter.msd_to_properties(Msd('Ncfpd', 'en'), 'en')

View File

@@ -6,10 +6,7 @@ from conversion_utils.jos_msds_and_properties import SpecificationsParser, Conve
class JosPropertiesToMsdTestCase(unittest.TestCase):
def setUp(self):
specifications_file_name = os.path.join(os.path.dirname(__file__), '../resources/msd-sl.spc.xml')
parser = SpecificationsParser()
specifications = parser.parse(specifications_file_name)
self.converter = Converter(specifications)
self.converter = Converter()
def test_en_en(self):
msd = self.converter.properties_to_msd(Properties('noun', {'type':'common', 'gender':'feminine'}, {'number':'dual', 'case':'nominative'}, 'en'), 'en')