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

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


The following commit(s) were added to refs/heads/master by this push:
     new 7f32e15  WIP.
7f32e15 is described below

commit 7f32e1513a3d19ddbc148afb8657c2a28beb0b4d
Author: Aaron Radzinski <[email protected]>
AuthorDate: Tue Dec 7 19:14:53 2021 -0800

    WIP.
---
 .../scala/org/apache/nlpcraft/NCIntentSkip.java    |   3 -
 .../org/apache/nlpcraft/NCMacroProcessor.java      | 100 ---------------------
 2 files changed, 103 deletions(-)

diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/NCIntentSkip.java 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/NCIntentSkip.java
index 9b3cc2e..ae6605a 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/NCIntentSkip.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/NCIntentSkip.java
@@ -27,9 +27,6 @@ package org.apache.nlpcraft;
  * declarative IDL. In these cases the intent definition can be relaxed and 
the "last mile" of intent
  * matching can happen inside the intent callback's user logic. If it is 
determined that intent in fact does
  * not match then throwing this exception allows to try next best matching 
intent, if any.
- * <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-examples";>examples</a>.
  *
  * @see NCIntent
  * @see NCIntentTerm
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/NCMacroProcessor.java 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/NCMacroProcessor.java
deleted file mode 100644
index a9b935f..0000000
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/NCMacroProcessor.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * 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;
-
-import org.apache.nlpcraft.internal.makro.NCMacroJavaParserTrait;
-
-import java.util.Set;
-
-/**
- * Standalone synonym macro DSL processor.
- * <p>
- * This processor provides the same macro support as the built-in macro 
support in data models.
- * It is a general purpose macro-processor and it can be used standalone when 
testing synonyms,
- * developing NERs, visualizing synonyms in toolchains, etc.
- * <p>
- * Read full documentation on synonym macro DSL in <a target=_ 
href="https://nlpcraft.apache.org/data-model.html";>Data Model</a> section and 
review
- * <a target=_ 
href="https://github.com/apache/incubator-nlpcraft/tree/master/nlpcraft-examples";>examples</a>.
- */
-public class NCMacroProcessor {
-    private final NCMacroJavaParserTrait impl = mkImpl();
-
-    // Need to do that in order to avoid Javadoc failures due to mixed 
Scala/Java project.
-    private static NCMacroJavaParserTrait mkImpl() {
-        try {
-            return 
(NCMacroJavaParserTrait)Class.forName("org.apache.nlpcraft.internal.makro.NCMacroJavaParser")
-                .getDeclaredConstructor().newInstance();
-        }
-        catch (Exception e) {
-            throw new NCException("Error initializing object of type: 
org.apache.nlpcraft.internal.makro.NCMacroJavaParser", e);
-        }
-    }
-
-    /**
-     * Expands given macro DSL string.
-     * <p>
-     * Read full documentation on synonym macro DSL in <a target=_ 
href="https://nlpcraft.apache.org/data-model.html";>Data Model</a> section and 
review
-     * <a target=_ 
href="https://github.com/apache/incubator-nlpcraft/tree/master/nlpcraft-examples";>examples</a>.
-     *
-     * @param s Macro DSL string to expand.
-     * @return Set of macro expansions for a given macro DSL string.
-     */
-    public Set<String> expand(String s) {
-        return impl.expand(s);
-    }
-
-    /**
-     * Adds or overrides given macro.
-     *
-     * @param name Macro name (typically an upper case string).
-     *     It must start with '&lt;' and end with '&gt;' symbol.
-     * @param macro Value of the macro (any arbitrary string).
-     * @return {@code true} if an existing macro was overridden, {@code false} 
otherwise.
-     */
-    public boolean addMacro(String name, String macro) {
-        boolean f = impl.hasMacro(name);
-
-        impl.addMacro(name, macro);
-
-        return f;
-    }
-
-    /**
-     * Removes macro.
-     *
-     * @param name Name of the macro to remove.
-     * @return {@code true} if given macro was indeed found and removed, 
{@code false} otherwise.
-     */
-    public boolean removeMacro(String name) {
-        boolean f = impl.hasMacro(name);
-
-        impl.removeMacro(name);
-
-        return f;
-    }
-
-    /**
-     * Tests whether this processor has given macro.
-     *
-     * @param name Name of the macro to test.
-     * @return {@code true} if macro was found, {@code false} otherwise.
-     */
-    public boolean hasMacro(String name) {
-        return impl.hasMacro(name);
-    }
-}

Reply via email to