We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The graphene label value needs to be corrected.
def generate_grapheme_labels(grapheme_transcripts, vocab_path: str): vocab_list = list() vocab_freq = list() for grapheme_transcript in grapheme_transcripts: graphemes = grapheme_transcript.split() for grapheme in graphemes: if grapheme not in vocab_list: vocab_list.append(grapheme) vocab_freq.append(1) else: vocab_freq[vocab_list.index(grapheme)] += 1 vocab_freq, vocab_list = zip(*sorted(zip(vocab_freq, vocab_list), reverse=True)) vocab_dict = { 'id': [0, 1, 2, 3], 'grpm': ['<pad>', '<sos>', '<eos>', '<blank>'], 'freq': [0, 0, 0, 0] } for idx, (grpm, freq) in enumerate(zip(vocab_list, vocab_freq)): vocab_dict['id'].append(idx + 3) vocab_dict['grpm'].append(grpm) vocab_dict['freq'].append(freq) label_df = pd.DataFrame(vocab_dict) label_df.to_csv(vocab_path, encoding="utf-8", index=False)
vocab_dict['id'].append(idx + 3) -> vocab_dict['id'].append(idx + 4)
vocab_dict['id'].append(idx + 3)
vocab_dict['id'].append(idx + 4)
The text was updated successfully, but these errors were encountered:
Resolved #47
b661a78
Merge pull request #48 from sooftware/0.2.1_chun
808c43a
upskyy
No branches or pull requests
Information
The graphene label value needs to be corrected.
Expected behavior
vocab_dict['id'].append(idx + 3)
->vocab_dict['id'].append(idx + 4)
The text was updated successfully, but these errors were encountered: