Skip to content

Commit

Permalink
prepare for maven release (#4)
Browse files Browse the repository at this point in the history
* prepare for maven release

* Create LICENSE

* Update README.md
  • Loading branch information
manzurola committed Jul 8, 2022
1 parent 656b3d6 commit a37a613
Show file tree
Hide file tree
Showing 17 changed files with 206 additions and 123 deletions.
21 changes: 21 additions & 0 deletions LICENSE
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Guy Manzurola

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
7 changes: 3 additions & 4 deletions README.md
Expand Up @@ -2,7 +2,7 @@

![maven](https://github.com/manzurola/errgent/actions/workflows/maven.yml/badge.svg)

A Java library for generating grammatical mistakes in natural language text.
Generate grammatical mistakes in natural language text.

Article - [Errgent - Grammatical Error Generator](https://guymanzurola.medium.com/errgent-grammatical-error-generation-toolkit-8048cf9d03ae).

Expand All @@ -11,17 +11,16 @@ Article - [Errgent - Grammatical Error Generator](https://guymanzurola.medium.co
Before you begin, ensure you have met the following requirements:

* You have Java 11 installed.
* You have access to Github Packages Maven registry as described [here](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry#authenticating-to-github-packages).
* You have the necessary prerequisites for [Errant4J](https://github.com/manzurola/errant4j#prerequisits).

## Installing Errgent

Add this to the dependencies section of your `pom.xml`:
```xml
<dependency>
<groupId>com.github.manzurola</groupId>
<groupId>io.github.manzurola</groupId>
<artifactId>errgent</artifactId>
<version>0.2.0</version>
<version>0.3.0</version>
</dependency>
```

Expand Down
163 changes: 113 additions & 50 deletions pom.xml
Expand Up @@ -4,65 +4,60 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.github.manzurola</groupId>
<groupId>io.github.manzurola</groupId>
<artifactId>errgent</artifactId>
<version>0.2.0</version>
<version>0.3.0</version>

<name>errgent</name>
<description>Generate grammatical mistakes in natural language text</description>
<url>https://github.com/manzurola/errgent</url>

<developers>
<developer>
<name>Guy Manzurola</name>
<email>guy.manzurola@gmail.com</email>
<roles>
<role>developer</role>
</roles>
</developer>
</developers>

<licenses>
<license>
<name>MIT License</name>
<url>https://github.com/manzurola/errgent/blob/main/LICENSE</url>
</license>
</licenses>

<scm>
<connection>scm:git:git://github.com/manzurola/errgent.git</connection>
<developerConnection>scm:git:git@github.com:manzurola/errgent.git</developerConnection>
<url>https://github.com/manzurola/errgent</url>
<tag>HEAD</tag>
</scm>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<junit-jupiter.version>5.5.2</junit-jupiter.version>
<logback.version>1.2.0</logback.version>
<errant4j.version>0.4.0</errant4j.version>
<spacy4j.version>0.3.0</spacy4j.version>
<junit-jupiter.version>5.8.2</junit-jupiter.version>
<logback.version>1.2.11</logback.version>
<errant4j.version>0.5.0</errant4j.version>
<spacy4j.version>0.4.0</spacy4j.version>
<simplenlg.version>4.5.0</simplenlg.version>
</properties>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>github</id>
<name>errgent</name>
<url>https://maven.pkg.github.com/manzurola/errgent</url>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<dependencies>
<dependency>
<groupId>com.github.manzurola</groupId>
<artifactId>spacy4j-adapters-corenlp</artifactId>
<version>${spacy4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.manzurola</groupId>
<artifactId>spacy4j-adapters-spacy-server</artifactId>
<version>${spacy4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.manzurola</groupId>
<artifactId>errant4j</artifactId>
<version>${errant4j.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
</dependency>
<dependency>
<groupId>uk.ac.abdn</groupId>
<artifactId>SimpleNLG</artifactId>
<version>${simplenlg.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
Expand All @@ -74,10 +69,14 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<show>private</show>
<nohelp>true</nohelp>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -86,7 +85,6 @@
<executions>
<execution>
<id>attach-sources</id>
<phase>verify</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
Expand All @@ -98,6 +96,35 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
<configuration>
<keyname>${gpg.keyname}</keyname>
<passphraseServerId>${gpg.passphrase}</passphraseServerId>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
Expand All @@ -106,4 +133,40 @@
</plugins>
</build>

<dependencies>
<dependency>
<groupId>io.github.manzurola</groupId>
<artifactId>spacy4j-adapters-corenlp</artifactId>
<version>${spacy4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.github.manzurola</groupId>
<artifactId>spacy4j-adapters-spacy-server</artifactId>
<version>${spacy4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.github.manzurola</groupId>
<artifactId>errant4j</artifactId>
<version>${errant4j.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
</dependency>
<dependency>
<groupId>uk.ac.abdn</groupId>
<artifactId>SimpleNLG</artifactId>
<version>${simplenlg.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

</project>
16 changes: 0 additions & 16 deletions src/main/java/com/github/manzurola/errgent/core/Errgent.java

This file was deleted.

This file was deleted.

16 changes: 16 additions & 0 deletions src/main/java/io/github/manzurola/errgent/core/Errgent.java
@@ -0,0 +1,16 @@
package io.github.manzurola.errgent.core;

import io.github.manzurola.errant4j.core.Annotator;
import io.github.manzurola.errant4j.core.Errant;
import io.github.manzurola.errgent.lang.en.EnInflector;
import io.github.manzurola.spacy4j.api.SpaCy;

public interface Errgent {

static Generator forEnglish(SpaCy spaCy) {
Annotator annotator = Errant.forEnglish(spaCy);
return new GeneratorImpl(
new EnInflector(), annotator
);
}
}
@@ -1,6 +1,6 @@
package com.github.manzurola.errgent.core;
package io.github.manzurola.errgent.core;

import com.github.manzurola.errant4j.core.errors.GrammaticalError;
import io.github.manzurola.errant4j.core.errors.GrammaticalError;

import java.util.Objects;
import java.util.function.Function;
Expand Down
@@ -1,7 +1,7 @@
package com.github.manzurola.errgent.core;
package io.github.manzurola.errgent.core;

import com.github.manzurola.errant4j.core.errors.GrammaticalError;
import com.github.manzurola.spacy4j.api.containers.Doc;
import io.github.manzurola.errant4j.core.errors.GrammaticalError;
import io.github.manzurola.spacy4j.api.containers.Doc;

import java.util.List;

Expand Down
@@ -1,11 +1,11 @@
package com.github.manzurola.errgent.core;
package io.github.manzurola.errgent.core;

import com.github.manzurola.errant4j.core.Annotation;
import com.github.manzurola.errant4j.core.Annotator;
import com.github.manzurola.errant4j.core.errors.GrammaticalError;
import com.github.manzurola.errgent.core.inflection.Inflector;
import com.github.manzurola.spacy4j.api.containers.Doc;
import com.github.manzurola.spacy4j.api.containers.Span;
import io.github.manzurola.errant4j.core.Annotation;
import io.github.manzurola.errant4j.core.Annotator;
import io.github.manzurola.errant4j.core.errors.GrammaticalError;
import io.github.manzurola.errgent.core.inflection.Inflector;
import io.github.manzurola.spacy4j.api.containers.Doc;
import io.github.manzurola.spacy4j.api.containers.Span;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
@@ -1,8 +1,8 @@
package com.github.manzurola.errgent.core.inflection;
package io.github.manzurola.errgent.core.inflection;

import com.github.manzurola.errant4j.core.Annotator;
import com.github.manzurola.spacy4j.api.containers.Doc;
import com.github.manzurola.spacy4j.api.containers.Token;
import io.github.manzurola.errant4j.core.Annotator;
import io.github.manzurola.spacy4j.api.containers.Doc;
import io.github.manzurola.spacy4j.api.containers.Token;

import java.util.Objects;

Expand Down
@@ -1,6 +1,6 @@
package com.github.manzurola.errgent.core.inflection;
package io.github.manzurola.errgent.core.inflection;

import com.github.manzurola.spacy4j.api.containers.Token;
import io.github.manzurola.spacy4j.api.containers.Token;

import java.util.stream.Stream;

Expand Down
@@ -1,8 +1,8 @@
package com.github.manzurola.errgent.lang.en;
package io.github.manzurola.errgent.lang.en;

import com.github.manzurola.errant4j.lang.en.utils.wordlist.HunspellWordList;
import com.github.manzurola.errant4j.lang.en.utils.wordlist.WordList;
import com.github.manzurola.errgent.core.inflection.Inflection;
import io.github.manzurola.errant4j.lang.en.utils.wordlist.HunspellWordList;
import io.github.manzurola.errant4j.lang.en.utils.wordlist.WordList;
import io.github.manzurola.errgent.core.inflection.Inflection;

import java.util.Arrays;
import java.util.Optional;
Expand Down

0 comments on commit a37a613

Please sign in to comment.