Commit Graph
100 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 b429086b2f Adjust the release date on the home page 2014-06-23 13:33:38 +00:00
hallgren 18de8c3988 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 865e818ea9 Update web pages and bump version number to 3.6! 2014-06-21 18:29:29 +00:00
hallgren 2646c40549 doc/gf-developers.t2t: made the C run-time section a bit more informative 2014-06-23 13:28:10 +00:00
hallgren 7d945def61 release-3.6.t2t: just a couple of more fixes.
Sorry.
2014-06-21 18:25:52 +00:00
hallgren ca24be7d7c release-3.6.t2t: fix broken link 2014-06-21 18:17:00 +00:00
hallgren f0ca4e4387 release-3.6.t2t: fix a formatting problem 2014-06-21 18:12:47 +00:00
hallgren e8ceba35b0 debian/changelog: updated for the release of GF 3.6 2014-06-21 17:10:24 +00:00
hallgren 7645207e6b build-binary-dist.sh: include a ghc package configuration file
as an experiment
2014-06-21 16:32:10 +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 54d081a036 The --output-dir option now applies also to PGF files 2014-06-21 12:26:56 +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 78ccefc4f4 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 fae535b4e8 PGF Service, command=grammar: include the last modified time of the grammar in the output 2014-06-20 10:34:51 +00:00
hallgren ce116459e9 css/style0.css: like css/style.css but without changing the default table style 2014-06-19 17:42:37 +00:00
hallgren fc49815f32 Demo page: fix the link to the android app 2014-06-19 17:05:21 +00:00
hallgren 42e0e1b78c Demo page: add links to the wide coverage translation page and the android app 2014-06-19 17:00:23 +00:00
hallgren af9fbed84e WebSetup.hs: PhrasebookLav works again 2014-06-19 16:58:33 +00:00
hallgren 8ba34cb652 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 b953e782f6 debian/rules: fix bug that prevented the Python binding from being included 2014-06-19 13:39:03 +00:00
hallgren a4c56fe345 Update the GF shell reference manual 2014-06-19 10:58:35 +00:00
hallgren c2e17662b7 lib/tests/french/bescherelle: rename files containing non-ASCII characters 2014-06-19 10:43:07 +00:00
hallgren 158519624e 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 e9869da5e2 Include the Python binding to the C run-time system in Debian packages 2014-06-19 00:43:53 +00:00
hallgren c293812c79 WebSetup.hs: skip PhrasebookLav for now 2014-06-19 00:20:31 +00:00
hallgren 131ef1f444 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 7b1ad9de51 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 12210ebb61 Fix like_Subj in translator/DictionarySwe.gf 2014-06-18 12:12:45 +00:00
hallgren 99321ad0d3 gf.cabal: add a maintainer field 2014-06-17 20:55:13 +00:00
hallgren 24975e4935 Some updates to the GF 3.6 download page and release notes 2014-06-17 20:25:58 +00:00
hallgren bfac5faac1 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 b78751d50a 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 45a719f1c3 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 e783712fde Setup.hs: System.Cmd is deprecated, import System.Process instead 2014-06-17 13:27:14 +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 bbeca32a43 src/runtime/c/setup.sh: executable version of INSTALL, used from debian/rules 2014-06-16 23:28:12 +00:00
hallgren 7cc07b755b debian/rules: include the C run-time system when building .deb packages 2014-06-16 20:12:44 +00:00
hallgren 767a0768fe Merge Estonian v1.0.0-alpha from Kaarel Kaljurand 2014-06-16 13:58:04 +00:00
hallgren f739841497 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 577d73abfb New GF home page: trying blue page title and tagline instead of red 2014-06-12 12:29:35 +00:00
hallgren 033e42dbbd new.html: a proposed new look for the GF home page 2014-06-11 13:32:31 +00:00
hallgren 8a5289c921 Updating the release notes and installation instructions for the next release 2014-06-10 22:12:48 +00:00
hallgren bc0249b501 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 861a3fa805 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 f78570dabd 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 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 33af15e803 Haskell binding: free memory pool to avoid space leak when readPGF fails 2014-05-13 14:07:36 +00:00
hallgren 108d546db8 translator/DictionarySwe.gf: add a few nouns and adverbs 2014-05-13 13:32:53 +00:00
hallgren 3c110cbe8d gf -server: include list of loaded PGFs in version info 2014-05-12 13:45:36 +00:00
hallgren 186e3effba 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 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 2a774e946b 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 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 b3d92a1378 pgf-shell.hs: fix compilation problem with GHC 7.4 2014-05-07 17:06:34 +00:00
hallgren 7c88b7935f 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 b7478a8252 translator/DictionarySwe: add panic_V 2014-05-07 13:01:26 +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 d37c25990e 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 05c70fdc41 Spring cleaning
Nothing major...
2014-04-28 13:56:20 +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 f7a64de783 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 9135f93e51 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 1a1ca2f618 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 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 0c04bdb4b9 translator/DictionarySwe.gf: fix learn_V
Copied from LexiconSwe.gf.

Also a small fix in lib/src/Makefile.
2014-04-17 13:15:23 +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 5c79b1d8bd 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 210f28ca4b PGF web API: add commands lookupmorpho and c-lookupmorpho 2014-04-15 14:50:38 +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 923107506f 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 62903443f0 Wide Coverage Demo App: it now works ok without server caching of parse results 2014-04-10 15:50:34 +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 43e61a1e3b 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 f2cc1d2c68 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 0d1ad2f0e5 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 1602eab5b6 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 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 5d4b849b14 Fix build problem in PGFService.hs when configured without c-runtime 2014-04-08 20:45:54 +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 cf34ee8890 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 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 9f3e9d8626 demos/translation.t2t: more space for the demo app 2014-04-07 13:01:00 +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 5d36c4734d Fixes for compiling Translate10.pgf 2014-04-04 19:04:16 +00:00
hallgren 3fa7b3e04b 149 new words in DictinarySwe.gf (mostly geographical names) 2014-04-04 19:02:42 +00:00
hallgren 0ae79efdbf TypeCheck.RConcrete: contravariance in table types 2014-04-04 16:50:12 +00:00
hallgren 15f0edae32 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