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 004 (Mystery Shopper) — Constraint detection
A
well-known
cosmetic
company
wants
to
evaluate
the
performance
of
her
saleladies
,
who
station
at
the
company
's
counters
at
various
department
stores
in
different
geographical
locations
.
For
this
purpose
,
the
company
has
hired
some
secret
agents
to
disguise
as
shoppers
to
visit
the
salesladies
.
The
visits
must
be
scheduled
in
such
a
way
that
each
saleslady
must
be
visited
by
shoppers
of
different
varieties
and
that
the
visits
should
be
spaced
out
roughly
evenly
.
Also
,
shoppers
should
visit
salesladies
in
different
geographic
locations
.
The
exact
constraints
,
which
ensure
the
statistical
soundness
of
the
project
,
follow
.
There
are
totally
19
outlets
to
be
visited
.
They
are
located
in
4
geographical
regions
:
5
outlets
in
Area
1
-LRB-
outlet
1-5
-RRB-
,
5
outlets
in
Area
2
-LRB-
outlet
6-10
-RRB-
,
5
outlets
in
Area
3
-LRB-
outlet
11-15
-RRB-
,
and
4
outlets
in
Area
4
-LRB-
outlet
16-19
-RRB-
.
There
will
be
1
to
4
salesladies
in
each
outlet
.
Each
saleslady
will
be
visited
by
4
different
shoppers
.
The
frequency
of
visits
to
a
particular
outlet
will
be
the
number
of
salesladies
times
4
.
There
are
totally
35
salesladies
working
in
all
outlets
everyday
.
Therefore
,
the
total
number
of
visits
is
140
.
The
shoppers
are
divided
into
4
groups
according
to
age
,
professions
,
and
etc.
.
Each
group
has
10
shoppers
.
Therefore
,
the
total
number
of
shoppers
is
40
.
Therefore
,
in
each
group
of
shoppers
,
5
shoppers
will
perform
3
visits
and
the
other
5
shoppers
will
perform
4
visits
.
Each
shopper
should
only
visit
1
outlet
in
each
of
the
4
areas
.
All
salesladies
should
be
visited
2
times
in
the
first
2
weeks
of
fieldwork
.
The
total
fieldwork
period
will
be
4
weeks
.
Theoretically
,
each
shopper
has
to
pay
1
visit
each
week
.
However
,
shoppers
making
4
visits
must
have
done
2
visits
by
the
end
of
the
second
week
.
Shoppers
making
3
visits
should
have
done
1
or
2
visits
by
the
end
of
the
second
week
.
The
data
of
the
first
50
%
visits
will
be
analysed
and
put
in
an
interim
report
.
Listed
below
are
locations
of
the
19
outlets
and
the
number
of
salesladies
in
that
particular
outlet
-LRB-
outlets
with
*
are
boutiques
-RRB-
.
*
Outlet
1
:
2
.
Outlet
2
:
4
.
Outlet
3
:
1
.
Outlet
4
:
2
.
Outlet
5
:
1
.
Outlet
6
:
2
.
Outlet
7
:
1
.
Outlet
8
:
1
.
Outlet
9
:
1
.
*
Outlet
10
:
2
.
Outlet
11
:
2
.
Outlet
12
:
2
.
Outlet
13
:
1
.
*
Outlet
14
:
2
.
*
Outlet
15
:
1
.
Outlet
16
:
2
.
Outlet
17
:
2
.
Outlet
18
:
4
.
Outlet
19
:
2
Convention
:
shoppers
0
-
9
belong
to
group
1
,
shoppers
10
-
19
belong
to
group
2
,
shoppers
20
-
29
belong
to
group
3
,
and
shoppers
30
-
39
belong
to
group
4
.
In
each
group
,
the
first
5
shoppers
make
3
visits
and
the
remaining
5
shoppers
make
4
visits
.
For
example
,
in
group
1
,
shoppers
0
-
4
make
3
visits
and
shoppers
5
-
9
make
4
visits
.
Besides
,
for
the
salesladies
:
salesladies
0
-
1
belong
to
outlet
1
,
salesladies
2
-
5
belong
to
outlet
2
,
salesladies
6
belongs
to
outlet
3
,
etc.
and
salesladies
33
-
34
belong
to
outlet
19
.
Problem 004 (Mystery Shopper) — Detection of the decisions and objects to be modeled
A
well-known
cosmetic
company
wants
to
evaluate
the
performance
of
her
saleladies
,
who
station
at
the
company
's
counters
at
various
department
stores
in
different
geographical
locations
.
For
this
purpose
,
the
company
has
hired
some
secret
agents
to
disguise
as
shoppers
to
visit
the
salesladies
.
The
visits
must
be
scheduled
in
such
a
way
that
each
saleslady
must
be
visited
by
shoppers
of
different
varieties
and
that
the
visits
should
be
spaced
out
roughly
evenly
.
Also
,
shoppers
should
visit
salesladies
in
different
geographic
locations
.
The
exact
constraints
,
which
ensure
the
statistical
soundness
of
the
project
,
follow
.
There
are
totally
19
outlets
to
be
visited
.
They
are
located
in
4
geographical
regions
:
5
outlets
in
Area
1
-LRB-
outlet
1-5
-RRB-
,
5
outlets
in
Area
2
-LRB-
outlet
6-10
-RRB-
,
5
outlets
in
Area
3
-LRB-
outlet
11-15
-RRB-
,
and
4
outlets
in
Area
4
-LRB-
outlet
16-19
-RRB-
.
There
will
be
1
to
4
salesladies
in
each
outlet
.
Each
saleslady
will
be
visited
by
4
different
shoppers
.
The
frequency
of
visits
to
a
particular
outlet
will
be
the
number
of
salesladies
times
4
.
There
are
totally
35
salesladies
working
in
all
outlets
everyday
.
Therefore
,
the
total
number
of
visits
is
140
.
The
shoppers
are
divided
into
4
groups
according
to
age
,
professions
,
and
etc.
.
Each
group
has
10
shoppers
.
Therefore
,
the
total
number
of
shoppers
is
40
.
Therefore
,
in
each
group
of
shoppers
,
5
shoppers
will
perform
3
visits
and
the
other
5
shoppers
will
perform
4
visits
.
Each
shopper
should
only
visit
1
outlet
in
each
of
the
4
areas
.
All
salesladies
should
be
visited
2
times
in
the
first
2
weeks
of
fieldwork
.
The
total
fieldwork
period
will
be
4
weeks
.
Theoretically
,
each
shopper
has
to
pay
1
visit
each
week
.
However
,
shoppers
making
4
visits
must
have
done
2
visits
by
the
end
of
the
second
week
.
Shoppers
making
3
visits
should
have
done
1
or
2
visits
by
the
end
of
the
second
week
.
The
data
of
the
first
50
%
visits
will
be
analysed
and
put
in
an
interim
report
.
Listed
below
are
locations
of
the
19
outlets
and
the
number
of
salesladies
in
that
particular
outlet
-LRB-
outlets
with
*
are
boutiques
-RRB-
.
*
Outlet
1
:
2
.
Outlet
2
:
4
.
Outlet
3
:
1
.
Outlet
4
:
2
.
Outlet
5
:
1
.
Outlet
6
:
2
.
Outlet
7
:
1
.
Outlet
8
:
1
.
Outlet
9
:
1
.
*
Outlet
10
:
2
.
Outlet
11
:
2
.
Outlet
12
:
2
.
Outlet
13
:
1
.
*
Outlet
14
:
2
.
*
Outlet
15
:
1
.
Outlet
16
:
2
.
Outlet
17
:
2
.
Outlet
18
:
4
.
Outlet
19
:
2
Convention
:
shoppers
0
-
9
belong
to
group
1
,
shoppers
10
-
19
belong
to
group
2
,
shoppers
20
-
29
belong
to
group
3
,
and
shoppers
30
-
39
belong
to
group
4
.
In
each
group
,
the
first
5
shoppers
make
3
visits
and
the
remaining
5
shoppers
make
4
visits
.
For
example
,
in
group
1
,
shoppers
0
-
4
make
3
visits
and
shoppers
5
-
9
make
4
visits
.
Besides
,
for
the
salesladies
:
salesladies
0
-
1
belong
to
outlet
1
,
salesladies
2
-
5
belong
to
outlet
2
,
salesladies
6
belongs
to
outlet
3
,
etc.
and
salesladies
33
-
34
belong
to
outlet
19
.
Back to list