summaryrefslogtreecommitdiff
path: root/src/server
AgeCommit message (Collapse)Author
2017-09-04eliminate modules PGF.Lexing, PGF.LexingAGreek. Make PGF.Utilities an ↵Krasimir Angelov
internal module in the runtime. These are not really part of the core runtime.
2017-08-31the C runtime now supports the same customizations for GraphViz as the ↵Krasimir Angelov
Haskell runtime
2017-08-11A couple of fixes for GHC 8.2.1 compatibilityThomas Hallgren
2017-05-10PGFService.hs: fix problem when compiling without C run-time supporthallgren
The previous patch introduced an indentation problem in the code that is used when compiling without C run-time support.
2017-05-05PGFService: add CncLabels support to command=deptreehallgren
CncLabels are read from a file in the same directory as the PGF file and with the same name as the concrete syntax + extension .labels, e.g. ResourceDemo.pgf would use labels from ResouceDemo.labels (abslabels) ResouceDemoEng.labels (clclabels)
2017-04-06vd command now reads local concrete configurations to deal with syncat ↵aarne
words; TODO: dissolve clustered multiwords bound with +
2017-02-21Fix compilation errors caused by changes in PGF2hallgren
These prevented GF from being built with C run-time support (-fc-runtime).
2016-06-17PGFService: fix a type ambiguity when compiling without C run-time supporthallgren
The function listCaches returns an empty list instead of the contents of the cached C run-time system PGFs when compiled without C-run-time support This gave rise to an ambiguity in GF.Server.
2016-06-09PGF service & minibar: only show dependency diagrams if the labels are knownhallgren
+ The PGF service now reads and caches dependency label configuration files. + The grammar info returned by command=grammar has a new boolean field 'hasDependencyLabels' to indicate if dependency labels were found for the grammar. Also, command=deptree will now fail if no labels are present. + The minibar only shows word dependency trees if labels are present. + Also changed the type of getDepLabels from [String] -> Labels to String -> Labels, since all uses were in the form "getDepLabels . lines".
2016-06-09PGFService: eleminate warning "Defined but not used: ‘serverError’"hallgren
2016-06-08PGF web service: switch to the new SVG rendering of word dependency treeshallgren
Also added the function outputText in CGIUtils.
2016-05-26PGFService.hs: fix compilation problem when C run-time support is omittedhallgren
2016-05-26PGF web service: add command=deptreehallgren
This is the web interface to PGF.graphvizDependencyTree. Accepted parameters: format=<output_format>, to=<lang>, tree=<tree>. Accepted output formats: latex, conll, malt_tab, malt_input, png, gif, svg, gv Also, label information is taken from <path>.labels if present, where <path>.pgf is the path to the PGF file.
2016-05-11the Literals API in Haskell no longer offers the sentence as an argument to ↵krasimir
the callbacks. It is just as easy to save the sentence in a closure and by doing that we save the repeated round about from C to Haskell strings
2015-11-04prepared visualize_parse for showing dependency labelsaarne
2015-08-28Comment out some dead code found with -fwarn-unused-bindshallgren
Also fixed some warnings and tightened some imports
2015-07-21PGF web service: option to leave &+ uninterpreted in linearized outputhallgren
By adding unlexer=none (or unlexer=id) in requests that output linearizations (e.g. command=linearize, command=translate), you can leave &+ uninterpreted instead of gluing the adjacent tokens. This means that the output is left in a format that can be parsed in a subsequent request. To implement this consistently, the function linearizeAndBind was replaced with the function linearizedAndUnlex (but there are a couple of requests that do not call this function...) Note that this applies to the Haskell run-time requests only. The C run-time request (c-linearize, c-translate) always applies the &+ token and the c-parse request can parse input containing glued tokens.
2015-04-17gf -server: include grammar modification time in the info returned by /version hallgren
2015-04-17PGF web service: add command c-linearizeAll to obtain all variantshallgren
Implemented by calling the recently added function PGF2.linearizeAll.
2015-03-24PGF Service: add an option to return syntax trees in JSON formathallgren
The parse/translate/c-parse/c-translate commands now recognize the option jsontree=true to augment the returned JSON structure with a field called "jsontree" next to the field "tree", or "jsontrees" next to "trees", containing the the returned syntax tree in JSON format (the same format returned by the abstrjson command, similar to the format returned in the "brackets" field).
2015-03-19PGF service: add commands c-abstrtree and c-parsetreehallgren
These are the C runtime variants of the absttree and parsetree commands. They work in the same way, but support fewer rendering options.
2015-02-25PGFService: make the restriction on parallelism more effectivehallgren
Restrict the entire request handler instead of just the call to the C parser.
2015-02-24PGFService.hs: text lexer: slightly smarter decapitalization of the first ↵hallgren
word of a sentence Keep the first letter in upper case if it is followed by more upper case letters. (Also remove some left over debugging output.)
2015-02-20PGF Service: limit the number of parallel calls to the C run-time parse ↵hallgren
function to 4 by default The limit can be changed with the -j flag
2015-02-16Changes for compatibility with ghc-7.10-rc2hallgren
2 modules: Name clashes caused by Applicative-Monad change in Prelude 2 modules: Ambiguities caused by Foldable/Traversable in Prelude 2 modules: Backwards incompatible changes in time-1.5 for defaultTimeLocale 9 modules: {-# LANGUAGE FlexibleContexts #-} (because GHC checks inferred types now, in addition to explicitly given type signatures) Also silenced warnings about tab characters in source files.
2015-01-21PGF2 & PGFService: enable callbacks for named entities and chunks in the ↵hallgren
c-parse & c-translate web requests
2015-01-20PGF2 & PGFService: work in progress on callbacks for nerc & chunkshallgren
2014-09-03gf.cabal, gf-server.cabal: add version bounds on network & httpd-shedhallgren
* httpd-shed-0.4 does not specify an upper bound on network, but it fails to build against network>=2.6. This is fixed in httpd-shed-0.4.0.2. * With network-2.6, the Network.URI modules is moved to a separate package, so for the time being GF requires network>=2.3 && <2.6. This is compatible with the four most recent versions of the Haskell Platform.
2014-09-02src/server: refactoring to isolate dependencies on the cgi/fastcgi packageshallgren
* Introducing the module CGI, re-exporting a subset of the cgi package. It might complete replace the cgi package in the future. * Introducing the module CGIUtils, containing functions from FastCGIUtils that have nothing to do with fastcgi. Some low level hackery with unsafePerformIO and global variables was left in FastCGIUtils, but it is actually not used, neither for gf -server nor exec/pgf-fcgi.hs.
2014-07-21PGF service: expire PGFs from the cache when they have been unused for 24 hourshallgren
...to keep memory use down on the server.
2014-07-15src/server/gf-server.cabal: update dependencieshallgren
2014-07-15PGF Web Service: include entire completion in full modejohn.j.camilleri
When using full=yes in the web service 'complete' command, you now get an additional field 'seq' with the longest possible completion. So, given: lin f1 = ss "the" ; f2 = ss ("the red house" | "the real deal") ; and trying to complete on input "th", you get: [ { "from": "TestCnc", "brackets": { "cat": "_", "fid": 0, "index": 0, "fun": "_", "children": [] }, "text": "th", "completions": [ { "token": "the", "funs": [ { "fun": "f1", "hyps": [], "cat": "C", "seq": "the" }, { "fun": "f2", "hyps": [], "cat": "C", "seq": "the red house" }, { "fun": "f2", "hyps": [], "cat": "C", "seq": "the real deal" } ] } ] } ]
2014-07-11PGF web service: Return additional completion info with 'full' flagjohn
BETA! The 'complete' command now has a new flag 'full' which when set returns additional info about completions. Without 'full' flag (default): [ { "from": "PhrasebookEng", "brackets": { "cat": "_", "fid": 0, "index": 0, "fun": "_", "children": [ { "token": "the" } ] }, "text": "su", "completions": [ "supermarket", "suspect" ] } ] With full=true or full=yes: [ { "from": "PhrasebookEng", "brackets": { "cat": "_", "fid": 0, "index": 0, "fun": "_", "children": [ { "token": "the" } ] }, "text": "su", "completions": [ { "token": "supermarket", "funs": [ { "fid": 421, "fun": "Supermarket", "hyps": [], "cat": "PlaceKind" } ] }, { "token": "suspect", "funs": [ { "fid": 445, "fun": "Suspect", "hyps": [], "cat": "Property" } ] } ] } ]
2014-06-20PGF Service: return error code 404 (not found) instead of 500 (internal ↵hallgren
server error) for missing grammars
2014-06-20PGF Service, command=grammar: include the last modified time of the grammar ↵hallgren
in the output
2014-05-12gf -server: include list of loaded PGFs in version infohallgren
2014-05-08PGF web api, command c-wordforword: re-enable parsing of individual wordshallgren
The space leak in the Haskell binding to the C parser has been fixed.
2014-04-29PGF web api, command c-wordforword: don't repeat parsing/morpho analysis for ↵hallgren
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-28Spring cleaninghallgren
Nothing major...
2014-04-16PGF web API: adding the command c-wordforwordhallgren
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-15PGF web API: add commands lookupmorpho and c-lookupmorphohallgren
2014-04-10PGF web service: disable caching of parse resultshallgren
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-09PGF web service: add unlexers and enable client side cachinghallgren
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-09PGF Service: a bit more clever lexer=texthallgren
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-08Fix build problem in PGFService.hs when configured without c-runtimehallgren
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-04PGFService.hs: adapt to changes in the Haskell binding to the C run-time systemhallgren
Parse errors used to cause crashes, but they are now handled and reported.
2014-03-19gf -server: add a command to manually flush the PGF cachehallgren
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-12Fix typo in PGFService: "incomlete"john.j.camilleri
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)