From 47d5287860666129de839d9780c9c87461576e0c Mon Sep 17 00:00:00 2001 From: "Peter M. Stahl" Date: Tue, 2 Aug 2022 15:19:16 +0200 Subject: [PATCH] Update release notes for 1.2.2 --- README.md | 24 +++++++++---------- RELEASE_NOTES.md | 9 +++++++ gradle.properties | 2 +- .../lingua/api/LanguageDetectorTest.kt | 2 -- 4 files changed, 22 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index ff9f4b91..fadf876c 100644 --- a/README.md +++ b/README.md @@ -2163,10 +2163,10 @@ The detailed statistics table that contains all accuracy values can be written w ``` // Groovy syntax -implementation 'com.github.pemistahl:lingua:1.2.1' +implementation 'com.github.pemistahl:lingua:1.2.2' // Kotlin syntax -implementation("com.github.pemistahl:lingua:1.2.1") +implementation("com.github.pemistahl:lingua:1.2.2") ``` ### 7.2 Using Maven @@ -2175,7 +2175,7 @@ implementation("com.github.pemistahl:lingua:1.2.1") com.github.pemistahl lingua - 1.2.1 + 1.2.2 ``` @@ -2189,9 +2189,9 @@ cd lingua ./gradlew build ``` Several jar archives can be created from the project. -1. `./gradlew jar` assembles `lingua-1.2.1.jar` containing the compiled sources only. -2. `./gradlew sourcesJar` assembles `lingua-1.2.1-sources.jar` containing the plain source code. -3. `./gradlew jarWithDependencies` assembles `lingua-1.2.1-with-dependencies.jar` containing the +1. `./gradlew jar` assembles `lingua-1.2.2.jar` containing the compiled sources only. +2. `./gradlew sourcesJar` assembles `lingua-1.2.2-sources.jar` containing the plain source code. +3. `./gradlew jarWithDependencies` assembles `lingua-1.2.2-with-dependencies.jar` containing the compiled sources and all external dependencies needed at runtime. This jar file can be included in projects without dependency management systems. It can also be used to run *Lingua* in standalone mode (see below). @@ -2367,7 +2367,7 @@ from memory but the thread pool will keep running. If you want to try out *Lingua* before you decide whether to use it or not, you can run it in a REPL and immediately see its detection results. 1. With Gradle: `./gradlew runLinguaOnConsole --console=plain` -2. Without Gradle: `java -jar lingua-1.2.1-with-dependencies.jar` +2. Without Gradle: `java -jar lingua-1.2.2-with-dependencies.jar` Then just play around: @@ -2459,7 +2459,7 @@ introduced with Java 8. 11. Fix the existing unit tests by adding your new language. 12. Add your new language to property [`linguaSupportedLanguages`][gradle properties url] in `/gradle.properties`. -13. Run `./gradlew writeAccuracyReports` and add the updated accuracy reports to your pull request. +13. Run `./gradlew accuracyReport` and add the updated accuracy reports to your pull request. 14. Run `./gradlew drawAccuracyPlots` and add the updated plots to your pull request. 15. Run `./gradlew writeAccuracyTable` and add the updated accuracy table to your pull request. 16. Be happy! :-) You have successfully contributed a new language and have thereby significantly widened @@ -2476,8 +2476,8 @@ Take a look at the [planned issues](https://github.com/pemistahl/lingua/mileston [codecov badge]: https://codecov.io/gh/pemistahl/lingua/branch/main/graph/badge.svg [codecov url]: https://codecov.io/gh/pemistahl/lingua [supported languages badge]: https://img.shields.io/badge/supported%20languages-75-green.svg -[lingua version badge]: https://img.shields.io/badge/Download%20Jar-1.2.1-blue.svg -[lingua download url]: https://github.com/pemistahl/lingua/releases/download/v1.2.1/lingua-1.2.1-with-dependencies.jar +[lingua version badge]: https://img.shields.io/badge/Download%20Jar-1.2.2-blue.svg +[lingua download url]: https://github.com/pemistahl/lingua/releases/download/v1.2.2/lingua-1.2.2-with-dependencies.jar [Kotlin platforms badge]: https://img.shields.io/badge/platforms-JDK%206%2B-blue.svg [Kotlin platforms url]: https://kotlinlang.org/docs/reference/server-overview.html [license badge]: https://img.shields.io/badge/license-Apache%202.0-blue.svg @@ -2487,8 +2487,8 @@ Take a look at the [planned issues](https://github.com/pemistahl/lingua/mileston [Apache OpenNLP]: https://opennlp.apache.org/docs/1.9.3/manual/opennlp.html#tools.langdetect [Optimaize Language Detector]: https://github.com/optimaize/language-detector [GitHub Packages]: https://github.com/pemistahl/lingua/packages/766181 -[Maven Central]: https://search.maven.org/artifact/com.github.pemistahl/lingua/1.2.1/jar -[Maven Central badge]: https://img.shields.io/badge/Maven%20Central-1.2.1-green.svg +[Maven Central]: https://search.maven.org/artifact/com.github.pemistahl/lingua/1.2.2/jar +[Maven Central badge]: https://img.shields.io/badge/Maven%20Central-1.2.2-green.svg [ACCURACY_PLOTS.md]: https://github.com/pemistahl/lingua/blob/main/ACCURACY_PLOTS.md [ACCURACY_TABLE.md]: https://github.com/pemistahl/lingua/blob/main/ACCURACY_TABLE.md [accuracy reports url]: https://github.com/pemistahl/lingua/tree/main/accuracy-reports diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 6f8f6782..e6ad3e1d 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,12 @@ +## Lingua 1.2.2 (released on 02 Aug 2022) + +### Bug Fixes + +- Due to a bug in the Moshi JSON serialization library, language detection + was not possible in certain cases. (#144, #147) +- Lingua could not be used properly when a security manager was enabled + in the JVM. (#141) + ## Lingua 1.2.1 (released on 09 Jun 2022) ### Bug Fixes diff --git a/gradle.properties b/gradle.properties index b1b803c7..1715ef6a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -29,7 +29,7 @@ linguaGroupId=com.github.pemistahl linguaArtifactId=lingua -linguaVersion=1.2.1 +linguaVersion=1.2.2 linguaName=Lingua diff --git a/src/test/kotlin/com/github/pemistahl/lingua/api/LanguageDetectorTest.kt b/src/test/kotlin/com/github/pemistahl/lingua/api/LanguageDetectorTest.kt index 184f7590..ab2d993a 100644 --- a/src/test/kotlin/com/github/pemistahl/lingua/api/LanguageDetectorTest.kt +++ b/src/test/kotlin/com/github/pemistahl/lingua/api/LanguageDetectorTest.kt @@ -81,7 +81,6 @@ import com.github.pemistahl.lingua.internal.Ngram import com.github.pemistahl.lingua.internal.TestDataLanguageModel import io.mockk.every import io.mockk.impl.annotations.MockK -import io.mockk.impl.annotations.SpyK import io.mockk.junit5.MockKExtension import it.unimi.dsi.fastutil.objects.Object2FloatOpenHashMap import org.assertj.core.api.Assertions.assertThat @@ -229,7 +228,6 @@ class LanguageDetectorTest { @MockK private lateinit var quadrigramTestDataLanguageModel: TestDataLanguageModel - @SpyK private var detectorForEnglishAndGerman = LanguageDetector( languages = mutableSetOf(ENGLISH, GERMAN), minimumRelativeDistance = 0.0,