Skip to content

Commit

Permalink
Adjust project versioning scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcono1234 committed Oct 30, 2022
1 parent fa5fe2f commit 6ceb290
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ In general you should notice the following improvements when using this library:
This is especially noticeable when configuring Tiny Lingua to preload the models for all languages.
- Reduced memory usage for language models
With all language models loaded the original Lingua library requires > 1.2 GB of memory whereas this
library requires ~150 MB. (Though in most uses cases detection of all supported languages is not
library requires ~150 MB. (Though in most use cases detection of all supported languages is not
necessary and a subset of these languages suffices.)
- Reduced memory consumption during language detection
The original Lingua library can require multiple MBs of temporary memory during language detection,
Expand Down Expand Up @@ -50,6 +50,13 @@ returned by the original Lingua library. However, the differences should be negl
- The code may not be easily maintainable and integrating future upstream Lingua changes might be
difficult.

The versioning scheme is `<version>-L<upstream-lingua-version>`. For example `1.0.0-L1.2.2` means:
- Tiny Lingua version 1.0.0
- based on upstream Lingua version 1.2.2

Note that the upstream Lingua version number does not guarantee that all of the APIs and functionality
are supported. Some features might be omitted (or replaced) in this library.

The original README description (possibly with some adjustments) follows below:

---
Expand Down
10 changes: 6 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ import java.util.Locale
val linguaTaskGroup: String by project
val linguaGroupId: String by project
val linguaArtifactId: String by project
val linguaVersion: String by project
val projectVersion: String by project
// Version of the upstream Lingua project on which this project is based
val upstreamProjectVersion: String by project
val linguaName: String by project
val linguaDescription: String by project
val linguaLicenseName: String by project
Expand All @@ -45,7 +47,7 @@ val linguaCsvHeader: String by project
val compileTestKotlin: KotlinCompile by tasks

group = linguaGroupId
version = linguaVersion
version = "$projectVersion-L$upstreamProjectVersion"
description = linguaDescription

plugins {
Expand Down Expand Up @@ -417,7 +419,7 @@ val checkLanguageModelsChecksum by tasks.registering {
}

dependencies {
lingua("com.github.pemistahl:lingua:$linguaVersion")
lingua("com.github.pemistahl:lingua:$upstreamProjectVersion")

implementation(kotlin("stdlib"))
implementation(libs.fastutil)
Expand Down Expand Up @@ -445,7 +447,7 @@ publishing {
create<MavenPublication>("lingua") {
groupId = linguaGroupId
artifactId = linguaArtifactId
version = linguaVersion
version = version

from(components["kotlin"])

Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ linguaGroupId=com.github.marcono1234

linguaArtifactId=tiny-lingua

linguaVersion=1.2.2
projectVersion=1.0.0
upstreamProjectVersion=1.2.2

linguaName=Tiny Lingua

Expand Down

0 comments on commit 6ceb290

Please sign in to comment.