You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nlpcraft.apache.org by ar...@apache.org on 2021/02/18 06:01:06 UTC

[incubator-nlpcraft] branch NLPCRAFT-206 updated (e5d8ac1 -> 3e32103)

This is an automated email from the ASF dual-hosted git repository.

aradzinski pushed a change to branch NLPCRAFT-206
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git.


    from e5d8ac1  WIP.
     add a7ea33e  Abstract elements support added.
     new 3e32103  Merge remote-tracking branch 'origin/master' into NLPCRAFT-206

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../apache/nlpcraft/common/nlp/NCNlpSentence.scala | 204 +++++++++++++-------
 .../examples/misc/geo/keycdn/GeoManager.java       |   6 +-
 .../scala/org/apache/nlpcraft/model/NCElement.java |   2 +-
 .../apache/nlpcraft/model/NCModelFileAdapter.java  |   7 +
 .../org/apache/nlpcraft/model/NCModelView.java     |  26 ++-
 .../scala/org/apache/nlpcraft/model/NCToken.java   |  18 ++
 .../nlpcraft/model/NCTokenPredicateResult.java     |   4 +-
 .../apache/nlpcraft/model/impl/NCTokenImpl.scala   |  19 +-
 .../nlpcraft/model/impl/json/NCModelJson.java      |   7 +
 .../nlpcraft/probe/mgrs/NCProbeVariants.scala      | 206 +++++++++++++++++++--
 .../probe/mgrs/deploy/NCDeployManager.scala        |  17 +-
 .../probe/mgrs/nlp/NCProbeEnrichmentManager.scala  |   4 +-
 .../mgrs/nlp/enrichers/limit/NCLimitEnricher.scala | 147 +++++++--------
 .../mgrs/nlp/enrichers/model/NCModelEnricher.scala |   4 +-
 .../scala/org/apache/nlpcraft/NCTestContext.scala  |  28 ++-
 .../nlpcraft/examples/time/NCTimeModelSpec.scala   |  24 +--
 .../apache/nlpcraft/model/NCIntentDslSpec.scala    |  14 +-
 .../apache/nlpcraft/model/NCIntentDslSpec2.scala   |  19 +-
 .../abstract/NCAbstractTokensEnricherSpec.scala    |  57 ++++++
 .../abstract/NCAbstractTokensIntentsSpec.scala     |  53 ++++++
 .../model/abstract/NCAbstractTokensModel.scala     |  57 ++++++
 .../abstract/NCAbstractTokensVariantsSpec.scala    | 168 +++++++++++++++++
 .../nlpcraft/models/stm/NCStmTestModelSpec.scala   |  23 +--
 .../mgrs/nlp/enrichers/NCDefaultTestModel.scala    |  14 +-
 .../mgrs/nlp/enrichers/NCEnricherBaseSpec.scala    |  17 +-
 .../nlp/enrichers/NCEnrichersTestContext.scala}    |  26 ++-
 .../nlp/enrichers/sort/NCEnricherSortSpec.scala    |   5 -
 27 files changed, 911 insertions(+), 265 deletions(-)
 create mode 100644 nlpcraft/src/test/scala/org/apache/nlpcraft/model/abstract/NCAbstractTokensEnricherSpec.scala
 create mode 100644 nlpcraft/src/test/scala/org/apache/nlpcraft/model/abstract/NCAbstractTokensIntentsSpec.scala
 create mode 100644 nlpcraft/src/test/scala/org/apache/nlpcraft/model/abstract/NCAbstractTokensModel.scala
 create mode 100644 nlpcraft/src/test/scala/org/apache/nlpcraft/model/abstract/NCAbstractTokensVariantsSpec.scala
 copy nlpcraft/src/{main/scala/org/apache/nlpcraft/server/nlp/enrichers/date/NCDateFormatType.scala => test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/NCEnrichersTestContext.scala} (64%)


[incubator-nlpcraft] 01/01: Merge remote-tracking branch 'origin/master' into NLPCRAFT-206

Posted by ar...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aradzinski pushed a commit to branch NLPCRAFT-206
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git

commit 3e321033f2c7b1f376ab7433fc31e5886abfe53f
Merge: e5d8ac1 a7ea33e
Author: Aaron Radzinzski <ar...@datalingvo.com>
AuthorDate: Wed Feb 17 22:00:55 2021 -0800

    Merge remote-tracking branch 'origin/master' into NLPCRAFT-206
    
    # Conflicts:
    #	nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCModelView.java

 .../apache/nlpcraft/common/nlp/NCNlpSentence.scala | 204 +++++++++++++-------
 .../examples/misc/geo/keycdn/GeoManager.java       |   6 +-
 .../scala/org/apache/nlpcraft/model/NCElement.java |   2 +-
 .../apache/nlpcraft/model/NCModelFileAdapter.java  |   7 +
 .../org/apache/nlpcraft/model/NCModelView.java     |  26 ++-
 .../scala/org/apache/nlpcraft/model/NCToken.java   |  18 ++
 .../nlpcraft/model/NCTokenPredicateResult.java     |   4 +-
 .../apache/nlpcraft/model/impl/NCTokenImpl.scala   |  19 +-
 .../nlpcraft/model/impl/json/NCModelJson.java      |   7 +
 .../nlpcraft/probe/mgrs/NCProbeVariants.scala      | 206 +++++++++++++++++++--
 .../probe/mgrs/deploy/NCDeployManager.scala        |  17 +-
 .../probe/mgrs/nlp/NCProbeEnrichmentManager.scala  |   4 +-
 .../mgrs/nlp/enrichers/limit/NCLimitEnricher.scala | 147 +++++++--------
 .../mgrs/nlp/enrichers/model/NCModelEnricher.scala |   4 +-
 .../scala/org/apache/nlpcraft/NCTestContext.scala  |  28 ++-
 .../nlpcraft/examples/time/NCTimeModelSpec.scala   |  24 +--
 .../apache/nlpcraft/model/NCIntentDslSpec.scala    |  14 +-
 .../apache/nlpcraft/model/NCIntentDslSpec2.scala   |  19 +-
 .../abstract/NCAbstractTokensEnricherSpec.scala    |  57 ++++++
 .../abstract/NCAbstractTokensIntentsSpec.scala     |  53 ++++++
 .../model/abstract/NCAbstractTokensModel.scala     |  57 ++++++
 .../abstract/NCAbstractTokensVariantsSpec.scala    | 168 +++++++++++++++++
 .../nlpcraft/models/stm/NCStmTestModelSpec.scala   |  23 +--
 .../mgrs/nlp/enrichers/NCDefaultTestModel.scala    |  14 +-
 .../mgrs/nlp/enrichers/NCEnricherBaseSpec.scala    |  17 +-
 .../nlp/enrichers/NCEnrichersTestContext.scala     |  32 ++++
 .../nlp/enrichers/sort/NCEnricherSortSpec.scala    |   5 -
 27 files changed, 932 insertions(+), 250 deletions(-)

diff --cc nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCTokenPredicateResult.java
index 5d368be,0000000..a3356ef
mode 100644,000000..100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCTokenPredicateResult.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCTokenPredicateResult.java
@@@ -1,60 -1,0 +1,60 @@@
 +/*
 + * 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.
 + */
 +
 +package org.apache.nlpcraft.model;
 +
 +/**
 + * Result value of user-defined token predicate. Token predicates can be used in intent and synonym DSL.
 + * <p>
 + * Read full documentation in <a target=_ href="https://nlpcraft.apache.org/intent-matching.html">Intent Matching</a> section and review
 + * <a target=_ href="https://github.com/apache/incubator-nlpcraft/tree/master/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/">examples</a>.
 + *
 + * @see NCTokenPredicateContext
 + */
 +public class NCTokenPredicateResult {
 +    private final boolean result;
 +    private final boolean wasTokenUsed;
 +
 +    /**
 +     * Creates token predicate result.
 +     *
 +     * @param result Token predicate result.
-      * @param wasTokenUsed Whether or not a token was used by this predicate (if result is {@code true}).
++     * @param wasTokenUsed Whether or not a token was used by this predicate (if {@link #getResult() result} is {@code true}).
 +     */
 +    NCTokenPredicateResult(boolean result, boolean wasTokenUsed) {
 +        this.result = result;
 +        this.wasTokenUsed = wasTokenUsed;
 +    }
 +
 +    /**
 +     * Gets result of this predicate.
 +     *
 +     * @return Predicate result.
 +     */
 +    boolean getResult() {
 +        return result;
 +    }
 +
 +    /**
-      * Whether or not a token was used by this predicate (if result is {@code true}).
++     * Whether or not a token was used by this predicate (if {@link #getResult() result} is {@code true}).
 +     *
 +     * @return {@code true} if token was used by this predicate, {@code false} otherwise.
 +     */
 +    boolean wasTokenUsed() {
 +        return wasTokenUsed;
 +    }
 +}