Function getRulesPatternsFromRuleFile(const std::string&, const DataSetFid&, bool)
Defined in File rule.cpp
Function Documentation
-
std::vector<bool> getRulesPatternsFromRuleFile(const std::string &rulesFile, const DataSetFid &dataset, bool withClasses = true)
Checks if a rules file contains rules with attribute names or attribute IDs and with class names or class IDs. A rule needs to start with “Rule”.
- Parameters:
rulesFile – The rules file to check.
dataset – The dataset containing information about the attributes and classes.
withClasses – Whether to check for class patterns as well.
- Throws:
FileNotFoundError – If the rules file cannot be opened.
FileContentError – If the rules in the file are not properly formatted.
- Returns:
Both booleans tell if there are attribute ids or names and class ids or names.