Skip to content

chantera/coordgen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coordgen

This is an implementation of "Coordination Generation via Synchronized Text-Infilling".

Install

To install this package:

pip install git+https://github.com/chantera/coordgen.git@main#egg=coordgen

Example

The code below is an example using CoordinationGenerator.

from coordgen.models import AutoModelForCoordinationGeneration

model = AutoModelForCoordinationGeneration.from_pretrained("t5-small")

raw = "Gold will retain its gain, he said."
span = (10, 25)  # => `retain its gain`

for text, coord in model.generate([(raw, span)]):
    print(text, coord)

About

Coordination Generation via Synchronized Text-Infilling

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages