hrishikeshrt / PyCDSL

Python Interface to Cologne Digital Sanskrit Lexicon (CDSL)
https://pypi.org/project/PyCDSL/
Other
12 stars 1 forks source link

Allow providing model_map to CDSLCorpus instance #22

Closed hrishikeshrt closed 2 years ago

hrishikeshrt commented 2 years ago

Problem

Feature Description

Reasons

It makes sense from the end-user perspective to never really need to instantiate CDSLDict by hand, and let CDSLCorpus do it, and to that end, it makes sense that arguments required for CDSLDict are specified through the corpus class.

model_map is basically a map of lexicon and entry models per dictionary. Semantically, one dictionary does not need to be aware of the maps for other dictionaries. The map makes more sense on the corpus-management level.

hrishikeshrt commented 2 years ago

There is however an argument for keeping the model map in CDSLDict because it also serves the purpose of inferring models. This might be useful in future to ship custom models as part of the package.

Addition of the argument on CDSLCorpus level definitely makes sense though.