txya900619 commited on
Commit
ba7ddeb
1 Parent(s): 157c210

feat: delete gh_token need

Browse files
Files changed (2) hide show
  1. configs/ipa.yaml +11 -12
  2. ipa/__init__.py +1 -2
configs/ipa.yaml CHANGED
@@ -1,13 +1,12 @@
1
- gh_token: ${oc.env:GH_TOKEN}
2
- delimiter_list: ${gh_download:FormoSpeech/FormoLexicon, release/delimiters.json, ${gh_token}}
3
- replace_dict: ${gh_download:FormoSpeech/FormoLexicon, release/replaced_words_htia.json, ${gh_token}}
4
- v2f_dict: ${gh_download:FormoSpeech/FormoLexicon, [release/v2f_goyu.json, release/v2f_htia.json], ${gh_token}}
5
- preserved_list: ${gh_download:FormoSpeech/FormoLexicon, release/preserved_words_htia.json, ${gh_token}}
6
- pinyin_to_ipa_dict: ${gh_download:FormoSpeech/FormoLexicon, release/pinyin_to_ipa_htia.json, ${gh_token}}
7
  lexicon:
8
- sixian: ${gh_download:FormoSpeech/FormoLexicon, release/lexicon_htia_sixian_c.json, ${gh_token}}
9
- hailu: ${gh_download:FormoSpeech/FormoLexicon, release/lexicon_htia_hailu_c.json, ${gh_token}}
10
- dapu: ${gh_download:FormoSpeech/FormoLexicon, release/lexicon_htia_dapu_c.json, ${gh_token}}
11
- nansixian: ${gh_download:FormoSpeech/FormoLexicon, release/lexicon_htia_nansixian_c.json, ${gh_token}}
12
- raoping: ${gh_download:FormoSpeech/FormoLexicon, release/lexicon_htia_raoping_c.json, ${gh_token}}
13
- zhaoan: ${gh_download:FormoSpeech/FormoLexicon, release/lexicon_htia_zhaoan_c.json, ${gh_token}}
 
1
+ delimiter_list: ${gh_download:FormoSpeech/FormoG2P, hakka/normalize/delimiters.json}
2
+ replace_dict: ${gh_download:FormoSpeech/FormoG2P, hakka/normalize/replaced_words_htia.json}
3
+ v2f_dict: ${gh_download:FormoSpeech/FormoG2P, [hakka/normalize/v2f_goyu.json, hakka/normalize/v2f_htia.json]}
4
+ preserved_list: ${gh_download:FormoSpeech/FormoG2P, hakka/normalize/preserved_words_htia.json}
5
+ pinyin_to_ipa_dict: ${gh_download:FormoSpeech/FormoG2P, hakka/normalize/pinyin_to_ipa_htia.json}
 
6
  lexicon:
7
+ sixian: ${gh_download:FormoSpeech/FormoG2P, hakka/sixian.json}
8
+ hailu: ${gh_download:FormoSpeech/FormoG2P, hakka/hailu.json}
9
+ dapu: ${gh_download:FormoSpeech/FormoG2P, hakka/dapu.json}
10
+ nansixian: ${gh_download:FormoSpeech/FormoG2P, hakka/nansixian.json}
11
+ raoping: ${gh_download:FormoSpeech/FormoG2P, hakka/raoping.json}
12
+ zhaoan: ${gh_download:FormoSpeech/FormoG2P, hakka/zhaoan.json}
ipa/__init__.py CHANGED
@@ -4,11 +4,10 @@ import requests
4
  from omegaconf import OmegaConf
5
 
6
 
7
- def gh_download(repo, path, token):
8
  paths = [path] if isinstance(path, str) else path
9
  result = None
10
  headers = {
11
- "Authorization": f"Bearer {token}",
12
  "Accept": "application/vnd.github.raw+json",
13
  }
14
  for path in paths:
 
4
  from omegaconf import OmegaConf
5
 
6
 
7
+ def gh_download(repo, path):
8
  paths = [path] if isinstance(path, str) else path
9
  result = None
10
  headers = {
 
11
  "Accept": "application/vnd.github.raw+json",
12
  }
13
  for path in paths: