<commit_before>from parser import line, error, field_validator as fv
import re

class Gap (line.Line):

    def __init__ (self):
        super().__init__ ('E')
    
    REQUIRED_FIELDS = { \
    'gid' : 'oid', \
    'sid1' : 'ref', \
    'sid2' : 'ref', \
    'displacement' : 'pos2', \
    'variance' : 'oint' \
    }

    @classmethod
    def from_string (cls, string):
        """Extract the Gap fields from the string.
        The string can contain the G character at the begin or can only contains the fields<commit_msg>Minor change to gap line type<commit_after>from parser import line, error, field_validator as fv
import re

class Gap (line.Line):

    def __init__ (self):
        super().__init__ ('G')
    
    REQUIRED_FIELDS = { \
    'gid' : 'oid', \
    'sid1' : 'ref', \
    'sid2' : 'ref', \
    'displacement' : 'pos2', \
    'variance' : 'oint' \
    }

    @classmethod
    def from_string (cls, string):
        """Extract the Gap fields from the string.
        The string can contain the G character at the begin or can only contains the fields
{'fraction_non_alphanumeric': 0.12359550561797752, 'fraction_numerical': 0.0056179775280898875, 'mean_word_length': 2.470779220779221, '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': '4480009', 'n_tokens_mistral': 357, 'n_tokens_neox': 348, 'n_words': 118}