Skip to content

Commit

Permalink
prepare data for slavic and romance families
Browse files Browse the repository at this point in the history
  • Loading branch information
j-luo93 committed Apr 19, 2021
1 parent abae775 commit 89208a4
Show file tree
Hide file tree
Showing 5 changed files with 313 additions and 54 deletions.
15 changes: 12 additions & 3 deletions scripts/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,10 +506,19 @@ def get_pid_info(pid: int) -> Tuple[int, str]:
break

# Job schedule.
lang2code = {'Gothic': 'Got', 'Old Norse': 'Non', 'Old English': 'Ang'}
lang2code = {'Gothic': 'Got', 'Old Norse': 'Non', 'Old English': 'Ang',
'Spanish': 'Spa', 'Italian': 'Ita', 'French': 'Fra',
'Russian': 'Rus', 'Ukranian': 'Ukr', 'Polish': 'Pol'}
with st.beta_expander('Job schedule'):
lang = st.selectbox('language', ['Gothic', 'Old Norse', 'Old English'])
lang2config = {k: 'OPRLPgmc' + v for k, v in lang2code.items()}
lang = st.selectbox('language', ['Gothic', 'Old Norse', 'Old English',
'Spanish', 'Italian', 'French',
'Russian', 'Ukranian', 'Polish'])
if lang in ['Gothic', 'Old Norse', 'Old English']:
lang2config = {k: 'OPRLPgmc' + v for k, v in lang2code.items()}
elif lang in ['Spanish', 'Italian', 'French']:
lang2config = {k: 'OPRLLat' + v for k, v in lang2code.items()}
else:
lang2config = {k: 'OPRLSlaPro' + v for k, v in lang2code.items()}
config = lang2config[lang]
base_cmd = f'python sound_law/main.py --config {config} --mcts_config SmallSims --save_interval 1'

Expand Down
3 changes: 2 additions & 1 deletion scripts/prepare_abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@ def get_connected_sounds(ph, g, kept_dist_mat, kept_i2pp, kept_pp2i) -> PDF:

# Add some phones to the dataset -- they might not be present in the original data.
added_phones = ['oːː', 'eːː', 'õː', 'ĩː', 'xʷ', 'gʷ', 'hʷ', 'ay', 'iuː', 'ioː',
'io', 'eːo', 'æa', 'æːa', 'eo', 'iːu', 'iu', 'ɣː', 'ðː', 'wː', 'θː', 'βː', 'øy']
'io', 'eːo', 'æa', 'æːa', 'eo', 'iːu', 'iu', 'ɣː', 'ðː', 'wː', 'θː', 'βː', 'øy',
'tʲː', 'dʲː']
words_df = add_phones(raw_words_df, added_phones)
st.write(f'{", ".join(added_phones)}')

Expand Down
Loading

0 comments on commit 89208a4

Please sign in to comment.