Giter Club home page Giter Club logo

antfarm's Introduction

Build Status

About

Antfarm is a referring expression generator for use in generating dictionary definitions, such as this fragment below (referring expressions highlighted):

“A sister chromatid is detached from another sister chromatid resulting in two chromosomes at a kinetochore

Referring expression generation is a subtask in natural language geeration. The basic goal is to find a way of referring to objects that both helps the other part to know which object you are referring to, and which at the same time makes for reasonably fluent expressions. Antfarm is not a general purpose referring expression generator; it was written to support our particular use case of generating dictionary definitions. So instead of identifying salient properties of an object in some shared world (eg. colour, size, etc); we instead rely on identifying the object by its type, its number, and tracking how often it's been mentioned.

Antfarm is meant to be used in conjunction with other natural language generation components. We, for example, combine it with the surface realiser GenI to produce complete sentences which have referring expressions in them.

Antfarm in action

It is meant to be used as a library, but we included a small demonstrator program to help show what it's supposed to do

A referring expression can have any number of like objects

$ antfarm a1
an ant

$ antfarm a1 a2
two ants

It can also contain different kinds of objects

$ antfarm a1 b1
an ant and a box

$ antfarm a1 a2 b1
two ants and a box

We can also keep track of whether or not you have referred to something before, so if you have more than one referring expression…

$ antfarm a1
an ant

$ antfarm a1, a1
an ant, the ant

$ antfarm a1 a2, a1 a2
two ants, the ants

But if you refer to a different object(s)…

$ antfarm a1, a2
an ant, another ant

$ antfarm a1, a2 a3
an ant, another two ants

You can also provide cardinality constraints instead of referring to specific objects

$ antfarm a ge 3
at least three ants

$ antfarm a eq 3
exactly three ants

Or provide both constraints and instances of objects

$ antfarm a le 3
at most three ants

$ antfarm a1 a le 3
between one and three ants

$ antfarm a1 a le 3, a1 a le 3
between one and three ants, the same ants

Or just refer to the class of objects itself (eg. “ants like sugar”)

$ antfarm a
ants

Or tell apart different individual objects in the order you mentioned them

$ antfarm a42 b59, a8, a90, a42, a90 b59
an ant and a box, another ant, a third ant, the first ant, the third ant and the box

Or (recursively) provide examples of objects

$ antfarm 'A ge 2 (M eq 2 o1)'
at least two animals (exactly two mammals, an owl)

$ antfarm 'A ge 2 (M eq 2 (d1 c2) o1)'
at least two animals (exactly two mammals (a dog, a cat), an owl)

antfarm's People

Contributors

drdub avatar kowey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

drbean drdub

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.