blob: 4ba30c2573a651f759127ba702ce6d0ab8060313 [file] [log] [blame]
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
id: "nlpcraft.cargps.ex"
name: "Car GPS Example Model"
version: "1.0"
description: "NLI-powered car GPS-based navigation example model."
enabledBuiltInTokens:
- "nlpcraft:num"
- "nlpcraft:city"
- "nlpcraft:country"
- "nlpcraft:region"
macros:
- name: "<HEY>"
macro: "{hey|hi|howdy}"
- name: "<NAVIGATE>"
macro: "{navigate|pilot|plot|drive|route|plan|find|head|ride|direct|steer|operate|sail} {out|_} {course|route|destination|drive|_}"
- name: "<CANCEL>"
macro: "{cancel|stop|abort|finish|cease|quit} {off|_}"
- name: "<WAYPOINT>"
macro: "{waypoint|location|point|stopover|stop over|way station|stop|checkpoint|stop point} {point|station|_}"
elements:
- id: "x:addr:kind"
# Short list from https://pe.usps.com/text/pub28/28apc_002.htm
synonyms:
# street[0,2] => {_|street|street street}
- "{street|drive|court|plaza|avenue|alley|anex|beach|bend|boulevard|bridge|canyon|causeway|way|circle|corner|creek|fork|harbor|highway|expressway|island|lane|lake|loop|motorway|park|path|point|ramp|route|rue|row|skyway|square|station|summit|trail|tunnel|walk|road}"
- "{st|str|dr|crt|plz|ave|blvd|hwy|rd}"
- id: "x:addr:num"
synonyms:
- "^^{tok_id() == 'nlpcraft:num' && meta_tok('nlpcraft:num:unit') == null && meta_tok('nlpcraft:num:isequalcondition')}^^"
- id: "x:addr:st"
synonyms:
- "{//[a-zA-Z0-9]+//}[1,3]"
- id: "x:addr"
synonyms:
- "^^[num]{tok_id() == 'x:addr:num'}^^ ^^[name]{tok_id() == 'x:addr:st'}^^ ^^[kind]{tok_id() == 'x:addr:kind'}^^"
- id: "x:hey"
description: "NLI prompt"
synonyms:
- "<HEY> {car|vehicle|truck}"
- id: "x:cancel"
description: "Cancel action."
synonyms:
- "<CANCEL>"
- id: "x:navigate"
description: "Start 'navigate' action."
synonyms:
- "<NAVIGATE>"
- id: "x:add-waypoint"
description: "Add 'waypoint' action."
synonyms:
- "{add|make} <WAYPOINT>"
- "stop by"
- id: "x:remove-waypoint"
description: "Remove 'waypoint' action."
synonyms:
- "{skip|remove} {over|_} {last|latest|_} <WAYPOINT>"
intents:
- "import('cargps_intents.idl')"