From b1a035e5f0b26ef71be27fb0321ef5bec7164dfc Mon Sep 17 00:00:00 2001 From: vinhkhuc Date: Sun, 5 Feb 2017 19:26:13 -0800 Subject: [PATCH] Synced v0.1 to Maven Central. --- README.md | 14 +++++- pom.xml | 133 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 144 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 439bdb3..a14b2e1 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,16 @@ This library provides full fastText's command line interface. It also provides t into memory for label prediction. Model training is only done via the command line interface. Hence, JFastText is ideal for building Java Web applications for text classification using the model trained offline. +## Maven dependency +```xml + + com.github.vinhkhuc + jfasttext + 0.1 + +``` + + ## Building Maven 3.x and C++ compiler (g++ on Mac/Linux or cl.exe on Windows) are required to build the Jar package. @@ -34,8 +44,10 @@ jft.runCmd(new String[] { "-output", "src/test/resources/models/supervised.model" }); -# Load model from file and do label prediction +# Load model from file jft.loadModel("src/test/resources/models/supervised.model.bin"); + +# Do label prediction String text = "What is the most popular game in the US ?"; JFastText.ProbLabel predictedProbLabel = jft.predictProba(text); System.out.printf("\nThe label of '%s' is '%s' with probability %f\n", diff --git a/pom.xml b/pom.xml index 180284a..56039d6 100644 --- a/pom.xml +++ b/pom.xml @@ -7,13 +7,79 @@ com.github.vinhkhuc jfasttext 0.1 - jar - Java interface for fastText + + JFastText is a Java interface for fastText, a library for efficient learning of + word representations and sentence classification. + + jar http://maven.apache.org + + + BSD License + + + + + + vinhkhuc + Vinh Khuc + http://github.com/vinhkhuc + + architect + developer + + + + + + scm:git:https://github.com/vinhkhuc/JFastText.git + scm:git:git@github.com:vinhkhuc/JFastText.git + https://github.com/vinhkhuc/JFastText + + + + UTF-8 + + + + + ossrh + https://oss.sonatype.org/content/repositories/snapshots + + + ossrh + https://oss.c.org/service/local/staging/deploy/maven2/ + + + + + + + disable-java8-doclint + + [1.8,) + + + -Xdoclint:none + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.3 + true + + ossrh + https://oss.sonatype.org/ + true + + org.apache.maven.plugins maven-compiler-plugin @@ -21,8 +87,71 @@ 1.7 1.7 + -Xlint:all + true + true + + org.apache.maven.plugins + maven-source-plugin + 2.4 + + + attach-sources + verify + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.9.1 + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 1.3.1 + + + enforce + + + + + + + + enforce + + + + org.bytedeco javacpp