1
0
forked from GitHub/gf-core
Commit Graph

285 Commits

Author SHA1 Message Date
krangelov
733fdac755 restore the sequence ordering after -optimize-pgf 2020-03-15 19:57:47 +01:00
aarneranta
6f2b1a83b7 fixed a vd bug that sometimes erased the root label 2019-11-13 11:40:37 +01:00
aarneranta
d3b501d35f fixed the problem with generating several roots in ud2gf. Now only the leftmost word becomes ROOT, the others become dep - which can be eliminated by cnclabels. This works fine for e.g. English prepositional and particle verbs. But it does not work if the 'main' word is not the leftmost one 2019-11-12 17:46:55 +01:00
Aarne Ranta
b3387e80e4 hiding morphological tags from Latex printing of dependency trees 2019-03-20 22:19:32 +01:00
Thomas Hallgren
fc5c2b5a22 PGF.Haskell.fromStr: fix double spaces caused by empty tokens 2019-01-23 02:45:23 +01:00
Prasanth Kolachina
0accd97691 add CoNLLU as output format for gf2ud: merging issue (#24) 2019-01-07 13:24:49 +01:00
Prasanth Kolachina
f8bd35543c Merge pull request #24 from odanoburu/gf2ud-comments
(gf2ud) add comments to CoNLL-U output
2019-01-07 13:18:45 +01:00
Krasimir Angelov
260c0d07e0 revert to printing the unique id in ppBracketedString 2018-12-20 10:54:04 +01:00
Krasimir Angelov
26dabeab9b save the original concrete category in BracketedString 2018-12-20 10:52:45 +01:00
odanoburu
f7c2fb8a7d (gf2ud) add comments to CoNLL-U output
when debbuging labels, I find it useful to have comments saying what's
the original sentence (lazy, I know) and the original tree (depending
on the treebank, the trees can be similar).

I know this is not the goal exactly, but UDv2 treebanks
(http://universaldependencies.org/format.html) should always have a
'text =' comment, and a 'sent_id =' comment (which would be easy to
implement too, but not that useful).
2018-12-19 12:13:31 -02:00
Aarne Ranta
54204d2d95 added the possibility to annotate features of syncat words, e.g. @"is" PresSg3 2018-12-18 18:44:02 +01:00
Aarne Ranta
9834b89a30 refactored cnc configfile parsing a bit 2018-12-18 18:30:40 +01:00
Aarne Ranta
77c0a8e100 Merge branch 'master' into master 2018-12-18 19:05:42 +02:00
Prasanth Kolachina
86233e9c28 morph. feat generation by AR 2018-12-18 16:53:35 +01:00
Aarne Ranta
40e7544a2b added morphological tags to UD tree output. Tags are give in CncConfiguration, e.g. @N Sg Pl. Default tag is Cat-offset, as defined for each Cat in pgf 2018-12-18 15:59:48 +01:00
Prasanth Kolachina
61c1510620 allow comments in dependency configs and fix conll output 2018-12-17 12:02:13 +01:00
Aarne Ranta
831252eb81 dealing with ',' as syncategorematic token 2018-12-01 09:32:22 +01:00
Peter Ljunglöf
4d34c7f66b Fix deprecations from containers >= 0.4.0.0
E.g. `foldWithKey` has been deprecated since 0.4.0.0 (November 2010)[1] and has been removed in 0.6.0.1 (2018)[2]

[1]: https://github.com/haskell/containers/blob/master/changelog.md#0400--nov-2010
[2]: https://github.com/haskell/containers/blob/master/changelog.md#death-of-deprecated-functions

(commit originally by @fredefox)
2018-11-30 11:52:56 +01:00
Aarne Ranta
c6ec8cf302 fixed a bug in the cnclabel format 2018-11-28 19:56:47 +01:00
John J. Camilleri
397f18a298 remove custom-binary flag; update Cabal version restriction; bump version to 3.10 2018-11-28 13:36:11 +01:00
Frederik Hanghøj Iversen
6b2c2256d1 A version of readPGF where the user handles the IO. 2018-08-06 16:05:12 +02:00
John J. Camilleri
636a8142b4 Minimal update with new repo URLs & build instructions 2018-07-26 01:37:03 +02:00
Prasanth Kolachina
6faad1b3cf add bracketLinearizeAll for variants 2018-05-24 09:47:27 +02:00
Thomas Hallgren
820d2d503f Fixes for GHC 8.4.1 compatibility
* In GHC 8.4.1, the operator <> has become a method of the Semigroup class
  and is exported from the Prelude. This is unfortunate, since <> is also
  exported from the standard library module Text.PrettyPrint, so in any
  module that defines a pretty printer, there is likely to be an ambiguity.

  This affects ~18 modules in GF. Solution:

    import Prelude hiding (<>)

  This works also in older versions of GHC, since GHC does't complain if
  you hide something that doesn't exists.

* In GHC 8.4.1, Semigroup has become a superclass of Monoid. This means
  that anywhere you define an instance of the Monoid class you also have to
  define an instance in the Semigroup class.

  This affects Data.Binary.Builder in GF. Solution: conditionally define
  a Semigroup instance if compiling with base>=4.11 (ghc>=8.4.1)
2018-04-18 19:18:10 +02:00
Krasimir Angelov
a7926835a3 bugfix for random generation with HOAS 2017-12-19 10:47:30 +01:00
Krasimir Angelov
ebe7cb3b73 A new function called "completions" is added in the Haskell runtime and used in PGFService. This makes the extraction of completions more platform independent 2017-09-06 15:17:28 +02:00
Krasimir Angelov
01a8e1b88f GF.Command.TreeOperations is now independent from the runtime's internals 2017-09-05 10:29:02 +02:00
Krasimir Angelov
13d8045814 added exprSize and exprFunctions in the Haskell runtime too and use them in TreeOperations 2017-09-05 10:16:48 +02:00
Krasimir Angelov
1f908fa7bf eliminate modules PGF.Lexing, PGF.LexingAGreek. Make PGF.Utilities an internal module in the runtime. These are not really part of the core runtime. 2017-09-04 11:43:37 +02:00
Krasimir Angelov
cae52bb9af added a separate cabal file for the Haskell runtime 2017-09-04 09:57:25 +02:00
Krasimir Angelov
4fe9f88128 move the custom Binary package back to src/runtime/haskell 2017-09-04 09:55:17 +02:00
Krasimir Angelov
bbdbf2bc5d silence Tab warnings in the Haskell runtime 2017-09-01 14:31:08 +02:00
Krasimir Angelov
b7b7a7c91c the embedded grammars now work with both the pure Haskell and the Haskell binding API 2017-08-29 18:44:50 +02:00
Krasimir Angelov
00388039f1 a nicer pretty printing for the PGF format 2017-08-22 21:13:21 +02:00
Krasimir Angelov
0a3b822313 ????
Merge branch 'master' of www.grammaticalframework.org:/usr/local/www/GF
2017-08-18 21:27:40 +02:00
Krasimir Angelov
1f3c9d0b17 the parser is not forced to respect the linref while parsing discontious phrases 2017-08-18 21:23:58 +02:00
Thomas Hallgren
0a0eaa01bc Bump version requirements to base>=4.6, Cabal>=1.20
Cabal>=1.20 allows control over parallelism when compiling grammars from
Setup.hs and WebSetup.hs.

base>=4.6 allows conditional compilation with CPP to be eliminated from
a few modules.

base-4.6 corresponds to GHC 7.6.3, which is what you get in
Debian 8 (aka jessie, aka oldstable) from 2015.
2017-08-18 11:55:44 +02:00
Thomas Hallgren
a0e7e3bf83 A couple of fixes for GHC 8.2.1 compatibility 2017-08-11 10:07:43 +02:00
aarne
9e206496a7 handling combination of &+ and &| 2017-06-02 06:11:44 +00:00
aarne
d1eb0aa657 handling capitalization (&|) in unlexer -bind 2017-06-02 06:06:57 +00:00
aarne
b789f90da9 separated syncat multiwords in dep tree generation ; added function wildcards to concrete annotatations (see for instance english/LangEng.labels) 2017-04-06 15:40:44 +00:00
aarne
ee2f3d085e vd command now reads local concrete configurations to deal with syncat words; TODO: dissolve clustered multiwords bound with + 2017-04-06 11:55:21 +00:00
krasimir
20a038719f added generateOntology & generateOntologyDepth 2017-04-05 11:08:31 +00:00
aarne
630b9d7b1e added a default value in dependency visualization for cases using maximum, to cover the case where the list of arcs is empty 2016-06-15 10:37:00 +00:00
hallgren
096b4cfcee PGF service & minibar: only show dependency diagrams if the labels are known
+ 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-09 13:12:14 +00:00
hallgren
c9ea17d293 PGF.VisualizeTree: add white background in the SVG rendering of dependency trees
This makes them look the same as SVG produced by graphviz
2016-06-08 19:08:29 +00:00
hallgren
8dfdee1e9a PGF.VisualizeTree: add SVG renderering of word dependency trees
This was done by introducing an intermediate representation for the LaTeX
pictures produced by the LaTeX renderer and providing a new backend that
outputs SVG instead of LaTeX.
2016-06-08 17:49:15 +00:00
aarne
4fea4ace7b vd latex: some adjustments in heights and lengths 2016-06-03 16:06:22 +00:00
aarne
f5e2c41dd0 vd: arc heights now depend on number of arcs below rather than word distance 2016-06-02 18:17:54 +00:00
hallgren
389e6b8816 Add haddock documentation to PGF.graphvizDependencyTree and PGF.getDepLabels
They seemed very difficult to use without the documentation, since their
types are not particularly self documenting.

Also documented what the (Bool,Bool) argument to PGF.graphvizAbstractTree
is for.
2016-05-26 13:12:38 +00:00