<commit_before>"""
Clear the local lookup lists
"""
from django.core.management.base import BaseCommand

from opal.models import Synonym
from opal.core.lookuplists import LookupList

class Command(BaseCommand):
    """
    Management command to delete all lookuplists and related
    synonyms.
    """
    def delete(self):
        for model in LookupList.__subclasses__():
            print model
            try:
                for item in model.objects.all():
                    item.delete()
            except: 
                continue
        for item in Synonym.objects.all():
            item.delete()
        
    def handle(self, *args, **kw):
        self.delete()<commit_msg>Remove debugging print statement<commit_after>"""
Clear the local lookup lists
"""
from django.core.management.base import BaseCommand

from opal.models import Synonym
from opal.core.lookuplists import LookupList

class Command(BaseCommand):
    """
    Management command to delete all lookuplists and related
    synonyms.
    """
    def delete(self):
        for model in LookupList.__subclasses__():
            try:
                for item in model.objects.all():
                    item.delete()
            except: 
                continue
        for item in Synonym.objects.all():
            item.delete()
        
    def handle(self, *args, **kw):
        self.delete()
{'fraction_non_alphanumeric': 0.08872727272727272, 'fraction_numerical': 0.0, 'mean_word_length': 2.0308370044052864, 'pattern_counts': {'":': 0, '<': 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': '3828293', 'n_tokens_mistral': 365, 'n_tokens_neox': 355, 'n_words': 110}