@@ -77,63 +77,98 @@ def multilabel(self) -> bool:
7777
7878 def train_utterances (self , idx : int | None = None ) -> list [str ]:
7979 """
80- Get the training utterances.
80+ Retrieve training utterances from the dataset .
8181
82+ If a specific training split index is provided, retrieves utterances
83+ from the indexed training split. Otherwise, retrieves utterances from
84+ the primary training split.
85+
86+ :param idx: Optional index for a specific training split.
8287 :return: List of training utterances.
8388 """
8489 split = f"{ Split .TRAIN } _{ idx } " if idx is not None else Split .TRAIN
8590 return cast (list [str ], self .dataset [split ][self .dataset .utterance_feature ])
8691
8792 def train_labels (self , idx : int | None = None ) -> list [LabelType ]:
8893 """
89- Get the training labels.
94+ Retrieve training labels from the dataset.
95+
96+ If a specific training split index is provided, retrieves labels
97+ from the indexed training split. Otherwise, retrieves labels from
98+ the primary training split.
9099
100+ :param idx: Optional index for a specific training split.
91101 :return: List of training labels.
92102 """
93103 split = f"{ Split .TRAIN } _{ idx } " if idx is not None else Split .TRAIN
94104 return cast (list [LabelType ], self .dataset [split ][self .dataset .label_feature ])
95105
96106 def validation_utterances (self , idx : int | None = None ) -> list [str ]:
97107 """
98- Get the validation utterances.
108+ Retrieve validation utterances from the dataset .
99109
110+ If a specific validation split index is provided, retrieves utterances
111+ from the indexed validation split. Otherwise, retrieves utterances from
112+ the primary validation split.
113+
114+ :param idx: Optional index for a specific validation split.
100115 :return: List of validation utterances.
101116 """
102117 split = f"{ Split .VALIDATION } _{ idx } " if idx is not None else Split .VALIDATION
103118 return cast (list [str ], self .dataset [split ][self .dataset .utterance_feature ])
104119
105120 def validation_labels (self , idx : int | None = None ) -> list [LabelType ]:
106121 """
107- Get the validatio labels.
122+ Retrieve validation labels from the dataset.
123+
124+ If a specific validation split index is provided, retrieves labels
125+ from the indexed validation split. Otherwise, retrieves labels from
126+ the primary validation split.
108127
109- :return: List of validatio labels.
128+ :param idx: Optional index for a specific validation split.
129+ :return: List of validation labels.
110130 """
111131 split = f"{ Split .VALIDATION } _{ idx } " if idx is not None else Split .VALIDATION
112132 return cast (list [LabelType ], self .dataset [split ][self .dataset .label_feature ])
113133
114134 def test_utterances (self , idx : int | None = None ) -> list [str ]:
115135 """
116- Get the test utterances.
136+ Retrieve test utterances from the dataset .
117137
138+ If a specific test split index is provided, retrieves utterances
139+ from the indexed test split. Otherwise, retrieves utterances from
140+ the primary test split.
141+
142+ :param idx: Optional index for a specific test split.
118143 :return: List of test utterances.
119144 """
120145 split = f"{ Split .TEST } _{ idx } " if idx is not None else Split .TEST
121146 return cast (list [str ], self .dataset [split ][self .dataset .utterance_feature ])
122147
123148 def test_labels (self , idx : int | None = None ) -> list [LabelType ]:
124149 """
125- Get the test labels.
150+ Retrieve test labels from the dataset.
151+
152+ If a specific test split index is provided, retrieves labels
153+ from the indexed test split. Otherwise, retrieves labels from
154+ the primary test split.
126155
156+ :param idx: Optional index for a specific test split.
127157 :return: List of test labels.
128158 """
129159 split = f"{ Split .TEST } _{ idx } " if idx is not None else Split .TEST
130160 return cast (list [LabelType ], self .dataset [split ][self .dataset .label_feature ])
131161
132162 def oos_utterances (self , idx : int | None = None ) -> list [str ]:
133163 """
134- Get the out-of-scope utterances.
164+ Retrieve out-of-scope (OOS) utterances from the dataset.
165+
166+ If the dataset contains out-of-scope samples, retrieves the utterances
167+ from the specified OOS split index (if provided) or the primary OOS split.
168+ Returns an empty list if no OOS samples are available in the dataset.
135169
136- :return: List of out-of-scope utterances if available, otherwise an empty list.
170+ :param idx: Optional index for a specific OOS split.
171+ :return: List of out-of-scope utterances, or an empty list if unavailable.
137172 """
138173 if self .has_oos_samples ():
139174 split = f"{ Split .OOS } _{ idx } " if idx is not None else Split .OOS
0 commit comments