Technical Agency, that also happens to specialize in Drupal
Product Recommendations
pio build --verbose
[INFO] [Engine$] Using command '/PredictionIO-0.12.0-incubating/sbt/sbt' at /engines/similar-text to build.
[INFO] [Engine$] If the path above is incorrect, this process will fail.
[INFO] [Engine$] Uber JAR disabled. Making sure lib/pio-assembly-0.12.0-incubating.jar is absent.
[INFO] [Engine$] Going to run: /PredictionIO-0.12.0-incubating/sbt/sbt package assemblyPackageDependency in /engines/similar-text
[INFO] [Engine$] [info] Loading project definition from /engines/similar-text/project
[INFO] [Engine$] [info] Set current project to pio-template-text-similarity (in build file:/engines/similar-text/)
[INFO] [Engine$] [success] Total time: 2 s, completed Aug 18, 2018 3:30:58 PM
[INFO] [Engine$] [info] Including from cache: scala-library-2.11.8.jar
[INFO] [Engine$] [info] Checking every *.class/*.jar file's SHA-1.
[INFO] [Engine$] [info] Merging files...
[INFO] [Engine$] [warn] Merging 'META-INF/MANIFEST.MF' with strategy 'discard'
[INFO] [Engine$] [warn] Strategy 'discard' was applied to a file
[INFO] [Engine$] [info] Assembly up to date: /engines/similar-text/target/scala-2.11/pio-template-text-similarity-assembly-0.1-SNAPSHOT-deps.jar
[INFO] [Engine$] [success] Total time: 12 s, completed Aug 18, 2018 3:31:09 PM
[INFO] [Engine$] Compilation finished successfully.
[INFO] [Engine$] Looking for an engine...
[INFO] [Engine$] Found pio-template-text-similarity_2.11-0.1-SNAPSHOT.jar
[INFO] [Engine$] Found pio-template-text-similarity-assembly-0.1-SNAPSHOT-deps.jar
[INFO] [Engine$] Build finished successfully.
[INFO] [Pio$] Your engine is ready for training.
pio train
[INFO] [CoreWorkflow$] Inserting persistent model
[INFO] [CoreWorkflow$] Updating engine instance
[INFO] [CoreWorkflow$] Training completed successfully.
{
"itemScores":[
{"item":"i0","score":0.7071067811865475},
{"item":"i1","score":0.7071067811865475},
{"item":"i2","score":0.5773502691896258},
{"item":"i3","score":0.5773502691896258}
]
}
You can build your own
def sumArray (m: Array[Double], n: Array[Double]): Array[Double] = {
for (i <- 0 until m.length) {m(i) += n(i)}
return m
}
def divArray (m: Array[Double], divisor: Double) : Array[Double] = {
for (i <- 0 until m.length) {m(i) /= divisor}
return m
}
def wordToVector (w:String, m: Word2VecModel, s: Int): Vector = {
try {
return m.transform(w)
} catch {
case e: Exception => return Vectors.zeros(s)
}
}
def normalizet(line: String) = java.text.Normalizer.normalize(line,java.text.Normalizer.Form.NFKD).replaceAll("\\p{InCombiningDiacriticalMarks}+","").toLowerCase
Proudly invented else where
To the library!
Releasing Official PredictionIO Docker Images
Drupal Module(s) (?) maybe