Skip to content

Commit

Permalink
Try to avoid tar file mode error on Windows
Browse files Browse the repository at this point in the history
Cannot change mode to rwxr-xr-x: Not a directory
  • Loading branch information
sbrunk committed Jul 8, 2023
1 parent d1efcf5 commit 8bdb65d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
11 changes: 10 additions & 1 deletion sentencepiece/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,16 @@ mkdir -p $PLATFORM
cd $PLATFORM
INSTALL_PATH=`pwd`
echo "Decompressing archives..."
tar -xzvf ../sentencepiece-$SENTENCEPIECE_VERSION.tar.gz

case $PLATFORM in
macosx-*)
tar -xzvf ../sentencepiece-$SENTENCEPIECE_VERSION.tar.gz
;;
*)
tar --no-overwrite-dir -xzvf ../sentencepiece-$SENTENCEPIECE_VERSION.tar.gz
;;
esac

cd sentencepiece-$SENTENCEPIECE_VERSION

CMAKE_CONFIG="-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH -DCMAKE_INSTALL_LIBDIR=$INSTALL_PATH/lib"
Expand Down
5 changes: 5 additions & 0 deletions sentencepiece/samples/SentencepieceExample.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
import org.bytedeco.javacpp.*;
import org.bytedeco.sentencepiece.*;

/**
* To try encoding you can download an existing model, i.e.
* wget https://nlp.h-its.org/bpemb/en/en.wiki.bpe.vs10000.model
* mvn compile exec:java -e -Dexec.mainClass=SentencepieceExample -D exec.args="en.wiki.bpe.vs10000.model"
*/
public final class SentencepieceExample {

public static void main(String[] args) {
Expand Down

0 comments on commit 8bdb65d

Please sign in to comment.