Skip to content

Software and datasets for the PhD thesis "From Logic to Language: Natural Language Generation from Logical Forms"

Notifications You must be signed in to change notification settings

valeriobasile/unboxer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unboxer

Software and datasets for the PhD thesis "From Logic to Language: Natural Language Generation from Logical Forms"

Surface Realization

The code that implements the surface realization algorithm by composition from Chapter 3 is in src/unboxer/drx2txt.py

It can be used as a Python module:

parser = DRGParser()
parser.parse_tup_lines(LDRG_FILE)
print (unbox(parser.drg))

LDRG_FILE is a file containing a Lexicalized Discourse Representation Graph as output by Boxer. An example is in the file examples/example.ldrg. There is a helper script in src/gold2surface.py that reads an LDRG from the standard input and prints out the generated surface form:

cat examples/example.ldrg | src/gold2surface.py

About

Software and datasets for the PhD thesis "From Logic to Language: Natural Language Generation from Logical Forms"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages