<commit_before>from sqlalchemy.exc import IntegrityError
from corehq.apps.userreports.adapter import IndicatorAdapter
from corehq.apps.userreports.es.adapter import IndicatorESAdapter
from corehq.apps.userreports.sql.adapter import IndicatorSqlAdapter


class IndicatorLaboratoryAdapter(IndicatorAdapter):

    def __init__(self, config):
        super(IndicatorLaboratoryAdapter, self).__init__(config)
        self.es_adapter = IndicatorESAdapter(config)
        self.sql_adapter = IndicatorSqlAdapter(config)

    def rebuild_table(self):
        self.es_adapter.rebuild_table()
        self.sql_adapter.rebuild_table()

    def build_table(self):
        self.es_adapter.build_table()
        self.sql_adapter.build_table()

    def after_table_build(self):
        self.es_adapter.after_table_build()
        self.sql_adapter.after_table_build()<commit_msg>dimagimon<commit_after>from corehq.apps.userreports.adapter import IndicatorAdapter
from corehq.apps.userreports.es.adapter import IndicatorESAdapter
from corehq.apps.userreports.sql.adapter import IndicatorSqlAdapter


class IndicatorLaboratoryAdapter(IndicatorAdapter):

    def __init__(self, config):
        super(IndicatorLaboratoryAdapter, self).__init__(config)
        self.es_adapter = IndicatorESAdapter(config)
        self.sql_adapter = IndicatorSqlAdapter(config)

    def rebuild_table(self):
        self.es_adapter.rebuild_table()
        self.sql_adapter.rebuild_table()

    def build_table(self):
        self.es_adapter.build_table()
        self.sql_adapter.build_table()

    def after_table_build(self):
        self.es_adapter.after_table_build()
        self.sql_adapter.after_table_build()
{'fraction_non_alphanumeric': 0.08164481525625746, 'fraction_numerical': 0.0, 'mean_word_length': 4.279874213836478, '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': '2485022', 'n_tokens_mistral': 510, 'n_tokens_neox': 489, 'n_words': 73}