This directory contains example codes that generate a paraphrase lattice and search a phrase in the generated lattice.
All bindings require cargo and rustc for building the parattice library.
Install the latest Rust refering this documentation.
To convert the generated lattice to an image file, install Graphviz beforehand:
Debian/Ubuntu:
sudo apt install graphvizMac OS X (Homebrew)
brew install graphvizJust run cargo run in rust directory.
To convert the generated lattice to an image file, run dot -Tpng -O ./paraphrase-lattice.dot.
-
Install cmake as follows:
Debian/Ubuntu:
sudo apt install cmake
Mac OS X (Homebrew):
brew install cmake
-
Run
cargo build --releasein the top derectory of this repository to build parattice library. -
Run
cmake . && makein cpp directory to build the example code. -
Run
./parattice_example. -
To convert the generated lattice to an image file, run
dot -Tpng -O ./paraphrase-lattice.dot.
-
Install Leiningen refering this documentation.
-
Install gradle as follows:
Debian/Ubuntu:
sudo apt install gradle
Mac OS X (Homebrew):
brew install gradle
-
Run
cargo build --releasein the top derectory of this repository to build parattice library. -
Run the following commands in the top directory of this repository to build and to install JAR files of parattice:
gradle -b bindings/jni/build.gradle build gradle -b bindings/jni/build.gradle publishToMavenLocal
-
If you use Mac OS X, please edit project.clj as follows:
[parattice "0.2.2-SNAPSHOT" :classifier "linux-amd64"]
↓↓↓
[parattice "0.2.2-SNAPSHOT" :classifier "darwin-amd64"]
-
Run
lein runin clojure directory. -
To convert the generated lattice to an image file, run
dot -Tpng -O ./paraphrase-lattice.dot.