ydshieh HF staff commited on
Commit
990cd1d
1 Parent(s): 02052e9

commit files to HF hub

Browse files
custom_feature_extraction.py ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ from transformers import Wav2Vec2FeatureExtractor
2
+
3
+
4
+ class CustomFeatureExtractor(Wav2Vec2FeatureExtractor):
5
+ pass
custom_processing.py ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ from transformers import ProcessorMixin
2
+
3
+
4
+ class CustomProcessor(ProcessorMixin):
5
+ feature_extractor_class = "AutoFeatureExtractor"
6
+ tokenizer_class = "AutoTokenizer"
custom_tokenization.py ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ from transformers import BertTokenizer
2
+
3
+
4
+ class CustomTokenizer(BertTokenizer):
5
+ pass
preprocessor_config.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "auto_map": {
3
+ "AutoFeatureExtractor": "custom_feature_extraction.CustomFeatureExtractor",
4
+ "AutoProcessor": "custom_processing.CustomProcessor"
5
+ },
6
+ "do_normalize": true,
7
+ "feature_extractor_type": "CustomFeatureExtractor",
8
+ "feature_size": 1,
9
+ "padding_side": "right",
10
+ "padding_value": 0.0,
11
+ "processor_class": "CustomProcessor",
12
+ "return_attention_mask": false,
13
+ "sampling_rate": 16000
14
+ }
processor_config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "auto_map": {
3
+ "AutoProcessor": "custom_processing.CustomProcessor"
4
+ },
5
+ "processor_class": "CustomProcessor"
6
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "mask_token": "[MASK]",
4
+ "pad_token": "[PAD]",
5
+ "sep_token": "[SEP]",
6
+ "unk_token": "[UNK]"
7
+ }
tokenizer_config.json ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[UNK]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "[CLS]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "[SEP]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "[PAD]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "4": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "auto_map": {
45
+ "AutoProcessor": "custom_processing.CustomProcessor",
46
+ "AutoTokenizer": [
47
+ "custom_tokenization.CustomTokenizer",
48
+ null
49
+ ]
50
+ },
51
+ "clean_up_tokenization_spaces": true,
52
+ "cls_token": "[CLS]",
53
+ "do_basic_tokenize": true,
54
+ "do_lower_case": true,
55
+ "mask_token": "[MASK]",
56
+ "model_max_length": 1000000000000000019884624838656,
57
+ "never_split": null,
58
+ "pad_token": "[PAD]",
59
+ "processor_class": "CustomProcessor",
60
+ "sep_token": "[SEP]",
61
+ "strip_accents": null,
62
+ "tokenize_chinese_chars": true,
63
+ "tokenizer_class": "CustomTokenizer",
64
+ "unk_token": "[UNK]"
65
+ }
vocab.txt ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ [UNK]
2
+ [CLS]
3
+ [SEP]
4
+ [PAD]
5
+ [MASK]
6
+ bla
7
+ blou