-
Notifications
You must be signed in to change notification settings - Fork 0
/
base.py
36 lines (31 loc) · 1.03 KB
/
base.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# This file is part of the Pattern and Anomaly Detection Library (openclean_pattern).
#
# Copyright (C) 2020 New York University.
#
# openclean_pattern is released under the Revised BSD License. See file LICENSE for
# full license details.
"""Supported Data types and their string representations"""
import enum
class SupportedDataTypes(enum.Enum):
"""
Enum class for all supported datatypes and their representations
"""
# ATOMIC TYPES
STRING = STRING_REP = '\W+' #TODO: REQUIRED?
ALPHA = ALPHA_REP = 'ALPHA'
ALPHANUM = ALPHANUM_REP = 'ALPHANUM'
DIGIT = DIGIT_REP = 'NUMERIC'
PUNCTUATION = PUNCTUATION_REP = 'PUNC'
GAP = 'G' # ALIGNMENT GAP CHARACTER TODO: REQUIRED?
SPACE_REP = '\S'
OPTIONAL_REP = '?' # POST REGEX OPTIONAL CHARACTER TODO: REQUIRED?
# SUPPORTED COMPOUND TYPES
MONTH = 'MONTH'
WEEKDAY = 'WEEKDAY'
DATETIME = 'DATETIME'
STATE = 'STATE'
COUNTRY = 'COUNTRY'
COUNTY = 'COUNTY'
BE = 'BUSINESS'
STREET = 'STREET'
SUD = 'SUD' #SECONDARY_UNIT_DESIGNATOR