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 a686fab WIP on new Javadoc.
a686fab is described below
commit a686fab3576a5897575949654e12ce9c53897688
Author: Aaron Radzinski <[email protected]>
AuthorDate: Wed Mar 23 12:51:03 2022 -0700
WIP on new Javadoc.
---
nlpcraft/pom.xml | 90 ++++++++++++++++++++++
.../apache/nlpcraft/NCModelPipelineBuilder.java | 4 +-
.../enricher/NCEnSwearWordsTokenEnricher.java | 4 +-
.../enricher/NCSwearWordsTokenEnricherSpec.scala | 4 +-
pom.xml | 1 +
5 files changed, 97 insertions(+), 6 deletions(-)
diff --git a/nlpcraft/pom.xml b/nlpcraft/pom.xml
index 9f4a02a..6ca48d4 100644
--- a/nlpcraft/pom.xml
+++ b/nlpcraft/pom.xml
@@ -247,6 +247,96 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>${maven.javadoc.plugin.ver}</version>
+ <configuration>
+ <additionalOptions>--allow-script-in-comments
--ignore-source-errors</additionalOptions>
+
<javadocDirectory>${project.basedir}/../javadoc</javadocDirectory>
+ <doclint>all</doclint>
+ <docfilessubdirs>true</docfilessubdirs>
+ <encoding>UTF-8</encoding>
+ <failOnError>false</failOnError>
+ <failOnWarnings>false</failOnWarnings>
+ <sourcepath>${project.basedir}/src/main/scala</sourcepath>
+
<stylesheetfile>${project.parent.basedir}/javadoc/stylesheet.css</stylesheetfile>
+ <bottom>
+ <![CDATA[
+ <center>
+ <br/>
+ <span style="font-size: larger">Copyright
© {currentYear} Apache Software Foundation</span>
+ <br/>
+ <br/>
+ <img
src="https://www.apache.org/img/ASF20thAnniversary.jpg" height="64px" alt="ASF
Logo">
+ </center>
+ ]]>
+ </bottom>
+ <top>
+ <![CDATA[
+ <link
href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"
rel="stylesheet">
+ <script
src="https://nlpcraft.apache.org/javadoc/resources/sh/scripts/XRegExp.js"
type="text/javascript"></script>
+ <script
src="https://nlpcraft.apache.org/javadoc/resources/sh/scripts/shCore.js"
type="text/javascript"></script>
+ <script
src="https://nlpcraft.apache.org/javadoc/resources/sh/scripts/shAutoloader.js"
type="text/javascript"></script>
+ <link
href="https://nlpcraft.apache.org/javadoc/resources/sh/styles/shCoreNLPCraft.css"
rel="stylesheet" type="text/css" title="Style">
+ <link
href="https://nlpcraft.apache.org/javadoc/resources/sh/styles/shThemeNLPCraft.css"
rel="stylesheet" type="text/css" title="Style">
+ <link
href="https://fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet">
+ <link
href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
+ <script async defer
src="https://buttons.github.io/buttons.js"></script>
+ ]]>
+ </top>
+ <excludePackageNames>
+
org.apache.nlpcraft.internal.*:org.apache.nlpcraft.nlp.token.impl.*:org.apache.nlpcraft.nlp.token.enricher.impl.*:org.apache.nlpcraft.nlp.token.parser.impl.*:org.apache.nlpcraft.nlp.entity.parser.impl.*
+ </excludePackageNames>
+ <header>
+ <![CDATA[
+ Apache NLPCraft <span style="font-size:
80%">${project.version}</span>
+ ]]>
+ </header>
+ <footer>
+ <![CDATA[
+ <span style="vertical-align: super">Apache
NLPCraft <span style="font-size: 80%">${project.version}</span></span>
+ <a style="vertical-align: super; margin-right:
10px" href="https://github.com/apache/incubator-nlpcraft" target="github"><i
class="fa fa-github github-logo"></i></a>
+ <a class="github-button"
href="https://github.com/apache/incubator-nlpcraft/tree/master/nlpcraft-examples"
data-icon="octicon-eye" aria-label="NLPCraft Examples">Examples</a>
+ <a class="github-button"
href="https://github.com/apache/incubator-nlpcraft" data-icon="octicon-star"
aria-label="Star on GitHub">Star</a>
+ <a class="github-button"
href="https://github.com/apache/incubator-nlpcraft/fork"
data-icon="octicon-repo-forked" aria-label="Fork on GitHub">Fork</a>
+ <script type="text/javascript">
+ SyntaxHighlighter.defaults["auto-links"] =
false;
+ SyntaxHighlighter.defaults["tab-size"] = 2;
+
+ SyntaxHighlighter.autoloader(
+ 'java
https://nlpcraft.apache.org/javadoc/resources/sh/scripts/shBrushJava.js',
+ 'js jscript javascript
https://nlpcraft.apache.org/javadoc/resources/sh/scripts/shBrushJScript.js',
+ 'text plain
https://nlpcraft.apache.org/javadoc/resources/sh/scripts/shBrushPlain.js',
+ 'py python
https://nlpcraft.apache.org/javadoc/resources/sh/scripts/shBrushPython.js',
+ 'ruby rails ror rb
https://nlpcraft.apache.org/javadoc/resources/sh/scripts/shBrushRuby.js',
+ 'scala
https://nlpcraft.apache.org/javadoc/resources/sh/scripts/shBrushScala.js',
+ 'sql
https://nlpcraft.apache.org/javadoc/resources/sh/scripts/shBrushSql.js',
+ 'xml xhtml xslt html
https://nlpcraft.apache.org/javadoc/resources/sh/scripts/shBrushXml.js'
+ );
+ SyntaxHighlighter.all();
+ </script>
+ ]]>
+ </footer>
+ <doctitle>
+ <![CDATA[
+ <img style="margin-top: 15px"
src="https://nlpcraft.apache.org/images/nlpcraft_logo_darkblue.png"
height="54px">
+ ]]>
+ </doctitle>
+ <windowtitle>Apache NLPCraft
${project.version}</windowtitle>
+ <show>public</show>
+ <verbose>false</verbose>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>${maven.shade.plugin.ver}</version>
<executions>
diff --git
a/nlpcraft/src/main/scala/org/apache/nlpcraft/NCModelPipelineBuilder.java
b/nlpcraft/src/main/scala/org/apache/nlpcraft/NCModelPipelineBuilder.java
index 4049bb6..e1f11b0 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/NCModelPipelineBuilder.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/NCModelPipelineBuilder.java
@@ -27,7 +27,7 @@ import
org.apache.nlpcraft.nlp.token.enricher.NCEnDictionaryTokenEnricher;
import org.apache.nlpcraft.nlp.token.enricher.NCEnQuotesTokenEnricher;
import org.apache.nlpcraft.nlp.token.enricher.NCEnStopWordsTokenEnricher;
import org.apache.nlpcraft.nlp.token.enricher.NCOpenNLPLemmaPosTokenEnricher;
-import org.apache.nlpcraft.nlp.token.enricher.NСEnSwearWordsTokenEnricher;
+import org.apache.nlpcraft.nlp.token.enricher.NCEnSwearWordsTokenEnricher;
import org.apache.nlpcraft.nlp.token.parser.NCOpenNLPTokenParser;
import java.util.ArrayList;
@@ -233,7 +233,7 @@ public class NCModelPipelineBuilder {
tokEnrichers.add(new NCEnStopWordsTokenEnricher());
// TODO: Do we need the following components here?
- tokEnrichers.add(new
NСEnSwearWordsTokenEnricher(NCResourceReader.getPath("badfilter/swear_words.txt")));
+ tokEnrichers.add(new
NCEnSwearWordsTokenEnricher(NCResourceReader.getPath("badfilter/swear_words.txt")));
tokEnrichers.add(new NCEnQuotesTokenEnricher());
tokEnrichers.add(new NCEnDictionaryTokenEnricher());
tokEnrichers.add(new NCEnBracketsTokenEnricher());
diff --git
"a/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/token/enricher/N\320\241EnSwearWordsTokenEnricher.java"
b/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/token/enricher/NCEnSwearWordsTokenEnricher.java
similarity index 93%
rename from
"nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/token/enricher/N\320\241EnSwearWordsTokenEnricher.java"
rename to
nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/token/enricher/NCEnSwearWordsTokenEnricher.java
index 639d4c1..7247554 100644
---
"a/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/token/enricher/N\320\241EnSwearWordsTokenEnricher.java"
+++
b/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/token/enricher/NCEnSwearWordsTokenEnricher.java
@@ -29,7 +29,7 @@ import java.util.Objects;
/**
* TODO: enriches with <code>swear</code> property.
*/
-public class NСEnSwearWordsTokenEnricher implements NCTokenEnricher {
+public class NCEnSwearWordsTokenEnricher implements NCTokenEnricher {
private final NCEnSwearWordsTokenEnricherImpl impl;
/**
@@ -37,7 +37,7 @@ public class NСEnSwearWordsTokenEnricher implements
NCTokenEnricher {
*
* @param mdlSrc
*/
- public NСEnSwearWordsTokenEnricher(String mdlSrc) {
+ public NCEnSwearWordsTokenEnricher(String mdlSrc) {
Objects.requireNonNull(mdlSrc, "Swear words model file cannot be
null.");
impl = new NCEnSwearWordsTokenEnricherImpl(mdlSrc);
diff --git
a/nlpcraft/src/test/scala/org/apache/nlpcraft/nlp/token/enricher/NCSwearWordsTokenEnricherSpec.scala
b/nlpcraft/src/test/scala/org/apache/nlpcraft/nlp/token/enricher/NCSwearWordsTokenEnricherSpec.scala
index 6afebe6..6fb16a0 100644
---
a/nlpcraft/src/test/scala/org/apache/nlpcraft/nlp/token/enricher/NCSwearWordsTokenEnricherSpec.scala
+++
b/nlpcraft/src/test/scala/org/apache/nlpcraft/nlp/token/enricher/NCSwearWordsTokenEnricherSpec.scala
@@ -18,7 +18,7 @@
package org.apache.nlpcraft.nlp.token.enricher
import org.apache.nlpcraft.internal.util.NCResourceReader
-import org.apache.nlpcraft.nlp.token.enricher.NСEnSwearWordsTokenEnricher
+import org.apache.nlpcraft.nlp.token.enricher.*
import org.apache.nlpcraft.nlp.util.*
import org.junit.jupiter.api.*
@@ -29,7 +29,7 @@ import scala.jdk.CollectionConverters.*
*
*/
class NCSwearWordsTokenEnricherSpec:
- private val swEnricher = new
NСEnSwearWordsTokenEnricher(NCResourceReader.getPath("badfilter/swear_words.txt"))
+ private val swEnricher = new
NCEnSwearWordsTokenEnricher(NCResourceReader.getPath("badfilter/swear_words.txt"))
@Test
def test(): Unit =
diff --git a/pom.xml b/pom.xml
index 6424a78..6cbe402 100644
--- a/pom.xml
+++ b/pom.xml
@@ -95,6 +95,7 @@
<maven.install.plugin.ver>2.5.2</maven.install.plugin.ver>
<maven.source.plugin.ver>3.0.1</maven.source.plugin.ver>
<maven.clean.plugin.ver>3.1.0</maven.clean.plugin.ver>
+ <maven.javadoc.plugin.ver>3.2.0</maven.javadoc.plugin.ver>
<org.antlr4.ver>4.9.3</org.antlr4.ver>
<jline.ver>3.21.0</jline.ver>
<commons.io.ver>2.11.0</commons.io.ver>