forked from GitHub/gf-core
The background color of the translation changes to pale green, yellow or red according to the quality. Two types of quality indications are supported: + From the grammar: linearizations starting with "+" or "*" are assumed to be of high or low quality, respectively. + From the parse tree: if the root function is "?", then the translation is assumed to be of low quality. If no quality indications are detected, medium quality is assumed.
81 lines
2.6 KiB
HTML
81 lines
2.6 KiB
HTML
<!DOCTYPE html>
|
||
<html> <head>
|
||
<title>Demo: GF Wide Coverage Translation</title>
|
||
<link rel="stylesheet" type="text/css" href="gfse/editor.css" title="Cloud">
|
||
<meta name = "viewport" content = "width = device-width">
|
||
<meta charset="UTF-8">
|
||
<link rel=top href="../" title="GF">
|
||
<style>
|
||
div.center { text-align: center; }
|
||
table.center { margin-left: auto; margin-right: auto; }
|
||
textarea { margin: 0; }
|
||
body:target h1, body:target div.modtime { display: none; }
|
||
#extra { color: #666; }
|
||
#pick>* { padding: 0 0.5ex; }
|
||
#speak { display: none; }
|
||
.default_quality { background-color: #ffc; }
|
||
.high_quality { background-color: #cfc; }
|
||
.low_quality { background-color: #fcc; }
|
||
</style>
|
||
</head>
|
||
|
||
<body id=embed>
|
||
<div class=center>
|
||
<h1><a href="http://www.grammaticalframework.org/"><img class=nofloat src="P/gf-cloud.png" alt="GF"></a> Wide Coverage Translation</h1>
|
||
</div>
|
||
|
||
<table class="center">
|
||
<tr><td>
|
||
<form onsubmit="return wc.translate()">
|
||
<textarea name=input rows=3 style="width: 100%"></textarea>
|
||
<br>
|
||
<big>⤷</big>
|
||
<select name=from>
|
||
<option value=Bul>Bulgarian</option>
|
||
<option value=Chi>Chinese</option>
|
||
<option value=Eng selected>English</option>
|
||
<option value=Fin>Finnish</option>
|
||
<option value=Fre>French</option>
|
||
<option value=Ger>German</option>
|
||
<option value=Hin>Hindi</option>
|
||
<option value=Swe>Swedish</option>
|
||
</select> →
|
||
<button name=translate type=submit><strong><big>Translate</big></strong></button> →
|
||
<select name=to onchange="wc.translate()">
|
||
<option value=Bul>Bulgarian</option>
|
||
<option value=Chi>Chinese</option>
|
||
<option value=Eng>English</option>
|
||
<option value=Fin>Finnish</option>
|
||
<option value=Fre>French</option>
|
||
<option value=Ger>German</option>
|
||
<option value=Hin>Hindi</option>
|
||
<option value=Swe selected>Swedish</option>
|
||
</select>
|
||
<big style="position: relative; top: 1ex">⤵</big>
|
||
<button onclick="wc.swap()">↑↓</button>
|
||
<br>
|
||
<textarea name=output rows=3 style="width: 100%" readonly></textarea>
|
||
<small id=speak><input name=speak type=checkbox> Speak</small>
|
||
</form>
|
||
|
||
</table>
|
||
<div class=center>
|
||
<!--input type=button onclick="wc.try_google()" value="Google Translate"-->
|
||
<div id=pick></div>
|
||
<small id=extra></small>
|
||
</div>
|
||
<p>
|
||
<div class=modtime><small>
|
||
<!-- hhmts start -->Last modified: Thu Mar 27 14:42:45 CET 2014 <!-- hhmts end -->
|
||
</small></div>
|
||
<script src="js/support.js"></script>
|
||
<script src="js/gftranslate.js"></script>
|
||
<script src="js/localstorage.js"></script>
|
||
<script src="gfse/localstorage.js"></script>
|
||
<script src="gfse/cloud2.js"></script>
|
||
<script src="js/langcode.js"></script>
|
||
<script src="js/wc.js"></script>
|
||
</script>
|
||
</body>
|
||
</html>
|