Skip to content
New issue

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

fixed_main.py #234

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

fixed_main.py #234

wants to merge 1 commit into from

Conversation

qasdew8750
Copy link

@qasdew8750 qasdew8750 commented Jun 2, 2024

original code has some mistake. so it is better to change code

li = open(path, 'w')
->
lines = open(path, 'r').read().split('\n')

wrong variable and it isnt possible to do function's role

template_start = '{"German":"'
->
template_start = '{"English":"'

wrong comment

english_file = process_file(german_file)
->
german_file = process_file(german_file)

wrong variable

with open(path, 'r') as f:
for file in file_list:
f.write('\n')
->
with open(path, 'w') as f:
for file in file_list:
f.write(file + '\n')
wrong purpose to open and ommsion of file to writing

german_file_list = train_file_list_to_json(german_path)

processed_file_list = path_to_file_list(english_file_list, german_file_list)
->
german_file_list = path_to_file_list(german_path)

processed_file_list = trin_file_list_to_json(english_file_list, german_file_list)

wrong uses of functions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants