<commit_before>from apertium.quality.testing import VocabularyTest
from apertium.quality.frontend import Frontend

class UI(Frontend, VocabularyTest):
    def __init__(self):
        Frontend.__init__(self)
        self.description = "Test vocabulary for generation errors."
        self.add_argument("-d", "--dict", dest="dictdir", nargs='?',
            const=['.'], default=['.'],
            help="Directory of dictionary (Default: current directory)")
        self.add_argument("langpair", nargs=1, help="Language pair (eg, br-fr)")
        self.args = self.parse_args()
        lang1, lang2 = self.args.langpair.split('-')
        VocabularyTest.__init__(self, lang1, lang2, self.args.dictdir[0])
        
def main():
    try:
        ui = UI()
        ui.start()
    except KeyboardInterrupt:
        pass

if __name__ == "__main__":
    main()<commit_msg>Derpo<commit_after>from apertium.quality.testing import VocabularyTest
from apertium.quality.frontend import Frontend

class UI(Frontend, VocabularyTest):
    def __init__(self):
        Frontend.__init__(self)
        self.description = "Test vocabulary for generation errors."
        self.add_argument("-d", "--dict", dest="dictdir", nargs='?',
            const=['.'], default=['.'],
            help="Directory of dictionary (Default: current directory)")
        self.add_argument("langpair", nargs=1, help="Language pair (eg, br-fr)")
        self.args = self.parse_args()
        lang1, lang2 = self.args.langpair[0].split('-')
        VocabularyTest.__init__(self, lang1, lang2, self.args.dictdir[0])
        
def main():
    try:
        ui = UI()
        ui.start()
    except KeyboardInterrupt:
        pass

if __name__ == "__main__":
    main()
{'fraction_non_alphanumeric': 0.14177803602556652, 'fraction_numerical': 0.007553747821034283, 'mean_word_length': 2.9047619047619047, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7580780', 'n_tokens_mistral': 524, 'n_tokens_neox': 521, 'n_words': 119}