Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/90.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 谷歌如何翻译Chrome插件?我不知道';我不这么认为';有那么简单吗_Html_Nlp_Translation - Fatal编程技术网

Html 谷歌如何翻译Chrome插件?我不知道';我不这么认为';有那么简单吗

Html 谷歌如何翻译Chrome插件?我不知道';我不这么认为';有那么简单吗,html,nlp,translation,Html,Nlp,Translation,我决定开始一个翻译网页的项目,就像谷歌的插件一样。如果你不知道它基本上是什么,你点击“翻译这个页面”,它会翻译所有人类可读的字段 我想我需要做的是获取页面的HTML并翻译文本,然后显示给用户,对吗?但事实证明它要复杂得多 例如,html字段包含: <p>To get it, first <strong>you need to have</strong> Selenium and the web driver install</p> 要获得它,首先

我决定开始一个翻译网页的项目,就像谷歌的插件一样。如果你不知道它基本上是什么,你点击“翻译这个页面”,它会翻译所有人类可读的字段

我想我需要做的是获取页面的HTML并翻译文本,然后显示给用户,对吗?但事实证明它要复杂得多

例如,html字段包含:

<p>To get it, first <strong>you need to have</strong> Selenium and the web driver install</p>
要获得它,首先需要安装Selenium和web驱动程序

假设我已经翻译了整个句子。但是如何确定哪个部分将位于
标记内?或如何处理类似案件

事实上,我修改了翻译模型,以便它能为我提供“原始”“翻译”对,例如:

你->杜

需要->布劳克斯特

布劳克斯特

拥有->布劳克斯特

即使我像这样映射到标记内部,在将这个标记字段插入整个句子时也会遇到问题。它变得越来越复杂,我无法理解


所以我想问你们我做错什么了吗?您有什么建议吗?

然后您会丢失标签。Innertext是:“要获得它,首先需要安装Selenium和web驱动程序”