1
0
forked from GitHub/gf-core

demos/translation: add preliminary online demo,

but it is not ready to be widely advertised yet, e.g. lexing and unlexing is
missing.
This commit is contained in:
hallgren
2014-01-23 14:56:52 +00:00
parent 14ce8509f8
commit 0a185814fd
2 changed files with 82 additions and 15 deletions

View File

@@ -1,26 +1,25 @@
Translation with GF
Powered by multilingual grammars
%!style:../css/style.css
%!postproc(html): <H1> <H1><a href="../"><IMG src="../doc/Logos/gf0.svg" alt=""></a>
%!postproc(html): #GFWCT <iframe style="border: 0; width: 100%; height: 24ex;" src="wc.html"></iframe>
==Try it online==
%**Coming soon**:
%//Here you will be able to select your source and target language and translate% whatever you want.//
#GFWCT
=Try it online=
**Coming soon**:
//Here you will be able to select your source and target language and translate whatever you want.//
=Download an app=
==Download an app==
**Coming soon**: //link to an Android app, with a barcode.//
=What you can expect=
==What you can expect==
The program is designed to translate anything, just like Google translate and Bing. It has some advantages over them:
- It uses **grammars** (as opposed to statistics), which makes it more correct in many cases.
@@ -43,19 +42,19 @@ Here are some hints to use it in a satisfactory way:
=How it works=
==How it works==
Powered by [Grammatical Framework ../]
Publications explaining the translation method:
=Get the sources=
==Get the sources==
Download from [here ../download/]
=Send us feedback=
==Send us feedback==

68
demos/wc.html Normal file
View File

@@ -0,0 +1,68 @@
<!DOCTYPE html>
<html> <head>
<title>Demo: GF Wide Coverage Translation</title>
<link rel=stylesheet href="../css/style.css">
<meta name = "viewport" content = "width = device-width">
<meta charset="UTF-8">
<link rel=top href="../" title="GF">
</head>
<body>
<div style="display: none">
<h1><a href="../"><img class=nofloat style="height: 3ex" src="../doc/Logos/gf0.png" alt="GF"></a>
Wide Coverage Translation</h1>
</div>
<form onsubmit="return wctranslate()">
<div class=center>
<p>
<textarea name=input rows=3 cols=50></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>
<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>
<br>
<textarea name=output rows=3 cols=50 readonly></textarea>
</div>
</form>
<div style="display: none" class=modtime><small>
<!-- hhmts start -->Last modified: Thu Jan 23 15:22:27 CET 2014 <!-- hhmts end -->
</small></div>
<script src="../src/www/js/support.js"></script>
<script src="../src/www/js/gftranslate.js"></script>
<script>
gftranslate.jsonurl="http://cloud.grammaticalframework.org/robust/Translate8.pgf"
function wctranslate() {
var f=document.forms[0]
function showit(result) {
f.output.value=result
f.translate.disabled=false
}
f.translate.disabled=true
f.output.value=""
gftranslate.translate(f.input.value,f.from.value,f.to.value,showit)
return false;
}
</script>
</body>
</html>