# Path: nlglib/features/feature.py
# class FeatureGroup(object):
#     """Represents a group of features such as NUMBER or TENSE. """
# 
#     # TODO: consider using metaclasses and __slots__
# 
#     def __init__(self, name, *values, transform=None):
#         """Create a feature group with given values as Feature instances.
# 
#         The values are accessible as instance attributes. The values are
#         also stored in an instance variable (list) `values`.
# 
#         Note that the order of values matters! (intentionally)
# 
#         :param str name: the name of the group (eg NUMBER or TENSE)
#         :param str values: the individual feature values (eg first, second or present, past)
#         :param str transform: string transformation for given values ('lower', 'upper' or None)
# 
#         >>> NUMBER = FeatureGroup('NUMBER', 'singular', 'plural')
#         >>> NUMBER.singular
#         <Feature NUMBER: singular>
# 
#         """
# 
#         def ident(x):
#             return x
# 
#         fn = ident
#         if transform:
#             fn = getattr(str, transform)
#         self.transform = fn
#         self.name = name
#         self.values = list(values)
#         for v in values:
#             setattr(self, fn(v), Feature(name, fn(v)))
# 
#     def __str__(self):
#         return self.name
# 
#     def __repr__(self):
#         return '<FeatureGroup {0}: {1}>'.format(self.name, ', '.join(self.values))
# 
#     def __len__(self):
#         return len(self.values)
# 
#     def __getitem__(self, item):
#         return self.values[item]
# 
#     def __contains__(self, item):
#         if isinstance(item, str):
#             return item in self.values
#         elif isinstance(item, Feature):
#             return item.name == self.name and item.value in self.values
#         else:
#             return False
# 
#     def __eq__(self, other):
#         """Return True if `other` is the same FeatureGroup
#         or if it is a `Feature` with the same name
# 
#         """
#         if isinstance(other, FeatureGroup):
#             return self.name == other.name and self.values == other.values
#         elif isinstance(other, Feature):
#             return self.name == other.name
#         else:
#             return False
# 
#     def __hash__(self):
#         # hash uses only the name so that we can compare with Feature
#         return hash(self.name)
# 
#     def __getattr__(self, item):
#         item = self.transform(item)
#         return super(FeatureGroup, self).__getattribute__(item)


from nlglib.features.feature import FeatureGroup
# past progressive tense	    I was going
# present progressive tense	    I am going
# future progressive tense	    I will be going
# The Perfect Progressive Aspect	Example
# past perfect progressive tense	I had been going
# present perfect progressive tense	I have been going
# future perfect progressive tense	I will have been going
ASPECT = FeatureGroup(
    'ASPECT', 'simple', 'perfect', 'progressive', 'perfect_progressive', transform='lower'
)

MOOD = FeatureGroup('MOOD', 'indicative', 'imperative', 'subjunctive', transform='lower')

MODAL = FeatureGroup(
    'MODAL',
    'can',
    'could',
    'may',
    'might',
    'must',
    'ought',
    'shall',
    'should',
    'will',
    'would',
    transform='lower'
)

VOICE = FeatureGroup('VOICE', 'active', 'passive', transform='lower')


# Path: nlglib/features/feature.py
# class FeatureGroup(object):
#     """Represents a group of features such as NUMBER or TENSE. """
# 
#     # TODO: consider using metaclasses and __slots__
# 
#     def __init__(self, name, *values, transform=None):
#         """Create a feature group with given values as Feature instances.
# 
#         The values are accessible as instance attributes. The values are
#         also stored in an instance variable (list) `values`.
# 
#         Note that the order of values matters! (intentionally)
# 
#         :param str name: the name of the group (eg NUMBER or TENSE)
#         :param str values: the individual feature values (eg first, second or present, past)
#         :param str transform: string transformation for given values ('lower', 'upper' or None)
# 
#         >>> NUMBER = FeatureGroup('NUMBER', 'singular', 'plural')
#         >>> NUMBER.singular
#         <Feature NUMBER: singular>
# 
#         """
# 
#         def ident(x):
#             return x
# 
#         fn = ident
#         if transform:
#             fn = getattr(str, transform)
#         self.transform = fn
#         self.name = name
#         self.values = list(values)
#         for v in values:
#             setattr(self, fn(v), Feature(name, fn(v)))
# 
#     def __str__(self):
#         return self.name
# 
#     def __repr__(self):
#         return '<FeatureGroup {0}: {1}>'.format(self.name, ', '.join(self.values))
# 
#     def __len__(self):
#         return len(self.values)
# 
#     def __getitem__(self, item):
#         return self.values[item]
# 
#     def __contains__(self, item):
#         if isinstance(item, str):
#             return item in self.values
#         elif isinstance(item, Feature):
#             return item.name == self.name and item.value in self.values
#         else:
#             return False
# 
#     def __eq__(self, other):
#         """Return True if `other` is the same FeatureGroup
#         or if it is a `Feature` with the same name
# 
#         """
#         if isinstance(other, FeatureGroup):
#             return self.name == other.name and self.values == other.values
#         elif isinstance(other, Feature):
#             return self.name == other.name
#         else:
#             return False
# 
#     def __hash__(self):
#         # hash uses only the name so that we can compare with Feature
#         return hash(self.name)
# 
#     def __getattr__(self, item):
#         item = self.transform(item)
#         return super(FeatureGroup, self).__getattribute__(item)


# Path: nlglib/features/default.py
from nlglib.features.feature import FeatureGroup

# past progressive tense	    I was going
# present progressive tense	    I am going
# future progressive tense	    I will be going
# The Perfect Progressive Aspect	Example
# past perfect progressive tense	I had been going
# present perfect progressive tense	I have been going
# future perfect progressive tense	I will have been going
ASPECT = FeatureGroup(
    'ASPECT', 'simple', 'perfect', 'progressive', 'perfect_progressive', transform='lower'
)

MOOD = FeatureGroup('MOOD', 'indicative', 'imperative', 'subjunctive', transform='lower')

MODAL = FeatureGroup(
    'MODAL',
    'can',
    'could',
    'may',
    'might',
    'must',
    'ought',
    'shall',
    'should',
    'will',
    'would',
    transform='lower'
)

VOICE = FeatureGroup('VOICE', 'active', 'passive', transform='lower')


FORM = FeatureGroup(