@@ -0,0 +1,981 @@
+# -*- coding: utf-8 -*-%0Afrom __future__ import unicode_literals, print_function%0Afrom collections import defaultdict%0A%0Afrom django.core.management import BaseCommand%0Afrom ielex.lexicon.models import Lexeme, LanguageList, MeaningList%0A%0A%0Aclass Command(BaseCommand):%0A%0A    help = %22Computes statistics for https://github.com/lingdb/CoBL/issues/380%22%0A%0A    def handle(self, *args, **options):%0A        languageList = LanguageList.objects.get(name=LanguageList.DEFAULT)%0A        meaningList = MeaningList.objects.get(name=MeaningList.DEFAULT)%0A        lexemes = Lexeme.objects.filter(%0A            language__in=languageList.languages.all(),%0A            meaning__in=meaningList.meanings.all())%0A        buckets = defaultdict(int)%0A        for lexeme in lexemes.all():%0A            for symbol in lexeme.romanised:%0A                buckets%5Bsymbol%5D += 1%0A        print('Symbol, Unicode, Occurences')%0A        for k, v in buckets.items():%0A            print(%22%25s, %25s, %25s%22 %25 (k, k.encode('unicode_escape'), v))%0A

Add ielex/lexicon/management/commands/stats380.py