| # |
| # 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.minecraft.ex |
| name: Minecraft Model |
| version: '1.0' |
| description: Minecraft Model. |
| "enabledBuiltInTokens": [ |
| "nlpcraft:num" |
| ] |
| |
| macros: |
| - name: "<PLAYER_NICKNAME>" |
| macro: "{//[a-zA-Z0-9]+//}" |
| |
| elements: |
| # General synonyms |
| - id: mc:player |
| synonyms: |
| - "{I|me|my|#<PLAYER_NICKNAME>}" |
| - id: mc:item |
| metadata: |
| mc:type: item |
| valueLoader: org.apache.nlpcraft.example.minecraft.MinecraftValueLoader |
| - id: mc:block |
| metadata: |
| mc:type: block |
| valueLoader: org.apache.nlpcraft.example.minecraft.MinecraftValueLoader |
| |
| # Weather intent |
| - id: weather:action |
| synonyms: |
| - "{set|make|start|cast} {it|weather|temperature|climate|mode|{weather|_} condition|_}" |
| - id: rain |
| description: Set rainy weather |
| groups: |
| - weather |
| synonyms: |
| - "{rain|downpour|rainy|wet|sprinkle|precipitation|raindrop|drizzle|shower|rainstorm} {downpour|_}" |
| - id: clear |
| description: Set sunny weather |
| groups: |
| - weather |
| synonyms: |
| - "{sun|sunny|balmy|clear|bright|clear sky}" |
| - id: thunder |
| description: Set stormy weather |
| groups: |
| - weather |
| synonyms: |
| - "{super|_} {thunder|thunderstorm|storm|stormy|cyclone|hurricane|gale|tornado|squall|typhoon|superstorm|hailstrorm}" |
| |
| # Time intent |
| - id: time:action |
| synonyms: |
| - "{set|make} {it|_}" |
| - id: morning |
| groups: |
| - time |
| synonyms: |
| - "morning" |
| - id: day |
| groups: |
| - time |
| synonyms: |
| - "day" |
| - id: afternoon |
| groups: |
| - time |
| synonyms: |
| - "{{early|late|_} afternoon|noon|midday}" |
| - id: evening |
| groups: |
| - time |
| synonyms: |
| - "{early|_} {evening}" |
| - id: night |
| groups: |
| - time |
| synonyms: |
| - "late evening" |
| - id: midnight |
| groups: |
| - time |
| |
| # Give intent |
| - id: give:action |
| synonyms: |
| - "{give ^^[target]{# == 'mc:player'}^^}" |
| - id: give:block-word |
| synonyms: |
| - "{block|blocks}" |
| |
| # Fill intent |
| - id: fill:action |
| synonyms: |
| - "{fill|make|create}" |
| - id: cube |
| groups: |
| - fill:shape |
| - id: square |
| groups: |
| - fill:shape |
| synonyms: |
| - "{box|rectangle}" |
| - id: line |
| groups: |
| - fill:shape |
| synonyms: |
| - "wall" |
| - id: fill:length |
| synonyms: |
| - "{{size|length|diameter} {of|_} ^^[length]{# == 'nlpcraft:num'}^^}" |
| - id: position:player |
| groups: |
| - fill:position |
| synonyms: |
| - "{{at|near} ^^[player]{# == 'mc:player'}^^ {position|_}|where ^^[player]{# == 'mc:player'}^^}" |
| |
| - id: position:front |
| groups: |
| - fill:position |
| synonyms: |
| - "{{^^[distance]{# == 'nlpcraft:num'}^^|_} {in|_} front {of|_} ^^[player]{# == 'mc:player'}^^}" |
| |
| abstractTokens: |
| - mc:player |
| |
| # |
| # Allows for multi-word synonyms in this entire model |
| # to be sparse and permutate them for better detection. |
| # These two properties generally enable a free-form |
| # natural language comprehension. |
| # |
| permutateSynonyms: true |
| sparse: true |
| |
| # List of model intents. |
| intents: |
| - "intent=weatherIntent |
| term={# == 'weather:action'}? |
| term(arg)={has(tok_groups, 'weather')}" |
| |
| - "intent=timeIntent |
| term={# == 'time:action'}? |
| term(arg)={has(tok_groups, 'time')}" |
| |
| - "intent=giveIntent |
| term(action)={# == 'give:action'} |
| term(quantity)={# == 'nlpcraft:num'}? |
| term(item)={# == 'mc:item'} |
| term={# == 'give:block-word'}?" |
| |
| - "intent=fillIntent |
| term={# == 'fill:action'} |
| term(shape)={has(tok_groups, 'fill:shape')} |
| term(block)={# == 'mc:block'} |
| term(len)={# == 'fill:length'}? |
| term(position)={has(tok_groups, 'fill:position')}" |