def __init__(self, marker_id, match_anything_except: bool,
              literal_text: list, case_insensitive: bool):
     self.marker_id = marker_id
     self.literal_text = literal_text
     self.match_anything_except_specified = match_anything_except
     self.case_insensitive = case_insensitive
     self.repetition_info = RepetitionInfo()
示例#2
0
    def __init__(self, marker_id, info):
        self.marker_id = marker_id
        self.min_val_of_int_part = info['minValOfIntPart']
        self.max_val_of_int_part = info['maxValOfIntPart']
        self.decimal_separator = info['decimalSeparator']
        self.min_nr_of_decimals = info['minNrOfDecimals']
        self.max_nr_of_decimals = info['maxNrOfDecimals']
        self.thousand_separator = info['thousandSeparator']
        self.code_position = info['codePosition']
        self.currency_sign = info['currencySign']
        self.currency_codes = info['currencyCodes']
        self.limit_integer_part = info['limitIntegerPart']
        self.allow_plus_sign = info['allowPlusSign']
        self.allow_minus_sign = info['allowMinusSign']
        self.sign_is_required = info['signIsRequired']
        self.whitespace_allowed_after_sign = info['whitespaceAllowedAfterSign']
        self.thousand_separators_are_required = info[
            'thousandSeparatorsAreRequired']
        self.allow_leading_zeros = info['allowLeadingZeros']
        self.require_integer_part = info['requireIntegerPart']
        self.allow_exponent = info['allowExponent']
        self.currency_sign_or_code_required = info[
            'currencySignOrCodeRequired']

        self.repetition_info = RepetitionInfo()
示例#3
0
    def __init__(self, marker_id):
        self.marker_id = marker_id

        self.specific_characters = None
        self.specific_character = None
        self.nothing = None
        self.basic_characters = None
        self.can_span_across_lines = None
        self.case_insensitive = None

        self.repetition_info = RepetitionInfo()
示例#4
0
    def __init__(self, marker_id, info):
        self.marker_id = marker_id
        self.case_insensitive = info['caseInsensitive']
        self.lower_case_letters = info['lowerCaseLetters']
        self.upper_case_letters = info['upperCaseLetters']
        self.digits = info['digits']
        self.punctuation_and_symbols = info['punctuationAndSymbols']
        self.match_all_except_specified = info['matchAllExceptSpecified']
        self.white_space = info['whiteSpace']
        self.line_breaks = info['lineBreaks']

        self.individual_chars = ''.join(
            OrderedDict.fromkeys(
                re.sub(r'\s', '', info['individualCharacters'])))
        self.repetition_info = RepetitionInfo()
示例#5
0
 def __init__(self, marker_id, unicode_chars, individual_chars):
     self.marker_id = marker_id
     self.unicode_characters = unicode_chars
     self.individual_unicode_chars = individual_chars
     self.repetition_info = RepetitionInfo()
示例#6
0
 def __init__(self, marker_id, info):
     self.marker_id = marker_id
     self.marker = info['marker']
     self.repetition_info = RepetitionInfo()
示例#7
0
 def __init__(self, marker_id):
     self.marker_id = marker_id
     self.digits = []
     self.include_minus = False
     self.include_optional_minus = False
     self.repetition_info = RepetitionInfo()
示例#8
0
 def __init__(self, marker_id, wanted_control_chars: list):
     self.marker_id = marker_id
     self.wanted_control_chars = wanted_control_chars
     self.repetition_info = RepetitionInfo()
示例#9
0
 def __init__(self, marker_id, literal_text: str, extra_info: list):
     self.marker_id = marker_id
     self.literal_text = literal_text
     self.extra_info = extra_info
     self.repetition_info = RepetitionInfo()