Commit Graph

308 Commits

Author SHA1 Message Date
hallgren
93ba5b7b37 minibar: include the grammar's last modification in the grammar info shown by the "i" button
Also bumped version number in gf.cabal to 3.6-darcs.
Also removed some unecessary use of CPP.
2014-06-24 13:59:09 +00:00
hallgren
7f1521dbc5 Polished and renamed release notes to release-3.6.t2t
Also added an example use of lookupmorpho to gf-web-api-examples.html.
2014-06-21 13:02: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
f2d60380c6 gf-cloud-api.html: fix a broken link
Thanks to Dana Dannells.
2014-06-17 08:45:13 +00:00
hallgren
104fa03676 Simple Translator: fall back to word-for-word translation if the parser fails
Same as in the Wide Coverage demo app.
2014-05-15 13:58:42 +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
7bd028919e Simple Translator: remove extra space before punctuation 2014-04-28 12:07:41 +00:00
hallgren
54a77ee7d9 Simple Translator: remove punctuation before wide coverage translation
This gives better translations with Translate11.pgf and is how the Wide
Coverage Demo App works.
2014-04-24 11:28:15 +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
93d14368b2 gftranslate.js: switch to Translate11.pgf 2014-04-11 20:08:12 +00:00
hallgren
43319eb0b7 Wide Coverage Demo App (gftranslate.js): use a special lexer for Chinese. 2014-04-11 18:39:12 +00:00
hallgren
9f3235c29f Simple Translator: use colors to indicate translation quality 2014-04-11 15:00:15 +00:00
hallgren
77586aa080 Simple Translator: Use PGF API for (un)lexing instead of separate server calls
Also,

  + Get up to 10 (instead of 5) alternative robust translations.
  + Remove duplicates from list of alternative robust translations
  + Add GF Cloud logo to the simple translator page
2014-04-11 12:10:05 +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
739dc3f29d localstorage.js: bug fix
If you stored "false" and tried to retrieve it with a default value, you got
the default value instead of "false".
2014-04-09 20:49:53 +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
0721769935 gftranslate.js: use Translate10.pgf 2014-04-06 19:59:04 +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
8677d799c8 gftranslate.js: increase length limit from 200 to 500 encoded bytes 2014-04-04 12:39:36 +00:00
hallgren
6f513bce44 Simple Translator: show more alternatives when using GF robust translation
The maximum number of alternatives shown has been increased from 2 to 5
although it can slow down translation.
2014-04-04 12:35:20 +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
94bf87add9 support.js & gftranslate.js: improved handling of server errors
In support.js, the functions http_get_json, ajax_http_get_json
and ajax_http_post_json now calls the supplied error callback if the server
returns invalid JSON (e.g. because of a crash).

The function gftranslate.translate in gftranslate.js returns
a JSON value containing an error message (since it doesn't have an error
callback).

This should result in fewer situations where "nothing happens" and the user
doesn't know if it is beacuse the server is slow, or if there was an error.
2014-03-27 15:02:27 +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
cb9222a20c support.js: For better error handling, always use AJAX, don't fallback to JSONP
Cross-origin requests are allowed by the PGF service and are supported in
all modern browsers.
See http://en.wikipedia.org/wiki/Cross-origin_resource_sharing
2014-03-12 14:07:35 +00:00
hallgren
3712b2a2c0 Wide coverage demo web app: add link to Google Translate 2014-02-19 14:17:49 +00:00
hallgren
800bdcaa37 src/www/js/langcode.js: functions for converting language codes
factored out from src/www/translator/translator.js
2014-02-19 14:15:14 +00:00
hallgren
286c5a035a Wide coverage demo: show up to 10 translations
The translations are loaded one at a time so you don't have to wait for all
10 to see the first one.
2014-02-12 16:08:18 +00:00
hallgren
15bf881e45 Work on web api & apps based on the C run-time system
+ PGFService.hs: add command c-grammar, include probability in parse results
+ js/gftranslation.js: add start position and limit parameters, return more
  info to applications
+ Simple Translator: show two wide coverage translations
+ Wide coverage demo: show parse tree and probability (intended as grammar
  debugging aids)
2014-02-11 16:43:29 +00:00
hallgren
f1c4b353e3 Wide coverage translation web demo improvements
+ Add lexing/unlexing
+ Add a button to swap input and output
+ Minor layout adjustments
2014-01-28 16:51:21 +00:00
hallgren
7cf6391ee1 simple translator: Replaced 'GF Robust Parser' with 'GF Wide Coverage Translation'
The interface to the wide coverage translation is in js/gftranslate.js
and it assumes that the grammar is installed on the cloud server
as /robust/Translate8.pgf.

The list of supported languages is hardwired in gftranslate.js, since
there is no support for obtaining this info from the C run-time system
at the moment.
2014-01-21 16:47:23 +00:00
hallgren
ec82c3af9a gfse: re-enable example-based grammar construction 2013-11-14 12:54:25 +00:00
hallgren
09e64e92e4 minibar: fix a mistake the previous bracket fix 2013-11-06 16:54:21 +00:00
hallgren
dcbe3533d0 minibar: adapt to changed bracket structure in linearization output 2013-11-06 16:45:24 +00:00