<commit_before>#!/usr/bin/env python3
from botocore.exceptions import ClientError

TABLE_DEFINITION = {"hash_key": "composite_doi",
                    "range_key": "score",
                    "rec_attribute": "rec_dois"}
REC_TYPES = set(('classic', 'expert'))
DATASETS = ['wos', 'aminer']

class Table(object):
    """
    Wrapping a DynamoDB table for use.

    Arguments:
        connection: A dynamodb resource object, likely created via boto3.resource("dynamodb")
        table_name: The name of the table to operate on.

    """
    def __init__(self, connection, table_name):
        self.table_name = table_name
        self.hash_key = TABLE_DEFINITION["hash_key"]
        self.range_key = TABLE_DEFINITION["range_key"]
        self.rec_attribute = TABLE_DEFINITION["rec_attribute"]
        self.rec_types = REC_TYPES
        self.connection = connection
        self.table = None

    def get_table(self):
        if not self.table:<commit_msg>Add AI2 to Dynamo tablelist<commit_after>#!/usr/bin/env python3
from botocore.exceptions import ClientError

TABLE_DEFINITION = {"hash_key": "composite_doi",
                    "range_key": "score",
                    "rec_attribute": "rec_dois"}
REC_TYPES = set(('classic', 'expert'))
DATASETS = ['wos', 'aminer', 'ai2']

class Table(object):
    """
    Wrapping a DynamoDB table for use.

    Arguments:
        connection: A dynamodb resource object, likely created via boto3.resource("dynamodb")
        table_name: The name of the table to operate on.

    """
    def __init__(self, connection, table_name):
        self.table_name = table_name
        self.hash_key = TABLE_DEFINITION["hash_key"]
        self.range_key = TABLE_DEFINITION["range_key"]
        self.rec_attribute = TABLE_DEFINITION["rec_attribute"]
        self.rec_types = REC_TYPES
        self.connection = connection
        self.table = None

    def get_table(self):
        if not self.table:
{'fraction_non_alphanumeric': 0.10834629341627787, 'fraction_numerical': 0.003110419906687403, 'mean_word_length': 2.9068825910931175, 'pattern_counts': {'":': 6, '<': 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': '6316502', 'n_tokens_mistral': 613, 'n_tokens_neox': 585, 'n_words': 142}