montreal_forced_aligner/models.py
def pretty_print(self):
        """
        Pretty print the dictionary's metadata using TerminalPrinter
        """
        from montreal_forced_aligner.dictionary.pronunciation import PronunciationDictionary

        printer = TerminalPrinter()
        configuration_data = {"Dictionary": {"name": (self.name, "green"), "data": self.meta}}
        dictionary = PronunciationDictionary(
            self.path, temporary_directory=self.dirname, phone_set_type=self.phone_set_type
        )
        configuration_data["Dictionary"]["data"]["phones"] = sorted(dictionary.non_silence_phones)
        if self.phone_set_type.has_base_phone_regex:
            configuration_data["Dictionary"]["data"]["base_phones"] = {
                k: sorted(v) for k, v in sorted(dictionary.base_phones.items())
            }
        else:
            configuration_data["Dictionary"]["data"]["base_phones"] = "None"
        if len(dictionary.graphemes) < 50:
            configuration_data["Dictionary"]["data"]["graphemes"] = sorted(dictionary.graphemes)
        else:
            configuration_data["Dictionary"]["data"][
                "graphemes"
            ] = f"{len(dictionary.graphemes)} graphemes"
        printer.print_config(configuration_data)

        Pretty print the dictionary's metadata using TerminalPrinter
        
Pretty print the dictionary's metadata using TerminalPrinter
Pretty print the dictionary ' s metadata using TerminalPrinter
def pretty_print(self):
        from montreal_forced_aligner.dictionary.pronunciation import PronunciationDictionary
        printer = TerminalPrinter()
        configuration_data = {"Dictionary": {"name": (self.name, "green"), "data": self.meta}}
        dictionary = PronunciationDictionary(
            self.path, temporary_directory=self.dirname, phone_set_type=self.phone_set_type
        )
        configuration_data["Dictionary"]["data"]["phones"] = sorted(dictionary.non_silence_phones)
        if self.phone_set_type.has_base_phone_regex:
            configuration_data["Dictionary"]["data"]["base_phones"] = {
                k: sorted(v) for k, v in sorted(dictionary.base_phones.items())
            }
        else:
            configuration_data["Dictionary"]["data"]["base_phones"] = "None"
        if len(dictionary.graphemes) < 50:
            configuration_data["Dictionary"]["data"]["graphemes"] = sorted(dictionary.graphemes)
        else:
            configuration_data["Dictionary"]["data"][
                "graphemes"
            ] = f"{len(dictionary.graphemes)} graphemes"
        printer.print_config(configuration_data)
def pretty_print ( self ) : from montreal_forced_aligner . dictionary . pronunciation import PronunciationDictionary printer = TerminalPrinter ( ) configuration_data = { "Dictionary" : { "name" : ( self . name , "green" ) , "data" : self . meta } } dictionary = PronunciationDictionary ( self . path , temporary_directory = self . dirname , phone_set_type = self . phone_set_type ) configuration_data [ "Dictionary" ] [ "data" ] [ "phones" ] = sorted ( dictionary . non_silence_phones ) if self . phone_set_type . has_base_phone_regex : configuration_data [ "Dictionary" ] [ "data" ] [ "base_phones" ] = { k : sorted ( v ) for k , v in sorted ( dictionary . base_phones . items ( ) ) } else : configuration_data [ "Dictionary" ] [ "data" ] [ "base_phones" ] = "None" if len ( dictionary . graphemes ) < 50 : configuration_data [ "Dictionary" ] [ "data" ] [ "graphemes" ] = sorted ( dictionary . graphemes ) else : configuration_data [ "Dictionary" ] [ "data" ] [ "graphemes" ] = f"{len(dictionary.graphemes)} graphemes" printer . print_config ( configuration_data )
Pretty print the dictionary's metadata using TerminalPrinter
Pretty print the dictionary ' s metadata using TerminalPrinter
"""
        Pretty print the dictionary's metadata using TerminalPrinter
        """
self