鼠标悬停显示词义,作为MT系统的post编辑工具使用
To show meanings of words on hovering which is to be used as a post editing tool in MT system
我正在构建 post 机器翻译系统的编辑工具。
我需要添加一项功能,如果用户将鼠标悬停在源文本单词上,它会在 JSP 网页的工具提示中获取目标语言中该特定单词或短语的含义,为此我必须维护一个散列图来存储单词及其相应的含义,但我无法将工具提示功能与散列图集成。
您可以迭代地图并将工具提示值放入 title attribute
<%for (Map.Entry<String, String> entry : map.entrySet()) {
String key = entry.getKey();
String value = entry.getValue();
%><input type="text" value="<%=key%>" title="<%=value%>">
<%}%>
The title attribute specifies extra information about an element.
The information is most often shown as a tooltip text when the mouse moves over the element.
我正在构建 post 机器翻译系统的编辑工具。
我需要添加一项功能,如果用户将鼠标悬停在源文本单词上,它会在 JSP 网页的工具提示中获取目标语言中该特定单词或短语的含义,为此我必须维护一个散列图来存储单词及其相应的含义,但我无法将工具提示功能与散列图集成。
您可以迭代地图并将工具提示值放入 title attribute
<%for (Map.Entry<String, String> entry : map.entrySet()) {
String key = entry.getKey();
String value = entry.getValue();
%><input type="text" value="<%=key%>" title="<%=value%>">
<%}%>
The title attribute specifies extra information about an element.
The information is most often shown as a tooltip text when the mouse moves over the element.