Datasets:
remove `_fix_typo_in_dataset` function (#5)
Browse files
wrime.py
CHANGED
@@ -69,17 +69,6 @@ _URLS: URLs = {
|
|
69 |
}
|
70 |
|
71 |
|
72 |
-
def _fix_typo_in_dataset(df: pd.DataFrame) -> pd.DataFrame:
|
73 |
-
# ref. https://github.com/ids-cv/wrime/pull/4
|
74 |
-
df = df.rename(
|
75 |
-
columns={
|
76 |
-
"Reader2_Saddness": "Reader2_Sadness",
|
77 |
-
"Reader3_Saddness": "Reader3_Sadness",
|
78 |
-
}
|
79 |
-
)
|
80 |
-
return df
|
81 |
-
|
82 |
-
|
83 |
def _convert_column_name(df: pd.DataFrame) -> pd.DataFrame:
|
84 |
|
85 |
# ['Sentence', 'UserID', 'Datetime', 'Train/Dev/Test', 'Writer_Joy', ...]
|
@@ -98,7 +87,6 @@ def _load_tsv(tsv_path: str) -> pd.DataFrame:
|
|
98 |
df = pd.read_csv(tsv_path, delimiter="\t")
|
99 |
|
100 |
# some preprocessing
|
101 |
-
df = _fix_typo_in_dataset(df)
|
102 |
df = _convert_column_name(df)
|
103 |
|
104 |
return df
|
|
|
69 |
}
|
70 |
|
71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
def _convert_column_name(df: pd.DataFrame) -> pd.DataFrame:
|
73 |
|
74 |
# ['Sentence', 'UserID', 'Datetime', 'Train/Dev/Test', 'Writer_Joy', ...]
|
|
|
87 |
df = pd.read_csv(tsv_path, delimiter="\t")
|
88 |
|
89 |
# some preprocessing
|
|
|
90 |
df = _convert_column_name(df)
|
91 |
|
92 |
return df
|