You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.
I am doing th-en translation,and after running translate.py,I got some results like this:
you see,many '@' in translated sentences.I think it's largely related to BPE algorithm.(in valid/test result,No '@')
So,what should I do to solve or improve this problem?
Thank you.
The text was updated successfully, but these errors were encountered:
import subprocess
def restore_segmentation(path):
"""
Take a file segmented with BPE and restore it to its original segmentation.
"""
assert os.path.isfile(path)
restore_cmd = "sed -i -r 's/(@@ )|(@@ ?$)//g' %s"
subprocess.Popen(restore_cmd % path.relpace(' ', '\ '), shell=True).wait()
for f in os.listdir(output_path):
restore_segmentation(os.path.join(output_path, f))
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am doing th-en translation,and after running translate.py,I got some results like this:
![image](https://user-images.githubusercontent.com/27134983/74798464-c3eaa500-5308-11ea-9e28-6427250888cf.png)
you see,many '@' in translated sentences.I think it's largely related to BPE algorithm.(in valid/test result,No '@')
So,what should I do to solve or improve this problem?
Thank you.
The text was updated successfully, but these errors were encountered: