| Age | Commit message (Collapse) | Author |
|
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.
|
|
Otherwise the first word won't be capitalized.
|
|
|
|
Click on sentences to choose among alternative translations.
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
The demo web app now show translations from Phrasebook.pgf in green before
translations from Translate8.pgf, which can be yellow or red.
|
|
+ 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).
|
|
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.
|
|
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.
|
|
Works in Safari and Chrome.
|
|
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
|
|
|
|
factored out from src/www/translator/translator.js
|
|
+ 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)
|
|
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.
|
|
Return the given default value instead.
|
|
The C run-time responds badly to input that is too long, so we return an
error message here instead.
The limit is 200 URL-encoded characters.
|
|
|
|
|
|
When starting from the minibar, the selected set of target languages is now
preserved when switching back and forth.
|
|
Factored out from the Simple Translation Tool.
|
|
Work in progress on preserving the start category and selected target languages
when switching between the minibar and the syntax editor.
|
|
A common interface to localStorage, to store JSON data under a unique prefix.
|
|
|
|
- separate tree edit buttons from option buttons
- fix bug when wrapping on freshly imported ast
- add interface for import & export of ast
- cleaner internal implementation of Editor.add_refinement
- small style updates
|
|
Also move the functions title and attr from editor/editor.js to js/support.js.
Also mention recent changes in minibar/about.html.
|
|
|
|
instead of GET, to avoid the Apache httpd URI length limitation.
This means that gfse can no longer use JSONP when parsing grammars, so it
has to be located on the same host as the cloud service.
Also clean away trailing white space in support.js.
|
|
|
|
|
|
|
|
Created the folder js and moved minibar/support.js and minibar/pgf_online.js
there, to emphasize their status as app independent support libraries.
There are probably more files that should be moved here.
The cloud apps have been updated, externally hosted apps that link directly
to our server need to be updated too.
|