本文整理了Java中net.sf.okapi.lib.translation.QueryUtil.fromCodedHTML
方法的一些代码示例,展示了QueryUtil.fromCodedHTML
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QueryUtil.fromCodedHTML
方法的具体详情如下:
包路径:net.sf.okapi.lib.translation.QueryUtil
类名称:QueryUtil
方法名:fromCodedHTML
[英]Converts back a coded HTML to a coded text. (extra span elements are removed).
[中]将编码的HTML转换回编码的文本。(额外的跨度元素被移除)。
代码示例来源:origin: net.sf.okapi.lib/okapi-lib-translation
/**
* Converts back a coded HTML to a coded text.
* (extra span elements are removed).
*
* @param htmlText the coded HTML to convert back.
* @param fragment the original text fragment.
* @param addMissingCodes true to added codes that are in the original fragment but not in the HTML string.
* @return the coded text with its code markers.
*/
public String fromCodedHTML (String htmlText,
TextFragment fragment,
boolean addMissingCodes)
{
return fromCodedHTML(htmlText, fragment, addMissingCodes, true);
}
代码示例来源:origin: net.sf.okapi.connectors/okapi-connector-microsoft
private TextFragment makeFragment(String codedHtml, TextFragment sourceFragment) {
return sourceFragment.hasCode() ?
new TextFragment(util.fromCodedHTML(codedHtml, sourceFragment, false), sourceFragment.getClonedCodes()) :
new TextFragment(util.fromCodedHTML(codedHtml, sourceFragment, false));
}
}
代码示例来源:origin: net.sf.okapi.connectors/okapi-connector-apertium
result.source = fragment;
if ( fragment.hasCode() ) {
result.target = new TextFragment(util.fromCodedHTML(res, fragment, true),
fragment.getClonedCodes());
result.target = new TextFragment(util.fromCodedHTML(res, fragment, true));
代码示例来源:origin: net.sf.okapi.steps/okapi-step-leveraging
String ctext = qutil.fromCodedHTML(elem.getContent().toString(), srcFrag, true);
trgFrag = new TextFragment(ctext, srcFrag.getCodes());
内容来源于网络,如有侵权,请联系作者删除!