1
0
forked from GitHub/gf-core
Commit Graph

42 Commits

Author SHA1 Message Date
hallgren
77d8758a46 Wide Coverage Translation Demo: a couple of small fixes
Add missing initalization after a new application grammar has been selected.
Add an "X" close button in the upper left corner of the grammar selection popup.
2016-05-16 14:43:51 +00:00
hallgren
ed9715dd92 Wide Coverage Translation Demo: you can now reorder the application grammars
When selecting which application grammars to use for translation, after
pressing the "Grammars..." button, it is now possible to change the order
of the selected grammars by dragging them up and down in the list.
2016-05-16 14:14:55 +00:00
hallgren
4ddf95b89c Wide Coverage Translation Demo: select application grammars to use from a list
There is now a new button "Grammars..." which show a list where users can
select which application grammars to use for translation, in addition to
the wide coverage grammar. Application grammars can give higher quality
translations in the domain they cover.
TODO: make it possible control the order of the selected application grammars.
2016-05-12 17:53:56 +00:00
hallgren
d0fc643951 Wide Coveage Translation Demo: sort parse results by probability
Because of the "heurisitc factor", the results returned by the parser might
not be in strict probability order. To compensate, a sorting pass has been
added to find and show the translation with the highest probability among the
10 first translations.

However, this means that the translation demo now immediately has to ask for
10 translations of every segment. Before, it initially asked for only one
translation of every segment, and then 9 more translations for a segment
when/if the user clicked on it. This change can slow down translation
noticeably (e.g. from 15s 30s to load an example with fiction in English).
2015-12-10 14:27:15 +00:00
hallgren
cc1ec66e2e Wide coverage translation demo: make it easier to use with different grammars 2015-09-02 14:44:30 +00:00
hallgren
c14ca1eba4 Wide Coverage Demo: avoid errors if d3 or d3Tree can't be loaded 2015-07-15 14:07:26 +00:00
hallgren
7c9e860d87 Wide Coverage Translation Demo: add buttons for speech output
Also fixed a problem with showing inflections for words containing underscores
(e.g. race_2_N).
2015-05-27 13:29:41 +00:00
hallgren
29712a43ac Wide coverage translation demo: show an informative error message for sentences that exceed the length limit 2015-04-09 10:18:41 +00:00
hallgren
d1bca8f4de Wide Coverage Translation Demo: zoomable panable collapsible syntax trees
This is an experimental solution using JavaScript code from
https://github.com/christos-c/tree-viewer, d3js.org and jquery.com.
2015-03-24 18:03:10 +00:00
hallgren
fbd7e498cd Wide Coverage Translation Demo: add a way to obtain inflection tables
Too see inflection tables, click on a translated sentense, then click on a
blue function name in the textual representation of the abstract syntax tree.
2015-03-22 22:54:05 +00:00
hallgren
de1437d3c4 Wide Coverage Translation Demo: draw abstract trees and parse trees
You can now click on a tree to toggle between the abstract syntax tree and
the parse tree.

Also, the implementation now uses the new C run-time requests, e.g.

	App14.pgf?command=c-abstrtree&tree=...

so no need to install AppEng.pgf on the server any more.
2015-03-19 15:26:18 +00:00
hallgren
e92583ca8c Wide Coverage Translation Demo: draw syntax trees
The trees are drawn by using the Haskell run-time request 

	AppEng.pgf?command=abstrtree&tree=...

Thus AppEng.pgf has to be installed on the server and in sync with App14.pgf.
This is to avoid loading the huge App14.pgf in the Haskell run-time system, and
is enough since we only need the abstract syntax.
2015-03-18 16:23:04 +00:00
hallgren
4ff30e6771 Wide Coverage Translation Demo: improved performance
For improved performance, request only one translation from the server
initially. When the user clicks on a translated sentense, request 9 more
translations.
2015-03-11 17:53:25 +00:00
hallgren
83c5269a84 Wide Coverage Translation Demo: better resizing behavior on startup and when pasting text 2015-02-25 15:36:25 +00:00
hallgren
98e01dc63e Wide Coverage Demo web app: use the App grammar instead of the Translate grammar
This gives faster but slightly lower quality translations.
2014-09-09 13:53:10 +00:00
hallgren
eee9617036 Cloud service & apps: better error handling in wide coverage translation
The wide coverage demo apps now shows a "please wait" message while the grammar
is loading, and a red error message if the grammar is not found on the server.
The Simple Translation Tool also show red error messages if the grammar is not
found.
2014-06-20 18:39:28 +00:00
hallgren
519f073af3 Wide Coverage Demo Web App: bug fix: swapping source and target works again 2014-05-08 14:18:03 +00:00
hallgren
fbe9bb69b1 Wide Coverage Demo Web App: bug fix: restore lost quality indications after switching target languages 2014-05-08 14:05:07 +00:00
hallgren
b7bd866237 Wide Coverage Demo App: show all Phrasebook translations
Also improve behaviour for languages that are missing in Phrasebook (Chinese).
Also update the initial set of languages in the menus to match Translate11.pgf.
2014-05-07 23:42:05 +00:00
hallgren
0fe6a11773 Wide Coverage Web Demo: fix bug introduced in previous patch
Word-for-word translations were shown in the wrong language after switching
traget language.
2014-04-29 19:09:24 +00:00
hallgren
8b4e13ea84 Wide Coverage Demo App: translate to all available target langauges at once
This means that the new translation is available instantly when switching
target languages. It can also reduce space leaks problems in the server
somewhat by avoiding repeated parsing of the source text.
2014-04-29 16:01:57 +00:00
hallgren
3fd6dc90f9 Wide Coverage Demo web app: more client side caching
For example, you can now reorder paragraphs by cut & paste, without causing
anything to be sent to the server for re-translation.

Also some color & layout tweaks.
2014-04-17 13:48:00 +00:00
hallgren
d2f48f8156 Wide Coverage Demo App: show a word-for-word translation if all else fails 2014-04-16 15:37:09 +00:00
hallgren
9f3235c29f Simple Translator: use colors to indicate translation quality 2014-04-11 15:00:15 +00:00
hallgren
62903443f0 Wide Coverage Demo App: it now works ok without server caching of parse results 2014-04-10 15:50:34 +00:00
aarne
0525c7837a improved generation of BNC dictionaries ; now called TopDictionary for clarity 2014-04-10 13:07:05 +00:00
hallgren
37c473a559 Wide Coverage Demo App: new buttons: to switch colors on/off & to try Google Translate 2014-04-09 20:51:31 +00:00
hallgren
17cf501d4c Wide Coverage Demo App: use PGF service lexing/unlexing
It is now enough to make one server call per translation, and the results can
cached by the browser.
2014-04-09 19:49:45 +00:00
hallgren
02b57c3f79 Wide Coverage Demo App updates
+ Add Clear button.
+ Use localstorage to remember entered text between visits.
+ Add a link to it on the GF cloud service start page.
2014-04-09 13:59:35 +00:00
hallgren
0341fd035f PGF web service: add lexer support
The PGF web API commands parse, translate, translategroup, c-parse and
c-translate now support a lexer parameter. Possible values are "text",
"code" and "mixed".

This is used in the Wide Coverage Demo App to save one server roundtrip.
2014-04-08 16:10:33 +00:00
hallgren
4f2bd4aa5f Wide Coverage Demo App: remove quality markers ("+" or "*") before unlexing
Otherwise the first word won't be capitalized.
2014-04-08 13:46:57 +00:00
hallgren
581a0336a5 Wide Coverage Demo App: restore swap button 2014-04-08 11:32:54 +00:00
hallgren
620f30d187 Wide Coverage Demo Web App: add segmentation
Click on sentences to choose among alternative translations.
2014-04-07 12:51:13 +00:00
hallgren
72c4527767 Wide coverage demo app: show an error message even if the error string is empty 2014-04-06 23:44:31 +00:00
hallgren
ceb6de1561 Wide coverage demo app: show an error message if linearization fails 2014-04-06 23:13:18 +00:00
hallgren
703f61313c Wide Coverage Translation Web App: redesigned user interface
The layout now resembles a certain other online translation service.
The translation is started automatically after text is entered, no need to
press the Translate button.
2014-04-04 12:52:41 +00:00
hallgren
e365329716 Slightly more informative error messages in translation web apps 2014-04-04 12:33:31 +00:00
hallgren
713012001c Wide coverage demo web app: green translations from Phrasebook.pgf
The demo web app now show translations from Phrasebook.pgf in green before
translations from Translate8.pgf, which can be yellow or red.
2014-03-31 15:28:14 +00:00
hallgren
75011c8efa Wide coverage demo web app improvements
+ Adapt language selection menus to the languages supported by the grammar.
+ Add translation quality colors to the links to alternative translations.
+ Also added more country codes in langcode.js (needed for speech synthesis
  voice selection).
2014-03-28 14:56:56 +00:00
hallgren
d46bdda103 Wide coverage demo web app: translation quality feedback with colors
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.
2014-03-27 15:11:02 +00:00
hallgren
a229c539e9 Wide coverage demo web app: add speech synthesis
Works in Safari and Chrome.
2014-03-17 15:59:43 +00:00
hallgren
3712b2a2c0 Wide coverage demo web app: add link to Google Translate 2014-02-19 14:17:49 +00:00