NLP for CP
Addressing Constraint Programming with Natural Language Processing
Home
Resources
Publications
Correct
predictions are in
blue
. If we detect only a subset of a labelled sentence, we highlight the caught part as
blue
, the missing part
light blue.
False positives
are in
green
and
false negatives
are in
red
.
Problem Farm_Planning — Constraint detection
A
farmer
wishes
to
plan
production
on
his
200
acre
farm
over
the
next
five
years
.
At
present
,
he
has
a
herd
of
120
cows
.
This
is
made
up
of
20
heifers
and
100
milk-producing
cows
.
Each
heifer
needs
2/3
acre
to
support
it
and
each
dairy
cow
1
acre
.
A
dairy
cow
produces
an
average
of
1.1
calves
per
year
.
Half
of
these
calves
will
be
bullocks
,
which
are
sold
almost
immediately
for
an
average
of
pounds
30
each
.
The
remaining
heifers
can
be
either
sold
almost
immediately
for
pounds
40
or
reared
to
become
milk-producing
cows
at
two
years
old
.
It
is
intended
that
all
dairy
cows
be
sold
at
12
years
old
for
an
average
of
pounds
120
each
,
although
there
will
probably
be
an
annual
loss
of
5
%
per
year
among
heifers
and
2
%
among
dairy
cows
.
At
present
,
there
are
10
cows
each
aged
from
newborn
to
11
years
old
.
The
decision
of
how
many
heifers
to
sell
in
the
current
year
has
already
been
taken
and
implemented
.
The
milk
from
a
cow
yields
an
annual
revenue
of
pounds
370
.
A
maximum
of
130
cows
can
be
housed
at
the
present
time
;
to
provide
accommodation
for
each
cow
beyond
this
number
will
entail
a
capital
outlay
of
pounds
200
per
cow
.
Each
milk-producing
cow
requires
0.6
tons
of
grain
and
0.7
tons
of
sugar
beet
per
year
.
Grain
and
sugar
beet
can
both
be
grown
on
the
farm
.
Each
acre
yields
1.5
tons
of
sugar
beet
.
Only
80
acres
are
suitable
for
growing
grain
;
they
can
be
divided
into
four
groups
whose
yields
are
given
in
a
table
.
Grain
can
be
bought
for
pounds
90
per
ton
and
sold
for
pounds
75
per
ton
.
Sugar
beet
can
be
bought
for
pounds
70
per
ton
and
sold
for
pounds
58
per
ton
.
The
labour
requirements
are
given
in
a
table
.
Other
costs
are
given
in
a
table
.
Labour
costs
for
the
farm
are
at
present
pounds
4000
per
year
and
provide
5500
h
labour
.
Any
labour
needed
above
this
will
cost
pounds
1.20
per
hour
.
How
should
the
farmer
operate
over
the
next
five
years
to
maximise
profit
?
Any
capital
expenditure
would
be
financed
by
a
10-year
loan
at
15
%
annual
interest
.
The
interest
and
capital
repayment
would
be
paid
in
10
equally
sized
yearly
instalments
.
In
no
year
can
the
cash
flow
be
negative
.
Finally
,
the
farmer
would
neither
wish
to
reduce
the
total
number
of
dairy
cows
at
the
end
of
the
five-year
period
by
more
than
50
%
nor
wish
to
increase
the
number
by
more
than
75
%
.
Problem Farm_Planning — Detection of the decisions and objects to be modeled
A
farmer
wishes
to
plan
production
on
his
200
acre
farm
over
the
next
five
years
.
At
present
,
he
has
a
herd
of
120
cows
.
This
is
made
up
of
20
heifers
and
100
milk-producing
cows
.
Each
heifer
needs
2/3
acre
to
support
it
and
each
dairy
cow
1
acre
.
A
dairy
cow
produces
an
average
of
1.1
calves
per
year
.
Half
of
these
calves
will
be
bullocks
,
which
are
sold
almost
immediately
for
an
average
of
pounds
30
each
.
The
remaining
heifers
can
be
either
sold
almost
immediately
for
pounds
40
or
reared
to
become
milk-producing
cows
at
two
years
old
.
It
is
intended
that
all
dairy
cows
be
sold
at
12
years
old
for
an
average
of
pounds
120
each
,
although
there
will
probably
be
an
annual
loss
of
5
%
per
year
among
heifers
and
2
%
among
dairy
cows
.
At
present
,
there
are
10
cows
each
aged
from
newborn
to
11
years
old
.
The
decision
of
how
many
heifers
to
sell
in
the
current
year
has
already
been
taken
and
implemented
.
The
milk
from
a
cow
yields
an
annual
revenue
of
pounds
370
.
A
maximum
of
130
cows
can
be
housed
at
the
present
time
;
to
provide
accommodation
for
each
cow
beyond
this
number
will
entail
a
capital
outlay
of
pounds
200
per
cow
.
Each
milk-producing
cow
requires
0.6
tons
of
grain
and
0.7
tons
of
sugar
beet
per
year
.
Grain
and
sugar
beet
can
both
be
grown
on
the
farm
.
Each
acre
yields
1.5
tons
of
sugar
beet
.
Only
80
acres
are
suitable
for
growing
grain
;
they
can
be
divided
into
four
groups
whose
yields
are
given
in
a
table
.
Grain
can
be
bought
for
pounds
90
per
ton
and
sold
for
pounds
75
per
ton
.
Sugar
beet
can
be
bought
for
pounds
70
per
ton
and
sold
for
pounds
58
per
ton
.
The
labour
requirements
are
given
in
a
table
.
Other
costs
are
given
in
a
table
.
Labour
costs
for
the
farm
are
at
present
pounds
4000
per
year
and
provide
5500
h
labour
.
Any
labour
needed
above
this
will
cost
pounds
1.20
per
hour
.
How
should
the
farmer
operate
over
the
next
five
years
to
maximise
profit
?
Any
capital
expenditure
would
be
financed
by
a
10-year
loan
at
15
%
annual
interest
.
The
interest
and
capital
repayment
would
be
paid
in
10
equally
sized
yearly
instalments
.
In
no
year
can
the
cash
flow
be
negative
.
Finally
,
the
farmer
would
neither
wish
to
reduce
the
total
number
of
dairy
cows
at
the
end
of
the
five-year
period
by
more
than
50
%
nor
wish
to
increase
the
number
by
more
than
75
%
.
Back to list