Change categorisation (keywords) strategy
Closed this issue · 0 comments
holzkohlengrill commented
Description
This is relatively dangerous (file Emma/emma_libs/categorisation.py
):
def __evalCategoryOfAnElement(nameString, categories, categoriesKeywords, keywordCategorisedElements):
"""
Function to find the category of an element. First the categorisation will be tried with the categories file,
and if that fails with the categoriesKeywords file. If this still fails a default value will be set for the category.
If the element was categorised by a keyword then the element will be added to the keywordCategorisedElements list.
...
"""
Also, the *Keywords.json
files should only be loaded/used when the command line flag is set.
Expected behaviour
Don't use the keywords fallback for a normal analysis an instead print a info or weak warning to std out that a category ist not in the configuration. If the categorisation file is empty skip the print to std out and display a general weak warning that categorisation is not configured.