Commit Graph

7110 Commits

Author SHA1 Message Date
hallgren
c58649bd29 Removed imports of TypeCheck.Concrete, fixed problems in TypeCheck.RConcrete
+ The current type checker for concrete syntax is in
  GF.Compile.TypeCheck.RConcrete, but GF.Compile.TypeCheck.Concrete was
  still imported in GFI.

+ Fixed a bug that allowed Ints n as a subtype of Ints m, regardless of
  m and n. It now requires n<=m. Note: the type checker still allows Int
  as a subtype of Ints m, regardless of m.

+ Fixed a potential efficiency problem with large record types, by reducing
  the number of recursive calls from |R|*|S| to |R| when checking if R<=S.

+ Fixed a misleading comment: "alpha g t u" checks that u is a subtype of t,
  the other way around. Similarly, "checkIfEqLType gr g t u trm" checks that
  u is a subtype of t, not the other way around, and not that t is equal to u.
2014-04-04 13:51:07 +00:00
hallgren
8986541160 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
5cc0f39520 gftranslate.js: increase length limit from 200 to 500 encoded bytes 2014-04-04 12:39:36 +00:00
hallgren
6cbd1a753c 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
9ceadecf89 Slightly more informative error messages in translation web apps 2014-04-04 12:33:31 +00:00
hallgren
4018073bdb PGFService.hs: adapt to changes in the Haskell binding to the C run-time system
Parse errors used to cause crashes, but they are now handled and reported.
2014-04-04 12:28:00 +00:00
kr.angelov
bd892b8a1d fix the haskell binding to handle parse errors 2014-04-04 11:46:40 +00:00
aarne
dafaef7fec AdvS added to app 2014-04-04 07:30:06 +00:00
aarne
1af3bb65b4 text in app help 2014-04-04 07:28:55 +00:00
kr.angelov
67debbd8c3 now the output from the speech recognizer is editable with the keyboard 2014-04-04 09:04:00 +00:00
kr.angelov
2f6ee53ff6 add activity_help.xml 2014-04-04 07:51:05 +00:00
kr.angelov
2834d0b44d add the forgoten HelpActivity.java 2014-04-04 07:48:50 +00:00
kr.angelov
587b02a63b add touch feedback to the two buttons in the app 2014-04-03 20:30:23 +00:00
kr.angelov
3f99060252 added help view in the android app. The help itself is not very useful right now 2014-04-03 14:22:44 +00:00
kr.angelov
6a8f271ba5 GFTranslator to DGTranslator in a few more places 2014-04-03 14:06:26 +00:00
kr.angelov
ba5e918b69 remove the old android icon 2014-04-03 14:02:50 +00:00
kr.angelov
b7283ade9c change the project name to DGTranslator 2014-04-03 13:48:08 +00:00
kr.angelov
7a319e0794 a new icon and a new name for the DG Translator 2014-04-03 13:44:14 +00:00
aarne
942808bc84 added AdvVP and AdVVP to App 2014-04-03 07:25:57 +00:00
kr.angelov
e6f9143c63 bugfix in the keyboard translation 2014-04-03 06:14:15 +00:00
aarne
cae40d2b0e Android app sources in examples/app - read README for advice 2014-04-02 21:34:40 +00:00
kr.angelov
0a8034c008 fix in the keyboard XMLs 2014-04-02 20:05:16 +00:00
kr.angelov
b3ba3d3c1c initial binding to Prolog for the C runtime 2014-04-02 10:03:19 +00:00
aarne
d4cbadb6ad use chunking before morpho lookup in backup parsing ; show results with unknown linearizations in darkest red 2014-04-01 16:24:35 +00:00
hallgren
23c9a042cb Bug fix for pattern macros in pre{}
This bug was introduced sometime between 2013-08-21 and 2013-11-01 and caused
the function convertTerm in GF.Compile.GeneratePMCFG to encounter a EPatt where
it expected Strs. I fixed it by applying the function getPatts (from the old
partial evaluator) to the pattern.
2014-04-01 10:54:41 +00:00
aarne
13d4e01ecb Hin and Bul keyboards in app restored 2014-03-31 19:45:41 +00:00
hallgren
57b2a2bc2c 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
aarne
2a6cbe9a46 room_N in DictionaryChi 2014-03-31 14:30:31 +00:00
hallgren
98d9946ac4 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
aarne
035d367b1f added the phrase "what time is it" in ten languages. For simplicity, this is a Greeting and not a Question, which means that it has a variant appearing with ! rather than ? , similar to "how are you". Correcting this would require analysing the structure of the phrase so that it can be constructed in QS. 2014-03-28 08:02:14 +00:00
hallgren
201283c055 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
9bfed99790 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
kr.angelov
911ae42296 small fixes in the C runtime 2014-03-25 13:57:57 +00:00
kr.angelov
51a9ef72c7 refactor the compilation of CFG and EBNF grammars. Now they are parsed by using GF.Grammar.Parser just like the ordinary GF grammars. Furthermore now GF.Speech.CFG is moved to GF.Grammar.CFG. The new module is used by both the speech conversion utils and by the compiler for CFG grammars. The parser for CFG now consumes a lot less memory and can be used with grammars with more than 4 000 000 productions. 2014-03-21 21:25:05 +00:00
kr.angelov
d816c34986 added hasLinearization method in the Python binding 2014-03-20 14:48:47 +00:00
kr.angelov
eb1aa24896 fix in the Python binding which was forgoten after a change in the C runtime 2014-03-20 14:48:02 +00:00
hallgren
b061d59044 gf -server: add a command to manually flush the PGF cache
This can be used if the cloud service seems slow, but it would probably
be better to automatically expire unused PGFs from the cache after some time.
2014-03-19 16:15:05 +00:00
aarne
cbb538e170 a darker red in translation app: dictionary lookup for each word, identity if lookup fails 2014-03-18 13:22:13 +00:00
aarne
b4a6e047e3 Hin and Ger added to android app again 2014-03-18 10:21:53 +00:00
kr.angelov
a1446b87fa whitespace cleanup in the parser 2014-03-18 10:19:35 +00:00
aarne
891ca74186 show the value in the error message when failing to get Str from value 2014-03-17 18:02:07 +00:00
hallgren
22b68ad30c Wide coverage demo web app: add speech synthesis
Works in Safari and Chrome.
2014-03-17 15:59:43 +00:00
hallgren
825e0cf7cf doc/Logos/gf1.svg: variant of the GF logo with a subtle shadow 2014-03-13 14:50:30 +00:00
kr.angelov
7dd5748fa8 bugfix in the compiler for linref of empty record 2014-03-15 11:33:54 +00:00
aarne
55e2bfb9eb bg in android app 2014-03-14 15:00:33 +00:00
aarne
7899bb8cbe moved the small app chunking grammars from lib/src/experimental to examples/translator; the proper place might be in the git contributions, but this can be decided later 2014-03-14 13:28:42 +00:00
aarne
566df8e4ae Spanish in android app 2014-03-14 09:45:46 +00:00
aarne
c1c37a65e6 AppIta, with a small lexicon 2014-03-13 13:27:51 +00:00
hallgren
f6c7094955 GF home page: news item about Digital Grammars 2014-03-13 13:15:43 +00:00
aarne
f12aed25ca App ported to Fre 2014-03-13 11:12:34 +00:00