Uploaded image for project: 'NLPCraft'
  1. NLPCraft
  2. NLPCRAFT-237

Intents matching issues.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • None
    • 0.7.5
    • None
    • None

    Description

      1) Look at the warning message

       Two matching intents have the same weight for their matches. |
       These intents will be sorted based on the weight of their variants. |

      There is only one intent.

       

      2. Why  intents have different 'USR_DRCT' values

        USR_DRCT: 4 USR_DRCT: 5  

       

      3. Please add the legend for abbreviations.

      _ ____ ______ ______
      / | / / /___ / ___/_______ / __/ /
      / |/ / / __ \/ / / __/ __ `/ // __/
      / /| / / // / /_/ / / // / _/ /
      // |// ._/__// _,// _/
      /_/

      Embedded Data Probe
      Version: 0.7.4
      Copyright (C) 2021 Apache Software Foundation

      Feb-11|20:41:19|INF| Probe Configuration:
      ----------------------------------------------------------

      Probe ID extended.examples
      Probe Token 3141592653589793
      API Version 0.7.4, 2021-01-31
      Down-Link 0.0.0.0:8202
      Up-Link 0.0.0.0:8201
      Lifecycle  
      Models (1) org.apache.nlpcraft.example.MinecraftModel
      JARs Folder  

      ----------------------------------------------------------
      Feb-11|20:41:19|INF| NCLifecycleManager started [7ms]
      Feb-11|20:41:19|INF| NCThreadPoolManager started [1ms]
      Feb-11|20:41:19|INF| NCExternalConfigManager started [664ms]
      Feb-11|20:41:20|INF| NCOpenNlpTokenizer started [97ms]
      Feb-11|20:41:20|INF| NCNlpCoreManager started [100ms]
      Feb-11|20:41:20|INF| NCNumericManager started [345ms]
      Feb-11|20:41:21|WRN| Duplicate synonyms found in 'nlpcraft.minecraft.ex' model - turn on TRACE logging to see them.
      Feb-11|20:41:21|WRN| |-- NOTE: ID of the model element is its default built-in synonym - you don't need to add it explicitly to the list of synonyms.
      Feb-11|20:41:21|WRN| +-- Model 'nlpcraft.minecraft.ex' allows duplicate synonyms but the large number may degrade the performance.
      Feb-11|20:41:21|WRN| @NCIntentSample annotation is missing for: org.apache.nlpcraft.example.MinecraftModel#onWeatherMatch(...)
      Feb-11|20:41:21|WRN| @NCIntentSample annotation is missing for: org.apache.nlpcraft.example.MinecraftModel#onTimeMatch(...)
      Feb-11|20:41:21|WRN| @NCIntentSample annotation is missing for: org.apache.nlpcraft.example.MinecraftModel#onGiveMatch(...)
      Feb-11|20:41:21|WRN| @NCIntentSample annotation is missing for: org.apache.nlpcraft.example.MinecraftModel#onFillMatch(...)
      Feb-11|20:41:21|INF| NCDeployManager started [1370ms]
      Feb-11|20:41:21|INF| Models deployed: 1
      ====================================================================================

      Model Intents

      ====================================================================================

      Minecraft Model intent=weatherIntent
      ID: nlpcraft.minecraft.ex, ver: 1.0 term(arg)={groups @@ 'weather'}
      Elements: 21 intent=timeIntent
      Synonyms: 4179 term(arg)={groups @@ 'time'}
      Intents: 4 intent=giveIntent
        term(action)={id == 'give:action'}
        term(quantity)={id == 'nlpcraft:num'}?
        term(item)={id == 'mc:item'}
        term={id == 'give:block-word'}?
        intent=fillIntent
        term={id == 'fill:action'}
        term(shape)={groups @@ 'fill:shape'}
        term(block)={id == 'mc:item'}
        term={id == 'fill:length'}?
        term(len)={id == 'nlpcraft:num'}
        term(position)={groups @@ 'fill:position'}

      ------------------------------------------------------------------------------------
      Feb-11|20:41:21|INF| NCModelManager started [11ms]
      Feb-11|20:41:21|INF| NCCommandManager started [1ms]
      Feb-11|20:41:22|INF| NCDictionaryManager started [680ms]
      Feb-11|20:41:22|INF| NCStopWordEnricher started [6ms]
      Feb-11|20:41:22|INF| NCModelEnricher started [1ms]
      Feb-11|20:41:22|INF| NCLimitEnricher started [4ms]
      Feb-11|20:41:22|INF| NCSortEnricher started [9ms]
      Feb-11|20:41:22|INF| NCRelationEnricher started [4ms]
      Feb-11|20:41:22|INF| NCSuspiciousNounsEnricher started [0ms]
      Feb-11|20:41:23|INF| NCValidateManager started [765ms]
      Feb-11|20:41:23|INF| NCDictionaryEnricher started [5ms]
      Feb-11|20:41:23|INF| NCConversationManager started [1ms]
      Feb-11|20:41:23|INF| NCProbeEnrichmentManager started [0ms]
      Feb-11|20:41:23|INF| Connecting to REST server [uplink=0.0.0.0:8201, downlink=0.0.0.0:8202]
      Feb-11|20:41:28|INF| REST server connected.
      Feb-11|20:41:28|INF| NCConnectionManager started [5166ms]
      Feb-11|20:41:28|INF| NCDialogFlowManager started [1ms]
      Feb-11|20:41:28|INF|

      --------------------------

      Probe started [9.65 sec]

      --------------------------

      Feb-11|20:41:47|INF| New request received from server:
      --------------------------------------------------------------------

      Text make a box of sand with the size of 10 near me
      Model ID nlpcraft.minecraft.ex
      User:  
      ID 1
      First Name firstName2
      Last Name lastName2
      Email admin@admin.com
      Company Name ETH Zurich
      Is Admin true
      Signup Date Wed Feb 10 18:25:34 MSK 2021
      User Agent Java/11.0.9
      Remote Address 192.168.1.12
      Server Timestamp Thu Feb 11 20:41:47 MSK 2021
      Server Request ID BerAMKBLyrFneox9Kyzg6

      --------------------------------------------------------------------
      Feb-11|20:41:49|INF| Parsing variant #1 of 4 for: 'make a box of sand with the size of 10 near me'
      ===================================================================================================================================================================================================

      idx origtext lemma pos quoted stopword freeword wordindexes direct sparsity token data

      ===================================================================================================================================================================================================

      0 make make VB false false false [0] true 0 <<fill:action>> id=fill:action
      1 a a DT false true false [1] true 0  
      2 box box NN false false false [2] true 0 <<square>> id=square
      3 of of IN false false true [3] false 0  
      4 sand sand NN false false false [4] true 0 <<mc:block>> id=mc:block
      5 with the with the false true false [5,6] true 0  
      6 size of size of false false false [7,8] true 0 <<fill:length>> id=fill:length
      7 10 10 CD false false false [9] true 0 <<nlpcraft:num>> =10
      8 near me near i false false false [10,11] true 0 <<position:player>> id=position:player, parts=[id=nlpcraft:nlp|id=mc:player, aliases='player']

      ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      Feb-11|20:41:49|INF| Parsing variant #2 of 4 for: 'make a box of sand with the size of 10 near me'
      ===================================================================================================================================================================================================

      idx origtext lemma pos quoted stopword freeword wordindexes direct sparsity token data

      ===================================================================================================================================================================================================

      0 make make VB false false false [0] true 0 <<fill:action>> id=fill:action
      1 a a DT false true false [1] true 0  
      2 box box NN false false false [2] true 0 <<square>> id=square
      3 of of IN false false true [3] false 0  
      4 sand sand NN false false false [4] true 0 <<mc:item>> id=mc:item
      5 with the with the false true false [5,6] true 0  
      6 size of size of false false false [7,8] true 0 <<fill:length>> id=fill:length
      7 10 10 CD false false false [9] true 0 <<nlpcraft:num>> =10
      8 near me near i false false false [10,11] true 0 <<position:player>> id=position:player, parts=[id=nlpcraft:nlp|id=mc:player, aliases='player']

      ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      Feb-11|20:41:49|INF| Parsing variant #3 of 4 for: 'make a box of sand with the size of 10 near me'
      ===================================================================================================================================================================================================

      idx origtext lemma pos quoted stopword freeword wordindexes direct sparsity token data

      ===================================================================================================================================================================================================

      0 make make VB false false false [0] true 0 <<fill:action>> id=fill:action
      1 a a DT false true false [1] true 0  
      2 box box NN false false false [2] true 0 <<square>> id=square
      3 of size of size false false false [3,7] false 3 <<fill:length>> id=fill:length
      4 sand sand NN false false false [4] true 0 <<mc:block>> id=mc:block
      5 with the with the false true false [5,6] true 0  
      6 of of IN false false true [8] true 0  
      7 10 10 CD false false false [9] true 0 <<nlpcraft:num>> =10
      8 near me near i false false false [10,11] true 0 <<position:player>> id=position:player, parts=[id=nlpcraft:nlp|id=mc:player, aliases='player']

      ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      Feb-11|20:41:49|INF| Parsing variant #4 of 4 for: 'make a box of sand with the size of 10 near me'
      ===================================================================================================================================================================================================

      idx origtext lemma pos quoted stopword freeword wordindexes direct sparsity token data

      ===================================================================================================================================================================================================

      0 make make VB false false false [0] true 0 <<fill:action>> id=fill:action
      1 a a DT false true false [1] true 0  
      2 box box NN false false false [2] true 0 <<square>> id=square
      3 of size of size false false false [3,7] false 3 <<fill:length>> id=fill:length
      4 sand sand NN false false false [4] true 0 <<mc:item>> id=mc:item
      5 with the with the false true false [5,6] true 0  
      6 of of IN false false true [8] true 0  
      7 10 10 CD false false false [9] true 0 <<nlpcraft:num>> =10
      8 near me near i false false false [10,11] true 0 <<position:player>> id=position:player, parts=[id=nlpcraft:nlp|id=mc:player, aliases='player']

      ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      Feb-11|20:41:49|INF| Intent 'weatherIntent' did not match because of unmatched term 'term(arg)={groups @@ 'weather'}' (variant #1).
      Feb-11|20:41:49|INF| Intent 'timeIntent' did not match because of unmatched term 'term(arg)={groups @@ 'time'}' (variant #1).
      Feb-11|20:41:49|INF| Intent 'giveIntent' did not match because of unmatched term 'term(action)={id == 'give:action'}' (variant #1).
      Feb-11|20:41:49|INF| Term match found:
      ------------------------------------------------

      Intent ID fillIntent
      Matched Term term={id == 'fill:action'}
      Matched Tokens make[0]

      ---------------------------------------------+

      Term Match Weight SEN_TOK: 1
        CNV_TOK: 0
        SPC_MIN: 1
        DLT_MAX: 0
        NRM_MAX: 1

      ------------------------------------------------
      Feb-11|20:41:49|INF| Term match found:
      ----------------------------------------------------------

      Intent ID fillIntent
      Matched Term term(shape)={groups @@ 'fill:shape'}
      Matched Tokens box[2]

      -------------------------------------------------------+

      Term Match Weight SEN_TOK: 1
        CNV_TOK: 0
        SPC_MIN: 1
        DLT_MAX: 0
        NRM_MAX: 1

      ----------------------------------------------------------
      Feb-11|20:41:49|INF| Intent 'fillIntent' did not match because of unmatched term 'term(block)={id == 'mc:item'}' (variant #1).
      Feb-11|20:41:49|INF| Intent 'weatherIntent' did not match because of unmatched term 'term(arg)={groups @@ 'weather'}' (variant #2).
      Feb-11|20:41:49|INF| Intent 'timeIntent' did not match because of unmatched term 'term(arg)={groups @@ 'time'}' (variant #2).
      Feb-11|20:41:49|INF| Intent 'giveIntent' did not match because of unmatched term 'term(action)={id == 'give:action'}' (variant #2).
      Feb-11|20:41:49|INF| Term match found:
      ------------------------------------------------

      Intent ID fillIntent
      Matched Term term={id == 'fill:action'}
      Matched Tokens make[0]

      ---------------------------------------------+

      Term Match Weight SEN_TOK: 1
        CNV_TOK: 0
        SPC_MIN: 1
        DLT_MAX: 0
        NRM_MAX: 1

      ------------------------------------------------
      Feb-11|20:41:49|INF| Term match found:
      ----------------------------------------------------------

      Intent ID fillIntent
      Matched Term term(shape)={groups @@ 'fill:shape'}
      Matched Tokens box[2]

      -------------------------------------------------------+

      Term Match Weight SEN_TOK: 1
        CNV_TOK: 0
        SPC_MIN: 1
        DLT_MAX: 0
        NRM_MAX: 1

      ----------------------------------------------------------
      Feb-11|20:41:49|INF| Term match found:
      ---------------------------------------------------

      Intent ID fillIntent
      Matched Term term(block)={id == 'mc:item'}
      Matched Tokens sand[4]

      ------------------------------------------------+

      Term Match Weight SEN_TOK: 1
        CNV_TOK: 0
        SPC_MIN: 1
        DLT_MAX: 0
        NRM_MAX: 1

      ---------------------------------------------------
      Feb-11|20:41:49|INF| Term match found:
      -------------------------------------------------

      Intent ID fillIntent
      Matched Term term={id == 'fill:length'}?
      Matched Tokens size of[6]

      ----------------------------------------------+

      Term Match Weight SEN_TOK: 1
        CNV_TOK: 0
        SPC_MIN: 0
        DLT_MAX: 0
        NRM_MAX: 1

      -------------------------------------------------
      Feb-11|20:41:49|INF| Term match found:
      ------------------------------------------------------

      Intent ID fillIntent
      Matched Term term(len)={id == 'nlpcraft:num'}
      Matched Tokens 10[7]

      ---------------------------------------------------+

      Term Match Weight SEN_TOK: 1
        CNV_TOK: 0
        SPC_MIN: 1
        DLT_MAX: 0
        NRM_MAX: 1

      ------------------------------------------------------
      Feb-11|20:41:49|INF| Term match found:
      ----------------------------------------------------------------

      Intent ID fillIntent
      Matched Term term(position)={groups @@ 'fill:position'}
      Matched Tokens near me[8]

      -------------------------------------------------------------+

      Term Match Weight SEN_TOK: 1
        CNV_TOK: 0
        SPC_MIN: 1
        DLT_MAX: 0
        NRM_MAX: 1

      ----------------------------------------------------------------
      Feb-11|20:41:49|INF| Intent 'weatherIntent' did not match because of unmatched term 'term(arg)={groups @@ 'weather'}' (variant #3).
      Feb-11|20:41:49|INF| Intent 'timeIntent' did not match because of unmatched term 'term(arg)={groups @@ 'time'}' (variant #3).
      Feb-11|20:41:49|INF| Intent 'giveIntent' did not match because of unmatched term 'term(action)={id == 'give:action'}' (variant #3).
      Feb-11|20:41:49|INF| Term match found:
      ------------------------------------------------

      Intent ID fillIntent
      Matched Term term={id == 'fill:action'}
      Matched Tokens make[0]

      ---------------------------------------------+

      Term Match Weight SEN_TOK: 1
        CNV_TOK: 0
        SPC_MIN: 1
        DLT_MAX: 0
        NRM_MAX: 1

      ------------------------------------------------
      Feb-11|20:41:49|INF| Term match found:
      ----------------------------------------------------------

      Intent ID fillIntent
      Matched Term term(shape)={groups @@ 'fill:shape'}
      Matched Tokens box[2]

      -------------------------------------------------------+

      Term Match Weight SEN_TOK: 1
        CNV_TOK: 0
        SPC_MIN: 1
        DLT_MAX: 0
        NRM_MAX: 1

      ----------------------------------------------------------
      Feb-11|20:41:49|INF| Intent 'fillIntent' did not match because of unmatched term 'term(block)={id == 'mc:item'}' (variant #3).
      Feb-11|20:41:49|INF| Intent 'weatherIntent' did not match because of unmatched term 'term(arg)={groups @@ 'weather'}' (variant #4).
      Feb-11|20:41:49|INF| Intent 'timeIntent' did not match because of unmatched term 'term(arg)={groups @@ 'time'}' (variant #4).
      Feb-11|20:41:49|INF| Intent 'giveIntent' did not match because of unmatched term 'term(action)={id == 'give:action'}' (variant #4).
      Feb-11|20:41:49|INF| Term match found:
      ------------------------------------------------

      Intent ID fillIntent
      Matched Term term={id == 'fill:action'}
      Matched Tokens make[0]

      ---------------------------------------------+

      Term Match Weight SEN_TOK: 1
        CNV_TOK: 0
        SPC_MIN: 1
        DLT_MAX: 0
        NRM_MAX: 1

      ------------------------------------------------
      Feb-11|20:41:49|INF| Term match found:
      ----------------------------------------------------------

      Intent ID fillIntent
      Matched Term term(shape)={groups @@ 'fill:shape'}
      Matched Tokens box[2]

      -------------------------------------------------------+

      Term Match Weight SEN_TOK: 1
        CNV_TOK: 0
        SPC_MIN: 1
        DLT_MAX: 0
        NRM_MAX: 1

      ----------------------------------------------------------
      Feb-11|20:41:49|INF| Term match found:
      ---------------------------------------------------

      Intent ID fillIntent
      Matched Term term(block)={id == 'mc:item'}
      Matched Tokens sand[4]

      ------------------------------------------------+

      Term Match Weight SEN_TOK: 1
        CNV_TOK: 0
        SPC_MIN: 1
        DLT_MAX: 0
        NRM_MAX: 1

      ---------------------------------------------------
      Feb-11|20:41:49|INF| Term match found:
      -------------------------------------------------

      Intent ID fillIntent
      Matched Term term={id == 'fill:length'}?
      Matched Tokens of size[3]

      ----------------------------------------------+

      Term Match Weight SEN_TOK: 1
        CNV_TOK: 0
        SPC_MIN: 0
        DLT_MAX: 0
        NRM_MAX: 1

      -------------------------------------------------
      Feb-11|20:41:49|INF| Term match found:
      ------------------------------------------------------

      Intent ID fillIntent
      Matched Term term(len)={id == 'nlpcraft:num'}
      Matched Tokens 10[7]

      ---------------------------------------------------+

      Term Match Weight SEN_TOK: 1
        CNV_TOK: 0
        SPC_MIN: 1
        DLT_MAX: 0
        NRM_MAX: 1

      ------------------------------------------------------
      Feb-11|20:41:49|INF| Term match found:
      ----------------------------------------------------------------

      Intent ID fillIntent
      Matched Term term(position)={groups @@ 'fill:position'}
      Matched Tokens near me[8]

      -------------------------------------------------------------+

      Term Match Weight SEN_TOK: 1
        CNV_TOK: 0
        SPC_MIN: 1
        DLT_MAX: 0
        NRM_MAX: 1

      ----------------------------------------------------------------
      Feb-11|20:41:49|INF| Found 2 matching intents (sorted best to worst):
      ===================================================================================================================================================

      Variant Intent Term Tokens Intent Match Weight

      ===================================================================================================================================================

      #2 fillIntent Intent: 'fillIntent' XCT_VAL: 0
      best match best match Term #0 SEN_TOK: 6
          #0: Token [id=fill:action, text=make, groups=fill:action, parentId=null, value=null] CNV_TOK: 0
          Term 'shape' SPC_MIN: 5
          #0: Token [id=square, text=box, groups=fill:shape, parentId=null, value=null] DLT_MAX: 0
          Term 'block' NRM_MAX: 6
          #0: Token [id=mc:item, text=sand, groups=mc:item, parentId=null, value=sand]  
          Term #3  
          #0: Token [id=fill:length, text=size of, groups=fill:length, parentId=null, value=null]  
          Term 'len'  
          #0: Token [id=nlpcraft:num, text=10, groups=nlpcraft:num, parentId=null, value=null]  
          Term 'position'  
          #0: Token [id=position:player, text=near me, groups=fill:position, parentId=null, value=null]  

      ------------------------------------------------------------------------------------------------------------------------------------------+

      #4 fillIntent Intent: 'fillIntent' XCT_VAL: 0
          Term #0 SEN_TOK: 6
          #0: Token [id=fill:action, text=make, groups=fill:action, parentId=null, value=null] CNV_TOK: 0
          Term 'shape' SPC_MIN: 5
          #0: Token [id=square, text=box, groups=fill:shape, parentId=null, value=null] DLT_MAX: 0
          Term 'block' NRM_MAX: 6
          #0: Token [id=mc:item, text=sand, groups=mc:item, parentId=null, value=sand]  
          Term #3  
          #0: Token [id=fill:length, text=of size, groups=fill:length, parentId=null, value=null]  
          Term 'len'  
          #0: Token [id=nlpcraft:num, text=10, groups=nlpcraft:num, parentId=null, value=null]  
          Term 'position'  
          #0: Token [id=position:player, text=near me, groups=fill:position, parentId=null, value=null]  

      ---------------------------------------------------------------------------------------------------------------------------------------------------
      Feb-11|20:41:49|INF| Intent 'fillIntent' for variant #2 selected as the 'best match'.
      Feb-11|20:41:49|WRN|
      ------------------------------------------------------------------------

      Two matching intents have the same weight for their matches.
      These intents will be sorted based on the weight of their variants.
      It is recommended that intents should NOT be so similar as to produce
      matches with identical weights. If possible, modify intent definitions
      to avoid intersecting matches...

      ------------------------------------------------------------------------
      ---------------------------------------------------

      Intent ID fillIntent fillIntent
      Variant # 4 2

      ---------------------------------------------

      Intent Match Weight XCT_VAL: 0 XCT_VAL: 0
        SEN_TOK: 6 SEN_TOK: 6
        CNV_TOK: 0 CNV_TOK: 0
        SPC_MIN: 5 SPC_MIN: 5
        DLT_MAX: 0 DLT_MAX: 0
        NRM_MAX: 6 NRM_MAX: 6

      ---------------------------------------------

      Variant Weight USR_TOKS: 5 USR_TOKS: 5
        WORD_CNT: 8 WORD_CNT: 8
        USR_DRCT: 4 USR_DRCT: 5
        AWPT_PCT: 75 AWPT_PCT: 75
        SPARSITY: -3 SPARSITY: 0

      ---------------------------------------------------
      Feb-11|20:41:49|WRN|
      ------------------------------------------------------------------------

      Two matching intents have the same weight for their matches.
      These intents will be sorted based on the weight of their variants.
      It is recommended that intents should NOT be so similar as to produce
      matches with identical weights. If possible, modify intent definitions
      to avoid intersecting matches...

      ------------------------------------------------------------------------
      ---------------------------------------------------

      Intent ID fillIntent fillIntent
      Variant # 2 4

      ---------------------------------------------

      Intent Match Weight XCT_VAL: 0 XCT_VAL: 0
        SEN_TOK: 6 SEN_TOK: 6
        CNV_TOK: 0 CNV_TOK: 0
        SPC_MIN: 5 SPC_MIN: 5
        DLT_MAX: 0 DLT_MAX: 0
        NRM_MAX: 6 NRM_MAX: 6

      ---------------------------------------------

      Variant Weight USR_TOKS: 5 USR_TOKS: 5
        WORD_CNT: 8 WORD_CNT: 8
        USR_DRCT: 5 USR_DRCT: 4
        AWPT_PCT: 75 AWPT_PCT: 75
        SPARSITY: 0 SPARSITY: -3

      ---------------------------------------------------
      Feb-11|20:41:49|INF|

      SUCCESS result sent back to server [srvReqId=BerAMKBLyrFneox9Kyzg6, type=text]

      Attachments

        Activity

          People

            aradzinski Aaron Radzinski
            sergeykamov Sergey Kamov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: