-
Notifications
You must be signed in to change notification settings - Fork 79
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
do not translate words from a given vocabulary #72
Comments
if we could not set such a non-translating vocab for translators (google, tencent ... ) the only way is to remedy it replace the (wrongly) translated words to the origin EN word after translation ... |
Another (downstream way) is to proc the translated main.tex file: #!/bin/bash
declare -A replace_dict=(["法学硕士"]="LLM" ["变压器"]="Transformer" ["代币"]="token")
while read -r line; do
for key in "${!replace_dict[@]}"; do
line=${line//${key}/${replace_dict[$key]}}
done
echo $line
done < main.tex |
iter all .tex files of directory dir and proc (as we could not in general not know which .tex is the main tex file?): #!/bin/bash
declare -A replace_dict=(["法学硕士"]="LLM" ["变压器"]="Transformer" ["代币"]="token")
find dir -name "*.tex" | while read -r file; do
while read -r line; do
for key in "${!replace_dict[@]}"; do
line=${line//${key}/${replace_dict[$key]}}
done
echo $line
done < "$file"
done |
Thank you for reporting issues to us. Since we are a general translation tool instead of a tool only working for CS or DL, we think it might be better to leave it as what it is temporarily. |
e.g., do not translate LLM to 法学硕士. Leave it as LLM.
e.g., do not Transformer LLM to 变压器. Leave it as Transformer.
The text was updated successfully, but these errors were encountered: