Commit Graph

49 Commits

Author SHA1 Message Date
hallgren
ba03db58a4 pgf-service: add Jordis transfer function for OpenMath LaTeX output 2011-08-23 16:25:00 +00:00
hallgren
cf9f1057ed pgf service: external service hook: always format the output as a JSON string 2011-08-22 16:10:56 +00:00
hallgren
d8d80693db pgf service: added a hook for external services
This is really reinventing CGI, people should learn how to write CGI scripts
instead...
TODO: better handling of temporary files
2011-08-22 15:34:44 +00:00
hallgren
e1385da050 gf-server: make pgf-service work the Apache mod_fastcgi
pgf-service now appears to works with Apache mod_fastcgi (under Mac OS X) in
addition to lighttpd.

One difference appears to be that while lighttpd passes the name of the PGF
file in the SCRIPT_FILENAME variable, Apache passes it in PATH_TRANSLATED.
But perhaps this depends on exactly how the fastcgi service is configured.
The following is what I added to the Apache configuration file to test this:

	<Directory /Library/WebServer/Documents/fcgi-bin>
	  SetHandler fastcgi-script
	  Options +ExecCGI
	</Directory>
	Action pgf-service /fcgi-bin/pgf-service
	AddHandler pgf-service .pgf
2011-06-21 15:49:31 +00:00
krasimir
42ad2d5e95 the user can now upload their own grammars in the editor 2011-03-07 21:05:29 +00:00
hallgren
72d2d9b204 Split pgf-server into pgf-fcgi and pgf-http.
The dependency on the fastcgi package made pgf-server difficult to compile, so
it is now split into

  - pgf-fgci (main module in pgf-fcgi.hs), which is built only if fastcgi is
    already installed or if you turn on the fastcgi flag (e.g. by doing
    'cabal install -f fastcgi').

  - pgf-http (main module in pgf-http.hs) which is always built (and hopefully
    has no problematic dependencies.) 

The modules FastCGIUtils and PGFService no longer depend on fastcgi.
2010-11-26 14:30:51 +00:00
hallgren
75ad59b121 pgf-server: more useful JSON output from lineraizeAll
Example:

Request: http://www.grammaticalframework.org:41296/grammars/Quiz.pgf?command=linearizeAll&tree=Run+YouPl

Response: [{"to":"QuizEng","texts":["you run"]},
           {"to":"QuizSwe","texts":["ni l??per","ni springer"]}]

Compared to the old command linearize:

Request: http://www.grammaticalframework.org:41296/grammars/Quiz.pgf?command=linearize&tree=Run+YouPl'

Response: [{"to":"QuizEng","text":"you run"},
           {"to":"QuizSwe","text":"ni l??per"}]
2010-11-25 18:30:30 +00:00
aarne
6734572aaf linearizeAll in PGFService 2010-11-24 21:17:29 +00:00
hallgren
61837063a1 Make PGFService.hs compile again
+ PGFService.hs: add Nothing arguments in calls to PGF.parse_ and
  PGF.getPArseOutput
+ gf-server.cabal: mark content-server as not buildable, since required source
  files are missing.
2010-11-09 15:08:37 +00:00
krasimir
cecf94d729 the PGF service now can do both random and exhaustive generation. these functions now return both the generated tree and its linearization 2010-10-13 12:32:49 +00:00
krasimir
cb8795c222 refactor the API for random generation again. Now PGF contains probabilities in the abstract syntax 2010-10-02 13:03:57 +00:00
krasimir
c200232bfd update PGFService to work after the extensions in the random generation API 2010-09-30 07:35:54 +00:00
hallgren
daa726d742 Bug fix: add missing error handler for statically served files in pgf-server HTTP mode 2010-09-02 13:54:16 +00:00
hallgren
ac23280320 Standalone HTTP version of pgf-server
pgf-server can now act as a standalone HTTP server. To activate this mode,
start it with

	pfg-server http

to use the default port number (41296), or give an explicit port number, e.g.,

	pgf-server http 8080

The HTTP server serves PGF files in the same way as the old FastCGI interface.
In addition, it also serves static files. The document root for static files
is the www subdirectory of the current directory where pgf-server is started.

In spite of these addition, backwards compatibility is maintaned. The old
FastCGI interface continues to work as before. (It is activated when
pgf-server is started without arguments.)
2010-09-01 14:08:52 +00:00
krasimir
b0e110cf4f native representation for HOAS in PMCFG and incremental type checking of the parse forest 2010-08-09 10:10:08 +00:00
krasimir
d3a6866277 more advanced complete function in the PGFService 2010-08-24 15:58:22 +00:00
krasimir
98c22ef92b bugfix in the PGF browser 2010-07-31 16:04:15 +00:00
krasimir
6a1dbd0a53 the PGF service now generates samples of the syntax in the browsing information 2010-07-31 15:54:03 +00:00
krasimir
c8acc8fe11 fix: PGFService should type-check the trees that comes from the user 2010-07-31 10:45:59 +00:00
krasimir
4fdd21f127 detailed information for the type errors from PGFService 2010-07-13 15:33:54 +00:00
krasimir
027c14dcbb FridgeApp and TranslateApp now show the type errors 2010-07-08 07:57:36 +00:00
krasimir
ef4b068902 fix PGFService after the change in the parser API 2010-07-07 14:46:24 +00:00
aarne
dc00e7ea3a disambiguation in Phrasebook: show Eng instead of AST if DisambL is missing; show all alternative disambiguations for each alternative translation 2010-05-28 03:40:35 +00:00
krasimir
9e7b914c3c for backward compatibility we have the old parse function again. the old functionality is exposed by parse_ 2010-04-30 20:18:26 +00:00
krasimir
c757e914cd fix PGFService after the change in the API 2010-04-30 15:09:21 +00:00
krasimir
e3a279e457 now the PGF service communicates with Graphviz using UTF8 for the input and binary for the output 2010-04-22 14:01:08 +00:00
aarne
95d4adac99 in PGFService disambiguation, show tree if there's no disamb grammar 2010-04-04 20:45:50 +00:00
aarne
5cb147fa19 simplified the treatment of politeness in Phrasebook 2010-03-30 18:48:59 +00:00
aarne
de909a4e44 disambiguation in Phrasebook grammars, PGF server, and the GUI 2010-03-30 15:39:11 +00:00
aarne
ccac96eaa0 catching initial bind symbol in PGFServer 2010-03-28 20:32:03 +00:00
aarne
2925edd088 text-like unlexer for phrasebook web service 2010-03-26 22:08:48 +00:00
aarne
c24440d134 fixes for webdemos, including bug in StructuralIta 2010-03-26 17:38:20 +00:00
aarne
5f6f4cdea3 www api command translategroup, which uses groupResults 2010-03-22 22:04:36 +00:00
hallgren
8e344646f0 Quick fix to adapt to new version of the PGF library. 2010-03-04 18:46:18 +00:00
krasimir
991a58badb TranslateApp now have browser for abstract syntax 2009-11-29 14:51:12 +00:00
krasimir
2c54ad525e function doListGrammars in PGFService is obsolete 2009-11-26 16:27:04 +00:00
krasimir
d7fba06bda the default function of the PGFService should return list of functions as well as list of categories 2009-11-26 14:47:35 +00:00
krasimir
ba1b602053 change PGF.categories to return list of identifiers instead of types 2009-11-26 14:43:31 +00:00
krasimir
02bb6cc073 added tree visualizations in TranslateApp 2009-10-24 10:38:21 +00:00
krasimir
861e0a4c13 make the GF server to compile after that changes in the PGF runtime 2009-10-15 11:32:25 +00:00
krasimir
92bb971ea3 the grammars are now recognized by extension i.e. .pgf is grammar just like .php is a PHP script 2009-01-25 22:06:20 +00:00
krasimir
7dfc17cd98 the pgf-server is single-threaded on Windows 2009-01-25 22:04:59 +00:00
bjorn
e0572650b3 pgf server: return 1 result for /random without limit argument. 2008-12-04 13:54:43 +00:00
bjorn
93ab59dd58 pgf.fcgi: don't install any signal handlers. Since we didn't look at the variable they set, we just created zombies. 2008-11-20 15:00:53 +00:00
bjorn
f1fcee964f pgf-server: write stderr to pgf-error.log, since lighttpd closes stderr for fastcgi processes. 2008-11-04 09:28:21 +00:00
bjorn
748c695009 Added /random to pgf-server. 2008-11-04 09:09:22 +00:00
bjorn
07a0e8fe86 gf-server: complete noew sorts case-insensitive 2008-11-03 16:43:19 +00:00
bjorn
7c3021c2da gf-server: added a way to list the available pgf files 2008-10-29 20:45:18 +00:00
bjorn
55efa546a9 Rename MainFastCGI.hs to PGFService.hs. 2008-10-29 19:49:38 +00:00