<commit_before>from __future__ import with_statement

######################################################################
#  CliNER - note.py                                                  #
#                                                                    #
#  <NAME>                                      <EMAIL> #
#                                                                    #
#  Purpose: Internal representation of data for CliNER.              #
######################################################################


__author__ = '<NAME>'
__date__   = 'Nov. 6, 2014'



import re
import string
from copy import copy
import nltk.data
import os.path


from utilities_for_notes import lineno_and_tokspan


# Master Class
class Note:

    # Memoize results from static method calls
    supported_formats = []
    dict_of_format_to_extensions = []

    # Constructor
    def __init__(self, format):

        # Error-check input
        if format not in Note.supportedFormats():
            raise Exception('Cannot create Note object for format %s' % format)

        # Instantiate the given format derived class
        cmd = 'from note_%s import Note_%s as DerivedNote' % (format,format)
        exec(cmd)
        self.derived_note = DerivedNote()

        # Helpful for debugging
        self.format = format

        # Memoizations of selectors<commit_msg>removed unused imports<commit_after>from __future__ import with_statement

######################################################################
#  CliNER - note.py                                                  #
#                                                                    #
#  <NAME>                                      <EMAIL> #
#                                                                    #
#  Purpose: Internal representation of data for CliNER.              #
######################################################################


__author__ = '<NAME>'
__date__   = 'Nov. 6, 2014'



import re
import os.path

from utilities_for_notes import lineno_and_tokspan

# Master Class
class Note:

    # Memoize results from static method calls
    supported_formats = []
    dict_of_format_to_extensions = []

    # Constructor
    def __init__(self, format):

        # Error-check input
        if format not in Note.supportedFormats():
            raise Exception('Cannot create Note object for format %s' % format)

        # Instantiate the given format derived class
        cmd = 'from note_%s import Note_%s as DerivedNote' % (format,format)
        exec(cmd)
        self.derived_note = DerivedNote()

        # Helpful for debugging
        self.format = format

        # Memoizations of selectors
{'fraction_non_alphanumeric': 0.1614929785661493, 'fraction_numerical': 0.003695491500369549, 'mean_word_length': 1.7735655737704918, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2183576', 'n_tokens_mistral': 650, 'n_tokens_neox': 590, 'n_words': 181}