Commit Graph
100 Commits
Author SHA1 Message Date
hallgren 0715cfe2ae 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 23ec403402 Adjust the release date on the home page 2014-06-23 13:33:38 +00:00
hallgren e3e2227dfe Final updates of the download page for the 3.6 release
+ Describe which features are included in the different binary packages.
+ Describe the new MINGW package.
2014-06-23 13:30:33 +00:00
hallgren 89eb3fd60a Update web pages and bump version number to 3.6! 2014-06-21 18:29:29 +00:00
hallgren cfbd152a39 doc/gf-developers.t2t: made the C run-time section a bit more informative 2014-06-23 13:28:10 +00:00
hallgren 3cba76592e release-3.6.t2t: just a couple of more fixes.
Sorry.
2014-06-21 18:25:52 +00:00
hallgren f66440a1e7 release-3.6.t2t: fix broken link 2014-06-21 18:17:00 +00:00
hallgren cba51a97ab release-3.6.t2t: fix a formatting problem 2014-06-21 18:12:47 +00:00
hallgren 03274b76d3 debian/changelog: updated for the release of GF 3.6 2014-06-21 17:10:24 +00:00
hallgren 5a39637bcd build-binary-dist.sh: include a ghc package configuration file
as an experiment
2014-06-21 16:32:10 +00:00
hallgren 38f28da6c1 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 58156369fa The --output-dir option now applies also to PGF files 2014-06-21 12:26:56 +00:00
hallgren fc4c8b0058 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 9eb6557376 PGF Service: return error code 404 (not found) instead of 500 (internal server error) for missing grammars 2014-06-20 17:28:02 +00:00
hallgren ef20e8cbac PGF Service, command=grammar: include the last modified time of the grammar in the output 2014-06-20 10:34:51 +00:00
hallgren fb922b65c1 css/style0.css: like css/style.css but without changing the default table style 2014-06-19 17:42:37 +00:00
hallgren e7f9ad2a98 Demo page: fix the link to the android app 2014-06-19 17:05:21 +00:00
hallgren e10ab227ef Demo page: add links to the wide coverage translation page and the android app 2014-06-19 17:00:23 +00:00
hallgren 660de6e1da WebSetup.hs: PhrasebookLav works again 2014-06-19 16:58:33 +00:00
hallgren f743217a54 debian/rules: a hack to put the python binding in the right directory
The setup.py script puts it under site-packages, but python only looks under
dist-packages...
Also some minor changes for 'make deb' in Makefile
2014-06-19 15:45:55 +00:00
hallgren 5b325659f8 debian/rules: fix bug that prevented the Python binding from being included 2014-06-19 13:39:03 +00:00
hallgren b49b6236d0 Update the GF shell reference manual 2014-06-19 10:58:35 +00:00
hallgren ceb4beeb84 runtime/c/setup.sh: use make -j to speed up compilation
The configuration script takes significantly longer to run than the compilation
of all the C code, which is a hint that is in need of a major simplification.
2014-06-19 09:26:44 +00:00
hallgren 2feb552925 Include the Python binding to the C run-time system in Debian packages 2014-06-19 00:43:53 +00:00
hallgren f3c8adcc59 WebSetup.hs: skip PhrasebookLav for now 2014-06-19 00:20:31 +00:00
hallgren a21a782e47 Compile example grammars during the build phase instead of the install phase
This allows more errors to be detected by the build bot.
TODO: fix the gf --output-dir flag, which does not seem to change where PGF
file are put.
2014-06-18 23:57:45 +00:00
hallgren 65b064fe82 build-binary-dist.sh: updated to include the Python binding to the C run-time
There are also some changes in src/runtime/python/setyp.py to support this.
2014-06-18 16:09:46 +00:00
hallgren c1eb47a67a gf.cabal: add a maintainer field 2014-06-17 20:55:13 +00:00
hallgren 12994a3ec4 Some updates to the GF 3.6 download page and release notes 2014-06-17 20:25:58 +00:00
hallgren 050d435278 Compute/ConcreteNew.hs: eliminate selections from wildcard tables
This patch also includes some commented out code that was used to search for
the source of code size explosions and an eta expansion bug.
2014-06-17 14:47:55 +00:00
hallgren 6f8e52c944 doc/gf-developers.t2t: quick note on how to compile the C run-time system
Also a few other minor updates.
2014-06-17 14:17:59 +00:00
hallgren 1668eb17e5 build-binary-dist.sh: updated to include the C runtime system in binary tarballs
Also moved it to the bin directory.
Run it with 'bash bin/build-binary-dish.sh'.
2014-06-17 13:56:59 +00:00
hallgren f435966bf3 Setup.hs: System.Cmd is deprecated, import System.Process instead 2014-06-17 13:27:14 +00:00
hallgren dd2be5c75a gf-cloud-api.html: fix a broken link
Thanks to Dana Dannells.
2014-06-17 08:45:13 +00:00
hallgren 9944916127 src/runtime/c/setup.sh: executable version of INSTALL, used from debian/rules 2014-06-16 23:28:12 +00:00
hallgren 6c40e0ac37 debian/rules: include the C run-time system when building .deb packages 2014-06-16 20:12:44 +00:00
hallgren d6252d1c16 PGF library: expose only PGF and PGF.Internal instead of all modules
PGF exports the public, stable API.
PGF.Internal exports additional things needed in the GF compiler & shell,
including the nonstardard version of Data.Binary.
2014-06-12 14:43:18 +00:00
hallgren 352ecb7eb8 New GF home page: trying blue page title and tagline instead of red 2014-06-12 12:29:35 +00:00
hallgren 63c9dcd207 new.html: a proposed new look for the GF home page 2014-06-11 13:32:31 +00:00
hallgren 84b7a56fb2 Updating the release notes and installation instructions for the next release 2014-06-10 22:12:48 +00:00
hallgren 26aecdb4d3 PGF2.hsc: use throwIO instead of throw
From the documentation: the throwIO variant should be used in preference to
throw to raise an exception within the IO monad because it guarantees ordering
with respect to other IO operations, whereas throw does not.

Also removed some unused imports.
2014-06-10 12:42:01 +00:00
hallgren 1bba23991f Compute/ConcreteNew.hs: adding a Prawitz rewrite
(table { p_i => t_i } ! x).l ==> table { p_i => t_i.l } ! x

This was used in the old partial evaluator and can significantly reduce term
sizes in some cases.
2014-05-16 21:27:20 +00:00
hallgren 307795f385 Fix an eta expansion bug in the grammar compiler
Eta expansion is applied between partial evaluation and PMCFG generation.
The buggy version generated type incorrect terms, but PMCFG generation
apparently worked anyway.
2014-05-16 14:10:07 +00:00
hallgren e9b5b8b094 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 121afca05a Haskell binding: free memory pool to avoid space leak when readPGF fails 2014-05-13 14:07:36 +00:00
hallgren 7c9ff164bf gf -server: include list of loaded PGFs in version info 2014-05-12 13:45:36 +00:00
hallgren 12a8e113c2 examples/phrasebook/Makefile2: add Chinese
Also remove arguments to raise the stack size, GF's built-in default is big
enough now.
2014-05-09 13:07:02 +00:00
hallgren 1fbe17aabe Wide Coverage Demo Web App: bug fix: swapping source and target works again 2014-05-08 14:18:03 +00:00
hallgren 6f6e9096e8 Wide Coverage Demo Web App: bug fix: restore lost quality indications after switching target languages 2014-05-08 14:05:07 +00:00
hallgren 8d9816ee98 PGF web api, command c-wordforword: re-enable parsing of individual words
The space leak in the Haskell binding to the C parser has been fixed.
2014-05-08 11:38:41 +00:00
hallgren fc6d8f6362 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 70b192594e pgf-shell.hs: fix compilation problem with GHC 7.4 2014-05-07 17:06:34 +00:00
hallgren 04e7bdb6fe Two improvements in the pgf-shell example
1. Like pgf-translate, it now shows one result at a time, press Enter to get
   more results.
2. You can load a new grammar with the command 'i <path-to-pgf>'
2014-05-07 16:37:28 +00:00
hallgren bd80c3c201 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 580b8cc783 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 a7b1f9e1b3 PGF web api, command c-wordforword: don't repeat parsing/morpho analysis for each target language
Also omit attemts to parse individual words for now, to avoid space leaks in
the Haskell binding to the C parser.
2014-04-29 15:51:46 +00:00
hallgren 2721f7358f Spring cleaning
Nothing major...
2014-04-28 13:56:20 +00:00
hallgren b5fd7d88c1 Simple Translator: remove extra space before punctuation 2014-04-28 12:07:41 +00:00
hallgren e891e99725 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 e3ff79d49c Some work on the download page and release notes for the next release of GF
Please add things you think are imporant to mention to the release notes!
2014-04-22 14:45:37 +00:00
hallgren 570a417615 gf.cabal: require base>=4.3
This makes it explicit that we no longer support compiling GF with GHC 6.12
(which is 4 years old and comes with base-4.2).
2014-04-22 14:38:33 +00:00
hallgren a2c25e88d4 gf.cabal: add GF builtin default -K64M. Enable parallel compile with ghc>=7.8
+ Programs compiled with ghc<7.8 have a default built-in 8M stack size limit.
  With ghc>7.0 this built-in default can be changed, so it is now 64M, allowing
  GF to work with larger grammars without manually increasing the stack size.
  (But if GF is compiled with ghc 6.12, the built-in default is still 8M.)

+ Enable ghc>=7.8 support for compiling modules in parallel, to speed up the
  compilation of GF.
2014-04-22 12:43:24 +00:00
hallgren 0e21bcde22 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 5cb5cdd31e Wide Coverage Demo App: show a word-for-word translation if all else fails 2014-04-16 15:37:09 +00:00
hallgren dd96c8a2c6 PGF web API: adding the command c-wordforword
It has the same parameters and result format as c-translate, but it does
the translation word for word. (To be used as a last resort).
2014-04-16 15:24:23 +00:00
hallgren 7fc3627c6e PGF web API: add commands lookupmorpho and c-lookupmorpho 2014-04-15 14:50:38 +00:00
hallgren 2ea326a83e gftranslate.js: switch to Translate11.pgf 2014-04-11 20:08:12 +00:00
hallgren ba825ae81a Wide Coverage Demo App (gftranslate.js): use a special lexer for Chinese. 2014-04-11 18:39:12 +00:00
hallgren 6601a3972e Simple Translator: use colors to indicate translation quality 2014-04-11 15:00:15 +00:00
hallgren ea389df58e 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 4008a2b111 PGF web service: disable caching of parse results
Caching parse results uses a lot of memory, even if they expire after
2 minutes, so it won't scale up to many simultaneous users.

But some excessive memory use seems to be caused by space leaks in
(the Haskell binding to) the C run-time system, and these should be fixed.
For example, flushing the PGF cache does not release the memory allocated
by the C run-time system when loading a PGF file.
2014-04-10 15:55:33 +00:00
hallgren 5f75baf56a Wide Coverage Demo App: it now works ok without server caching of parse results 2014-04-10 15:50:34 +00:00
hallgren d19e6d9d07 Wide Coverage Demo App: new buttons: to switch colors on/off & to try Google Translate 2014-04-09 20:51:31 +00:00
hallgren 402cccc3ca 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 96f36d8f0a 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 d1da0e06de PGF web service: add unlexers and enable client side caching
Most PGF web API commands that produce linearizations now accept an
unlexer parameter. Possible values are "text", "code" and "mixed".

The web service now include Date and Last-Modified headers in the HTTP,
responses. This means that browsers can treat responses as static content and
cache them, so it becomes less critical to cache parse results in the server.

Also did some cleanup in PGFService.hs, e.g. removed a couple of functions
that can now be imported from PGF.Lexing instead.
2014-04-09 17:51:25 +00:00
hallgren 50ea3d265c Change the type of PGF.Lexing.bindTok to [String] -> [String]
The old type was [String] -> String. This function was only used
in GF.Text.Lexing.stringOp, which now uses (unwords . bindTok) instead,
with no change in behaviour.
2014-04-09 17:39:21 +00:00
hallgren 677d849840 Unlexers: move capitalization of first word from GF.Text.Lexing to PGF.Lexing
The capitalization of the first word was done in GF.Text.Lexing.stringOp,
but is now done in the functions unlexText and unlexMixed in PGF.Lexing.
These functions are only used in stringOp and in PGFService (where the change
is needed), so the subtle change in behaviour should not cause any bugs.
2014-04-09 17:26:23 +00:00
hallgren 04a6260eea PGF Service: a bit more clever lexer=text
Only change the first word to lowercase if the original input is not found in
the grammar's morphology. This allows parsing of sentenses starting with "I" in 
English, nouns in German and proper names in other languages, but it can make
the wrong choice for multi-words.
2014-04-09 14:13:18 +00:00
hallgren 4479bb81b7 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 622ab0b44c Fix build problem in PGFService.hs when configured without c-runtime 2014-04-08 20:45:54 +00:00
hallgren 29efca71cb 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 9cac98a356 Move basic lexing functions from GF.Text.Lexing to the new module PGF.Lexing
They are thus part of the PGF Run-Time Library, making it possible to add
lexing functionality in PGF service in a natural way.
2014-04-08 14:07:49 +00:00
hallgren 936f3d8297 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 64623d4881 Wide Coverage Demo App: restore swap button 2014-04-08 11:32:54 +00:00
hallgren c8a8883df8 demos/translation.t2t: more space for the demo app 2014-04-07 13:01:00 +00:00
hallgren 5868118ea9 Wide Coverage Demo Web App: add segmentation
Click on sentences to choose among alternative translations.
2014-04-07 12:51:13 +00:00
hallgren a0adabb3a1 Wide coverage demo app: show an error message even if the error string is empty 2014-04-06 23:44:31 +00:00
hallgren ea67953012 Wide coverage demo app: show an error message if linearization fails 2014-04-06 23:13:18 +00:00
hallgren 5344d42536 gftranslate.js: use Translate10.pgf 2014-04-06 19:59:04 +00:00
hallgren d6d056034b TypeCheck.RConcrete: contravariance in table types 2014-04-04 16:50:12 +00:00
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
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
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
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