英式/美式英语之间的转换
我使用 Vim 编辑 Latex 文档。根据我提交的会议/期刊、我正在学习的大学等,我可能想从英式英语转换为美式英语,反之亦然。有人知道是否有插件可以做到这一点?
I use Vim to edit my Latex document. Depending on the conference/journal I am submitting to, the university I am studying at, etc., I might like to convert from British English to American English or vice versa. Does anybody know if there is a plug-in to do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我猜即使有,它也会是不稳定且不可靠的。就像拼写检查器一样,这样的翻译工具无法取代优秀的校对员。
举个例子:美国英语中名词或动词的意思是“许可证”。英式英语的动词是“license”,名词是“licence”。该工具必须进行语法分析才能获得正确的结果。
编辑:更不用说 LaTeX 命令的问题,例如
\begin{itemize}
...I'd guess that even if there were, it would be flaky and unreliable. Just like a spell-checker, such a translation tool cannot replace a good proofreader.
An example: US english is "license" for the noun or verb. British english is "license" for verb and "licence" for noun. The tool would have to do grammar analysis to get the correct results.
EDIT: not to mention problems with LaTeX commands such as
\begin{itemize}
...我怀疑您能做的最好的事情就是让它标记要转换的候选者,因为特定单词通常没有唯一的拼写。例如,-ize 和 -ise 实际上在英式英语中都有效,而在美式英语中只有前者有效。不仅如此,某些单词的拼写还取决于语法上下文;例如英式英语的练习/练习和执照/执照。
由于特殊情况的数量,该过程需要相当广泛的差异字典,因此构建 Vim 插件将是一项相当漫长的任务。更不用说 Vim 主要用于编辑源代码而不是散文!
网上有各种工具可供您使用,但我不会太依赖它们:
I suspect the best you'll be able to do is get it to flag up candidates for conversion, since there often isn't a unique spelling for a particular word. For example, the -ize and -ise suffices are actually both valid in British English, while only the former is in American English. Not only this, but the spelling of some words depends on grammatical context; e.g. practice/practise and licence/license in British English.
The process would require a pretty extensive dictionary of differences, due to the number of special cases, so building a Vim plugin would be a pretty lengthy task. Not to mention that Vim is primarily intended for editing source code rather than prose!
There are various tools on the net that you might be able to use, but I wouldn't rely on them too much: