stability_label_algorithm/modules/argumentation/importers/argumentation_system_xlsx_reader.py
def _get_rules(self):
        """
        Get all rules (R) from the argumentation system.

        :return: Rule list
        """
        self.rules = []
        for index, row in self._rule_df.iterrows():
            ants_str = [ant.strip() for ant in row['Antecedents'].split(',')]
            cons_str = row['Consequent'].strip()
            if any([ant not in self.language for ant in ants_str]) or cons_str not in self.language:
                raise KeyError(
                    'Not each literal in ' + str(ants_str) + ' or ' + cons_str + ' was in logical language.')
            ants = {self.language[literal_str] for literal_str in ants_str}
            cons = self.language[cons_str]
            exp = row['NL(Rule)']

            if 'ID' in self._rule_df.keys():
                rule_id = row['ID']
            else:
                rule_id = index

            self.rules.append(Rule(rule_id, ants, cons, exp))

        Get all rules (R) from the argumentation system.

        :return: Rule list
        
Get all rules (R) from the argumentation system.
Get all rules ( R ) from the argumentation system .
def _get_rules(self):
        self.rules = []
        for index, row in self._rule_df.iterrows():
            ants_str = [ant.strip() for ant in row['Antecedents'].split(',')]
            cons_str = row['Consequent'].strip()
            if any([ant not in self.language for ant in ants_str]) or cons_str not in self.language:
                raise KeyError(
                    'Not each literal in ' + str(ants_str) + ' or ' + cons_str + ' was in logical language.')
            ants = {self.language[literal_str] for literal_str in ants_str}
            cons = self.language[cons_str]
            exp = row['NL(Rule)']
            if 'ID' in self._rule_df.keys():
                rule_id = row['ID']
            else:
                rule_id = index
            self.rules.append(Rule(rule_id, ants, cons, exp))
def _get_rules ( self ) : self . rules = [ ] for index , row in self . _rule_df . iterrows ( ) : ants_str = [ ant . strip ( ) for ant in row [ 'Antecedents' ] . split ( ',' ) ] cons_str = row [ 'Consequent' ] . strip ( ) if any ( [ ant not in self . language for ant in ants_str ] ) or cons_str not in self . language : raise KeyError ( 'Not each literal in ' + str ( ants_str ) + ' or ' + cons_str + ' was in logical language.' ) ants = { self . language [ literal_str ] for literal_str in ants_str } cons = self . language [ cons_str ] exp = row [ 'NL(Rule)' ] if 'ID' in self . _rule_df . keys ( ) : rule_id = row [ 'ID' ] else : rule_id = index self . rules . append ( Rule ( rule_id , ants , cons , exp ) )
Get all rules (R) from the argumentation system.
Get all rules ( R ) from the argumentation system .
"""
        Get all rules (R) from the argumentation system.

        :return: Rule list
        """
None
self