| Age | Commit message (Collapse) | Author |
|
|
|
|
|
text editor interprets these things as errors (e.g. unterminated qq for list comprehension) and underlines red, even though there is no real error.
|
|
Issue 46 (various deprecations during compilation of GF)
|
|
|
|
'JSON PGF.Trie'
|
|
|
|
- added added two filtering functions: filterLongest and filterBest
- updated the PGF service to work with the new API
|
|
|
|
The userLangauge is the name of the concrete syntax that has a languageCode
that matches the user's preferred language, as reported by the web browser.
If no matching language code is found, the PGF service now sets userLanguage
to the concrete syntax for English (e.g. FoodsEng) if present, and defaults
to the first concrete syntax (e.g. FoodsAfr) only if English is not present
in the grammar.
|
|
|
|
|
|
|
|
|
|
in PGFService. This makes the extraction of completions more platform independent
|
|
the parser in the Haskell runtime. This is also reflected in all bindings.
|
|
internal module in the runtime. These are not really part of the core runtime.
|
|
Haskell runtime
|
|
The previous patch introduced an indentation problem in the code that is used
when compiling without C run-time support.
|
|
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)
|
|
words; TODO: dissolve clustered multiwords bound with +
|
|
These prevented GF from being built with C run-time support (-fc-runtime).
|
|
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.
|
|
+ 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".
|
|
|
|
Also added the function outputText in CGIUtils.
|
|
|
|
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.
|
|
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
|
|
|
|
Also fixed some warnings and tightened some imports
|
|
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.
|
|
Implemented by calling the recently added function PGF2.linearizeAll.
|
|
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).
|
|
These are the C runtime variants of the absttree and parsetree commands. They
work in the same way, but support fewer rendering options.
|
|
Restrict the entire request handler instead of just the call to the C parser.
|
|
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.)
|
|
function to 4 by default
The limit can be changed with the -j flag
|
|
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.
|
|
c-parse & c-translate web requests
|
|
|
|
* 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.
|
|
...to keep memory use down on the server.
|
|
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"
}
]
}
]
}
]
|
|
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"
}
]
}
]
}
]
|
|
server error) for missing grammars
|
|
in the output
|
|
|
|
The space leak in the Haskell binding to the C parser has been fixed.
|
|
each target language
Also omit attemts to parse individual words for now, to avoid space leaks in
the Haskell binding to the C parser.
|