<commit_before># -*- coding: UTF-8 -*-
"""Template for <NAME>'s Plectoptera microscope slides
"""

import re
from collections import OrderedDict
from functools import partial

from inselect.lib.metadata import MetadataTemplate
from inselect.lib.parse import parse_matches_re, parse_int_gt0


template = MetadataTemplate(
{
    'Name': 'Price Plectoptera slides',
    'Object label': u'{catalogNumber}_{Location}_{Taxonomy}',
    'Cropped file suffix': u'.jpg',
    'Fields': [
        {
            "Name": "catalogNumber",
            "Label": "Catalog number",
            "URI": "http://rs.tdwg.org/dwc/terms/catalogNumber",
            "Mandatory": True,
            "Parser": partial(parse_matches_re, re.compile('^[0-9]{9}$'),
                        'Invalid value [{0}]: should contain nine digits'),
        },
        {
            "Name": "Location",
            "Mandatory": True,
            "ChoicesWithLabels" : OrderedDict([
                (804508, u'Drawer 1'),
                (804607, u'Drawer 2'),
                (804613, u'Drawer 3'),
                (804529, u'Drawer 4'),
                (804603, u'Drawer 5'),
                (118909, u'Drawer 6'),
                (804579, u'Drawer 7'),
                (804573, u'Drawer 8'),
                (804582, u'Drawer 9'),
                (804569, u'Drawer 10'),
                (804575, u'Drawer 11'),
                (804561, u'Drawer 12'),
                (804567, u'Drawer 13'),
                (804563, u'Drawer 14'),<commit_msg>Correct typo<commit_after># -*- coding: UTF-8 -*-
"""Template for <NAME>'s Plectoptera microscope slides
"""

import re
from collections import OrderedDict
from functools import partial

from inselect.lib.metadata import MetadataTemplate
from inselect.lib.parse import parse_matches_re, parse_int_gt0


template = MetadataTemplate(
{
    'Name': 'Price Plecoptera slides',
    'Object label': u'{catalogNumber}_{Location}_{Taxonomy}',
    'Cropped file suffix': u'.jpg',
    'Fields': [
        {
            "Name": "catalogNumber",
            "Label": "Catalog number",
            "URI": "http://rs.tdwg.org/dwc/terms/catalogNumber",
            "Mandatory": True,
            "Parser": partial(parse_matches_re, re.compile('^[0-9]{9}$'),
                        'Invalid value [{0}]: should contain nine digits'),
        },
        {
            "Name": "Location",
            "Mandatory": True,
            "ChoicesWithLabels" : OrderedDict([
                (804508, u'Drawer 1'),
                (804607, u'Drawer 2'),
                (804613, u'Drawer 3'),
                (804529, u'Drawer 4'),
                (804603, u'Drawer 5'),
                (118909, u'Drawer 6'),
                (804579, u'Drawer 7'),
                (804573, u'Drawer 8'),
                (804582, u'Drawer 9'),
                (804569, u'Drawer 10'),
                (804575, u'Drawer 11'),
                (804561, u'Drawer 12'),
                (804567, u'Drawer 13'),
                (804563, u'Drawer 14'),
{'fraction_non_alphanumeric': 0.14513981358189082, 'fraction_numerical': 0.07256990679094541, 'mean_word_length': 1.8564638783269962, 'pattern_counts': {'":': 14, '<': 5, '<?xml version=': 0, '>': 5, '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': '2112488', 'n_tokens_mistral': 1077, 'n_tokens_neox': 900, 'n_words': 218}