fix usage hint
Browse files
cngv1.py
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import os
|
| 2 |
from pathlib import Path
|
| 3 |
|
|
@@ -71,7 +88,7 @@ class CNGDataset(datasets.GeneratorBasedBuilder):
|
|
| 71 |
|
| 72 |
if not os.path.exists(manual_dir):
|
| 73 |
raise FileNotFoundError(
|
| 74 |
-
"{} does not exist. Make sure you insert a manual dir via `datasets.load_dataset('
|
| 75 |
manual_dir
|
| 76 |
)
|
| 77 |
)
|
|
|
|
| 1 |
+
# coding=utf-8
|
| 2 |
+
# Copyright 2021 The TensorFlow Datasets Authors and the HuggingFace Datasets Authors.
|
| 3 |
+
# Copyright 2021 Phonetics and Speech Laboratory, Trinity College, Dublin
|
| 4 |
+
#
|
| 5 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 6 |
+
# you may not use this file except in compliance with the License.
|
| 7 |
+
# You may obtain a copy of the License at
|
| 8 |
+
#
|
| 9 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
#
|
| 11 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
# See the License for the specific language governing permissions and
|
| 15 |
+
# limitations under the License.
|
| 16 |
+
# Lint as: python3
|
| 17 |
+
|
| 18 |
import os
|
| 19 |
from pathlib import Path
|
| 20 |
|
|
|
|
| 88 |
|
| 89 |
if not os.path.exists(manual_dir):
|
| 90 |
raise FileNotFoundError(
|
| 91 |
+
"{} does not exist. Make sure you insert a manual dir via `datasets.load_dataset('phonlab-tcd/cngv1', data_dir=...)` with the path to the corpus directory".format(
|
| 92 |
manual_dir
|
| 93 |
)
|
| 94 |
)
|