[ 
https://issues.apache.org/jira/browse/NLPCRAFT-203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17253996#comment-17253996
 ] 

Sergey Kamov commented on NLPCRAFT-203:
---------------------------------------

Request "last year Exotic Liquids orders" produces 2 variants

+====================================================================================================================================================================================================================================+
| idx | origtext | lemma | pos | quoted | stopword | freeword | wordindexes | 
direct | sparsity | token data |
+====================================================================================================================================================================================================================================+
| 0 | last year | last year | --- | false | false | false | [0,1] | true | 0 | 
<<nlpcraft:date>> range=2019/01/01:2020/01/01, periods=y,:,y |
| 1 | Exotic Liquids | exotic liquids | --- | false | false | false | [2,3] | 
true | 0 | <<condition:value>> id=condition:value, parts=[id=col:val, 
parts=[id=col:suppliers_company_name, aliases='colVal']] |
| 2 | orders | order | NNS | false | false | false | [4] | true | 0 | 
<<nlpcraft:sort>> subjnotes=condition:value, subjindexes=[1] |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Dec-23|12:31:03|INF| Parsing variant #2 of 2 (sorted best to worst) for: 'last 
year exotic liquids orders'
+====================================================================================================================================================================================================================================+
| idx | origtext | lemma | pos | quoted | stopword | freeword | wordindexes | 
direct | sparsity | token data |
+====================================================================================================================================================================================================================================+
| 0 | last year | last year | --- | false | false | false | [0,1] | true | 0 | 
<<nlpcraft:date>> range=2019/01/01:2020/01/01, periods=y,:,y |
| 1 | Exotic Liquids | exotic liquids | --- | false | false | false | [2,3] | 
true | 0 | <<condition:value>> id=condition:value, parts=[id=col:val, 
parts=[id=col:suppliers_company_name, aliases='colVal']] |
| 2 | orders | order | NNS | false | false | false | [4] | true | 0 | 
<<tbl:orders>> id=tbl:orders |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

 

master - second won

in this branch (203) - first won.

 

But should second because the user element (<<tbl:orders>>) should have higher 
priority compared to the built element (<<nlpcraft:sort>> ) if other parameters 
(like words count) are the same

> Intents matching order error.
> -----------------------------
>
>                 Key: NLPCRAFT-203
>                 URL: https://issues.apache.org/jira/browse/NLPCRAFT-203
>             Project: NLPCraft
>          Issue Type: Improvement
>          Components: probe
>            Reporter: Sergey Kamov
>            Assignee: Sergey Kamov
>            Priority: Major
>             Fix For: 0.7.3
>
>
> If model has 2 intents:
> intent=req1 term(ind)~\{id == 'wt:phen'} term(city)~\{id == 'nlpcraft:city'}?
> intent=req2 term(ind)~\{id == 'wt:phen'} term(city)~\{id == 'nlpcraft:city'}
> I guess the second should win always, but won the first.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to