Questions tagged [gf]

GF, Grammatical Framework, is a programming language for multilingual grammar applications.

GF, Grammatical Framework, is a programming language for multilingual grammar applications. It is

  • a special-purpose language for grammars, like YACC, Bison, Happy, BNFC, but not restricted to programming languages
  • a functional language, like Haskell, Lisp, OCaml, Scheme, SML, but specialized to grammar writing
  • a natural language processing framework, like LKB, XLE, Regulus, but based on functional programming and type theory
  • a categorial grammar formalism, like ACG, CCG, but different and equipped with different tools
  • a logical framework, like Agda, Coq, Isabelle, but equipped with concrete syntax in addition to logic

http://www.grammaticalframework.org/

45 questions
1
vote
1 answer

Proper names with determiners in GF

I'm trying to generate the following sentence in GF: Jack wants to listen to a Taylor song But as I can see in RGL PN -> NP is the only solution to get a proper name. How to get GF to output a proper noun with a determiner and an object. Also I'm…
1
vote
1 answer

Extending Determiners in GF

I asked a question earlier about extending the which_RP record, and changing the relative clause "that" to "which" under this question here. Recently I started working on the Italian language, and whenever I use the function someSg_Det or somePl_Det…
1
vote
1 answer

Applying Predef.eqStr: Expected a value of type string

I was trying to write an operation that takes an undetermined amount of parameters, so if a user chooses not to fill one of the parameters then the operator changes its functionality. oper gen_NP = overload{ gen_NP : N -> NP = …
1
vote
2 answers

Constant not found: overload in GF

I was trying to make an overload of function that I have created on GF, but after using the overload function I keep getting this error message. Am I using this function of GF incorrectly or is there is any new update to this functionality. Here is…
1
vote
1 answer

How to get the plural of a noun in GF

In some situations when a user wants only the plural of a noun such as: mkN("apple"); What is the best practice to get the machine to print out the result apples instead of printing the whole set apple apple's apples apples'.
1
vote
1 answer

Double quotation marks

I am trying to allow double quotation marks into my grammar's functions. I was hoping that I could use Haskell conventions to generate something like: > mkSentence "This is \"just\" a sentence" > This is "just" a sentence However, when I try this…
ppski
  • 41
  • 4
1
vote
1 answer

GF fails to output prepositions in some situations

I wrote many different sentences on GF which contain prepositions in them, but I find out in some situations GF output doesn't contain the preposition I had defined in the sentence such in the following program. Don't really know the reason behind…
1
vote
1 answer

adding (|) functionality to determiner on GF

On GF writing sentences' tree often encounter many options where multiple prepositions could be used in the same tree such as Download it on my phone Download it to my phone Download it onto my phone ... and the list goes on and on. this kind of…
1
vote
1 answer

adding the -ing suffix to RGL on GF

The English language has compound verbs which adding direct (ing) to them is not correct such as adding ing to "turn on" -> RGL -> ParadigmsEng -> verbalN -> "turn onning" obviously what has been done above is not correct, so I tried to emerge a…
1
vote
1 answer

about prep doesn't exist in GF

"He was talking about his last night." In the previous sentence, the preposition is about, but this preposition exists neither under the prep syntax nor under the English language Morphology in RGL as shown below. Is there is a reason for this or…
1
vote
1 answer

Writing in the form of "One of XXX (plural)" in GF

I'm trying to generate the sentence One of my friends on GF using the GF library. I failed at finding the right method for constructing a prep after a numeral and on creating the relation of one of with the plural noun. as the class of Noun Phrase…
0
votes
1 answer

How to build V + NP + Prep + AP in Grammatical Framework RGL?

I’m trying to represent, using the RGL, the German sentence “sie hält mich für intelligent” ‘she considers me intelligent’, literally “she holds me for intelligent”. How do I represent “to hold X for Y” as some kind of V-whatever from which I can…
0
votes
1 answer

Achieving restricted polymorphism from concrete file

Let's say I want to write a code that greets people, but for some reason, I don't want to greet a person called John, and I want GF to generate this kind of sentence. Abstract Version I knew that this kind of result is achievable from the abstract…
0
votes
1 answer

Python: Where do I find packages like "gf" for the Anaconda Navigator and how do I install them? Python Version 3.6

this is my first question here;-) I am using Python 3.6 via Anaconda Navigator (1.7) and that program shows a list of packages when I click Environments. Are these packages directly useable or do I have to start any process therefor? In a script I…
0
votes
1 answer

Parse error on input,while compiling read File, process it and write result to another File code in Haskell

When I compile below code in Haskell, I get following error: Error: parse error on input 'gr' in the line x module Main where import PGF import System.Environment import System.IO main :: IO () main = do file:_ <- getArgs gr <- readPGF…
mohammad
  • 90
  • 2
  • 12
1 2
3