aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/test/java/com/yahoo/prelude/semantics/parser/test/rules.sr
blob: 5c54f59a6f261164b10727520e21d8557f08345e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
@default
@automata(src/test/java/com/yahoo/prelude/semantics/parser/test/semantics.fsa)

# Local use case

[listing] [preposition] [place] -> listing:[listing] place:[place]!150;

[listing] :- restaurant, shop, cafe, hotel;

[preposition] :- in, at, near;

[place] :- geary;

# Just to see additive rules working
[listing] [place] +> place:[place];

# Shopping use case

[brand] -> brand:[brand];
[category] -> category:[category];

digital camera -> digicamera;

[brand] :- sony, dell;
[category] :- digital camera, camera, phone;

# Answers use case

# why is [noun] ... [adjective] +> ?about:[noun]

parameter.ranking='cat', parameter.ranking='cat0' -> one;