|
@@ -26,13 +26,30 @@ def fake_dob(row):
|
|
|
class MetadataImporter:
|
|
|
|
|
|
def __init__(self,
|
|
|
- experiment,
|
|
|
- metadata,
|
|
|
- preserve_dates = False,
|
|
|
- recompute_ages = False,
|
|
|
- preserve_metadata = False,
|
|
|
- split_sessions = False,
|
|
|
- weekend_flag = False):
|
|
|
+ experiment: str,
|
|
|
+ metadata: str,
|
|
|
+ preserve_dates: bool = False,
|
|
|
+ recompute_ages: bool = False,
|
|
|
+ preserve_metadata: bool = False,
|
|
|
+ split_sessions: bool = False,
|
|
|
+ weekend_flag: bool = False):
|
|
|
+ """MetadataImporter
|
|
|
+
|
|
|
+ :param experiment: corpus name
|
|
|
+ :type experiment: str
|
|
|
+ :param metadata: path to existing metadata csv file
|
|
|
+ :type metadata: str
|
|
|
+ :param preserve_dates: preserve true dates instead of setting children date of birth to 1000-01-01 and all recording dates accordingly, defaults to False
|
|
|
+ :type preserve_dates: bool, optional
|
|
|
+ :param recompute_ages: extract children date of birth from the its and recompute ages, defaults to False
|
|
|
+ :type recompute_ages: bool, optional
|
|
|
+ :param preserve_metadata: preserve languages spoken metadata into children.csv instead of moving it to a confidential section, defaults to False
|
|
|
+ :type preserve_metadata: bool, optional
|
|
|
+ :param split_sessions: split its files into 1 session per day, defaults to False
|
|
|
+ :type split_sessions: bool, optional
|
|
|
+ :param weekend_flag: add a boolean flag for week-end days in recordings.csv, defaults to False
|
|
|
+ :type weekend_flag: bool, optional
|
|
|
+ """
|
|
|
|
|
|
self.children = pd.DataFrame()
|
|
|
self.recordings = pd.DataFrame()
|