summaryrefslogtreecommitdiff
path: root/src/www/js/gftranslate.js
AgeCommit message (Collapse)Author
2016-06-17Wide Coverage Translation Demo: switch to App16.pgf (adds Russian)john.j.camilleri
2015-11-27Wide coverage translation demo: updated to use App15.pgfhallgren
2015-04-16Wide Coverage Translation Demo: length limit test uses # of source chars nowhallgren
The length limit test previously used the URL-encoded UTF-8 representation of the source sentense. This was needed because of a fixed size buffer in C. Now that the server is in Haskell, the only reason the length is limited is to avoid excessive time and space use in the parser, so it is better to count source characters. This also avoids being too restrictive with non-European languages.
2015-04-09Wide coverage translation demo: show an informative error message for ↵hallgren
sentences that exceed the length limit
2015-03-24Wide Coverage Translation Demo: zoomable panable collapsible syntax treeshallgren
This is an experimental solution using JavaScript code from https://github.com/christos-c/tree-viewer, d3js.org and jquery.com.
2015-03-22Wide Coverage Translation Demo: add a way to obtain inflection tableshallgren
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-02-20gftransate.js: increase sentence length limit for "fast" language to 500hallgren
Currently Bul, Chi, Eng and Swe are marked as "fast" in the documentation.
2015-02-20gftranslate.js: reduce sentense length limit to 200 (URL encoded) charactershallgren
This limit might still be to high to avoid excessive time/space use in the parser for certain languages in the wide coverage translation grammar.
2015-02-18Wide Coverage Translation Demo: use App14.pgf, remove spaces from Chi, Jpn ↵hallgren
and Tha output
2015-01-21Wide Coverage Translation Demo: use App13.pgf, adding support for Japanesehallgren
Japanese uses the same lexer as Chinese, i.e. every character is a separate token.
2014-12-03Wide Coverage Translation Demo web app: updated to use App12.pgfhallgren
2014-09-09Wide Coverage Demo web app: use the App grammar instead of the Translate grammarhallgren
This gives faster but slightly lower quality translations.
2014-06-20Cloud service & apps: better error handling in wide coverage translationhallgren
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-05-08Wide Coverage Demo Web App: bug fix: restore lost quality indications after ↵hallgren
switching target languages
2014-05-07Wide Coverage Demo App: show all Phrasebook translationshallgren
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-04-29Wide Coverage Demo App: translate to all available target langauges at oncehallgren
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-16Wide Coverage Demo App: show a word-for-word translation if all else failshallgren
2014-04-11gftranslate.js: switch to Translate11.pgfhallgren
2014-04-11Wide Coverage Demo App (gftranslate.js): use a special lexer for Chinese.hallgren
2014-04-11Simple Translator: use colors to indicate translation qualityhallgren
2014-04-09Wide Coverage Demo App: use PGF service lexing/unlexinghallgren
It is now enough to make one server call per translation, and the results can cached by the browser.
2014-04-08PGF web service: add lexer supporthallgren
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-06gftranslate.js: use Translate10.pgfhallgren
2014-04-04gftranslate.js: increase length limit from 200 to 500 encoded byteshallgren
2014-03-28Wide coverage demo web app improvementshallgren
+ 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-27support.js & gftranslate.js: improved handling of server errorshallgren
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-02-11Work on web api & apps based on the C run-time systemhallgren
+ 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-01-21simple translator: Replaced 'GF Robust Parser' with 'GF Wide Coverage ↵hallgren
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.