Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.sadjava:JSimpleMarkovGenerator:v0.2.1'
}
dependencies {
implementation("com.github.sadjava:JSimpleMarkovGenerator:v0.2.1")
}
<dependency>
<groupId>com.github.sadjava</groupId>
<artifactId>JSimpleMarkovGenerator</artifactId>
<version>v0.2.1</version>
</dependency>
libraryDependencies += "com.github.sadjava" % "JSimpleMarkovGenerator" % "v0.2.1"
:dependencies [[com.github.sadjava/JSimpleMarkovGenerator "v0.2.1"]]
"to generate superficially real-looking text given a drink"
Markov Chains are a random process that that undergoes transitions from one state to another, and applied to text generation, produces a seemingly real sentence based off of random generation from its internal state; the example given at the start of this section was generated from a sentence from the Wikipedia article about Markov Chains, adjusted to make tense sense: "Markov processes can be used to generate superficially real-looking text given a sample document" and the movie intermission song: "lets all go to the lobby and get ourselves a drink", with the actual result of the generator ironically summarizing what it does.
Couple notes about this: Yes, I know the pom file is probably useless. Yes, I know the concurrent classes probably would fail epically. If this bothers you, fork the heck out of this and fix it. :)