stability_label_algorithm/modules/argumentation/importers/argumentation_system_xlsx_reader.py
def _get_language(self):
        """
        Get the logical language from the argumentation system. A literal l is in the
        logical language if and only if its negation is in the logical language as well.

        :return: Dict (indexed on name string) of literals in the logical language
        """
        self.language = dict()
        self.topic_literals = []

        for index, row in self._literal_df.iterrows():
            if row['Observable'] == 'y':
                query = self._query_df.loc[row['Literal'], 'NL(Query)']
                query_explanation = self._query_df.loc[row['Literal'], 'EXP(Query)']
                if 'Priority' in self._query_df.keys():
                    priority = self._query_df.loc[row['Literal'], 'Priority']
                else:
                    priority = 0
                literal = Queryable(row['Literal'], row['NL(True)'], row['NL(Unknown)'],
                                    query, query_explanation, priority)
                literal_neg = Queryable('~' + row['Literal'], row['NL(False)'], row['NL(Unknown)'],
                                        query, query_explanation, priority)
            else:
                literal = Literal(row['Literal'], row['NL(True)'], row['NL(Unknown)'], False)
                literal_neg = Literal('~' + row['Literal'], row['NL(False)'], row['NL(Unknown)'], False)

            if 'Topic' in row and row['Topic'] == 'y':
                self.topic_literals.append(literal)

            literal.contraries.append(literal_neg)
            literal_neg.contraries.append(literal)
            literal.negation = literal_neg
            literal_neg.negation = literal
            self.language[str(literal)] = literal
            self.language[str(literal_neg)] = literal_neg

        # Add additional contraries
        if self._contrary_df is not None:
            for index, row in self._contrary_df.iterrows():
                literal_str = row['Literal']
                contraries_str = row['Contraries'].split(',')
                for contrary_str in contraries_str:
                    self.language[literal_str].contraries.append(self.language[contrary_str])

        # Add positions if given
        if self._position_df is not None:
            for index, row in self._position_df.iterrows():
                literal_str = row['Literal']
                x_pos = row['X']
                y_pos = row['Y']
                self.language[literal_str].position = (x_pos, y_pos)

        Get the logical language from the argumentation system. A literal l is in the
        logical language if and only if its negation is in the logical language as well.

        :return: Dict (indexed on name string) of literals in the logical language
        
Get the logical language from the argumentation system. A literal l is in the
logical language if and only if its negation is in the logical language as well.
Get the logical language from the argumentation system . A literal l is in the logical language if and only if its negation is in the logical language as well .
def _get_language(self):
        self.language = dict()
        self.topic_literals = []
        for index, row in self._literal_df.iterrows():
            if row['Observable'] == 'y':
                query = self._query_df.loc[row['Literal'], 'NL(Query)']
                query_explanation = self._query_df.loc[row['Literal'], 'EXP(Query)']
                if 'Priority' in self._query_df.keys():
                    priority = self._query_df.loc[row['Literal'], 'Priority']
                else:
                    priority = 0
                literal = Queryable(row['Literal'], row['NL(True)'], row['NL(Unknown)'],
                                    query, query_explanation, priority)
                literal_neg = Queryable('~' + row['Literal'], row['NL(False)'], row['NL(Unknown)'],
                                        query, query_explanation, priority)
            else:
                literal = Literal(row['Literal'], row['NL(True)'], row['NL(Unknown)'], False)
                literal_neg = Literal('~' + row['Literal'], row['NL(False)'], row['NL(Unknown)'], False)
            if 'Topic' in row and row['Topic'] == 'y':
                self.topic_literals.append(literal)
            literal.contraries.append(literal_neg)
            literal_neg.contraries.append(literal)
            literal.negation = literal_neg
            literal_neg.negation = literal
            self.language[str(literal)] = literal
            self.language[str(literal_neg)] = literal_neg
        if self._contrary_df is not None:
            for index, row in self._contrary_df.iterrows():
                literal_str = row['Literal']
                contraries_str = row['Contraries'].split(',')
                for contrary_str in contraries_str:
                    self.language[literal_str].contraries.append(self.language[contrary_str])
        if self._position_df is not None:
            for index, row in self._position_df.iterrows():
                literal_str = row['Literal']
                x_pos = row['X']
                y_pos = row['Y']
                self.language[literal_str].position = (x_pos, y_pos)
def _get_language ( self ) : self . language = dict ( ) self . topic_literals = [ ] for index , row in self . _literal_df . iterrows ( ) : if row [ 'Observable' ] == 'y' : query = self . _query_df . loc [ row [ 'Literal' ] , 'NL(Query)' ] query_explanation = self . _query_df . loc [ row [ 'Literal' ] , 'EXP(Query)' ] if 'Priority' in self . _query_df . keys ( ) : priority = self . _query_df . loc [ row [ 'Literal' ] , 'Priority' ] else : priority = 0 literal = Queryable ( row [ 'Literal' ] , row [ 'NL(True)' ] , row [ 'NL(Unknown)' ] , query , query_explanation , priority ) literal_neg = Queryable ( '~' + row [ 'Literal' ] , row [ 'NL(False)' ] , row [ 'NL(Unknown)' ] , query , query_explanation , priority ) else : literal = Literal ( row [ 'Literal' ] , row [ 'NL(True)' ] , row [ 'NL(Unknown)' ] , False ) literal_neg = Literal ( '~' + row [ 'Literal' ] , row [ 'NL(False)' ] , row [ 'NL(Unknown)' ] , False ) if 'Topic' in row and row [ 'Topic' ] == 'y' : self . topic_literals . append ( literal ) literal . contraries . append ( literal_neg ) literal_neg . contraries . append ( literal ) literal . negation = literal_neg literal_neg . negation = literal self . language [ str ( literal ) ] = literal self . language [ str ( literal_neg ) ] = literal_neg if self . _contrary_df is not None : for index , row in self . _contrary_df . iterrows ( ) : literal_str = row [ 'Literal' ] contraries_str = row [ 'Contraries' ] . split ( ',' ) for contrary_str in contraries_str : self . language [ literal_str ] . contraries . append ( self . language [ contrary_str ] ) if self . _position_df is not None : for index , row in self . _position_df . iterrows ( ) : literal_str = row [ 'Literal' ] x_pos = row [ 'X' ] y_pos = row [ 'Y' ] self . language [ literal_str ] . position = ( x_pos , y_pos )
Get the logical language from the argumentation system.
Get the logical language from the argumentation system .
"""
        Get the logical language from the argumentation system. A literal l is in the
        logical language if and only if its negation is in the logical language as well.

        :return: Dict (indexed on name string) of literals in the logical language
        """ # Add additional contraries # Add positions if given
Dict (indexed on name string) of literals in the logical language
Dict ( indexed on name string ) of literals in the logical language
self