Parses dictionary with according rules

def __parse_dict(self):
        ''' Parses dictionary with according rules '''
        i = 0
        lines = self.lines

        for line in lines:
            line = line.split('/')
            word = line[0]
            flags = line[1] if len(line) > 1 else None

            # Base Word
            self.num_words += 1

            if flags != None:
                # Derivatives possible
                for flag in flags:
                    # Compound?
                    if flag in self.aff.compound_flags or flag == self.aff.only_in_compound_flag:
                        for rule in self.aff.compound_rules:
                            rule.add_flag_values(word, flag)
                    else:
                        # No Suggest flags
                        if self.aff.no_suggest_flag == flag:
                            pass
                        else:
                            affix_rule_entries = self.aff.affix_rules[flag]
                            # Get flag that meets condition
                            for i in range(len(affix_rule_entries)):
                                rule = affix_rule_entries[i]

                                if rule.meets_condition(word):
                                    # Add word to list if does not already exist
                                    if word not in self.words:
                                        self.words[word] = []

                                    # Derivatives
                                    self.num_words += 1

                                    if self.format == "addsub":
                                        add_sub = rule.generate_add_sub()

                                        # Add to list of keys
                                        if add_sub not in self.keys:
                                            self.keys.append(add_sub)

                                        # Check if key is to be generated
                                        if self.key:
                                            self.words[word].append(str(self.keys.index(add_sub)))
                                        else:
                                            # Generate addsub next to base word
                                            self.words[word].append(rule.generate_add_sub())
                                    else:
                                        # Default, insert complete derivative word
                                        self.words[word].append(rule.create_derivative(word))
            else:
                # No derivatives.
                self.words[word] = []

        # Create regular expression from compounds
        for rule in self.aff.compound_rules:
            # Add to list
            self.regex_compounds.append(rule.get_regex())