- self.normalization_rules = get_property(conn, DBCFG_IMPORT_NORM_RULES)
- self.transliteration_rules = get_property(conn, DBCFG_IMPORT_TRANS_RULES)
- self.analysis_rules = json.loads(get_property(conn, DBCFG_IMPORT_ANALYSIS_RULES))
+ rules = get_property(conn, DBCFG_IMPORT_NORM_RULES)
+ if rules is not None:
+ self.normalization_rules = rules
+
+ rules = get_property(conn, DBCFG_IMPORT_TRANS_RULES)
+ if rules is not None:
+ self.transliteration_rules = rules
+
+ rules = get_property(conn, DBCFG_IMPORT_ANALYSIS_RULES)
+ if rules:
+ self.analysis_rules = json.loads(rules)
+ else:
+ self.analysis_rules = []