Skip to content

chrovis/parattice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

parattice: Recursive paraphrase lattice generator 🔄

This library takes a sentence and a paraphrase corpus, recursively finds paraphrases based on the corpus, expands the given sentence, and generates a paraphrase lattice.

This library also provides a method to search a phrase in the paraphrase lattice.

parattice is implemented in Rust, and this repository also provides C++ and Java bindings.

crates.io badge docs.rs badge

Usage

Add this to your Cargo.toml:

[dependencies]
parattice = "0.2.2"

Examples

Examples are contained in examples directory.

Build and Installation

Prerequisites:

  • Rust 2018 (>= 1.31)

Run the following commands:

cargo build --release
cargo test --release

C++ binding

Prerequisites:

  • C++11 compiler (GCC, Clang)
  • Googletest
mkdir cpp_build
cd cpp_build
cmake ../bindings/cpp -DPARATTICE_BUILD_TESTS=ON -DPARATTICE_GTEST_SOURCE_DIR=${PATH_TO_GOOGLETEST}
make VERBOSE=1
make test ARGS="-V"

Java binding

Prerequisites:

  • JDK (>= 8) and header files
gradle -b bindings/jni/build.gradle build
gradle -b bindings/jni/build.gradle publishToMavenLocal

The above commands generates two JAR files: a normal JAR file and a native library.

Patents

License

Copyright 2020 Xcoo, Inc.

Licensed under the Apache License, Version 2.0.