Giter Site home page Giter Site logo

dongjinleekr / beanpiece Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 0.0 241 KB

A Java binding to Google SentencePiece

License: Apache License 2.0

Java 9.97% C++ 82.45% Scala 2.95% C 4.63%
google-sentencepiece java-bindings natural-language-processing neural-machine-translation word-segmentation

beanpiece's People

Contributors

dongjinleekr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

beanpiece's Issues

Missing requirement

I had some problems running a project using the beanpiece:
java.lang.UnsatisfiedLinkError: /tmp/libsentencepiece820278351167742621.so: libprotobuf.so.10: cannot open shared object file: No such file or directory
This missing file (libprotobuf.so.10) can be corrected by installing the protobuf-cpp-3.0.0, maybe in some new versions but not with the 3.6.1 available for my OS (Fedora 30).
I think that this dependecy should be on the readme or the project use the agnostic free lib libprotobuf.so.

Building on macos location of dylib differs from expected.

On intel i7 2015 MacBook Pro running HighSierra 10.13.5

Mismatch between "os.arch" in sbt.build vs NativeUtils.java path.

In sbt.build os.arch = x86_64.

Building beanpiece libsentencepiece.dylib is placed in /osx/x86_64/libsentencepiece.dylib.

However at runtime when NativeUtils.java attempts to load the appropriate libary it searches in /osx/i386/libsentencepiece.dylib

in NativeUtils path returns i386 due to

private static Architecture architecture() {
        String arch = System.getProperty("os.arch").toLowerCase(Locale.ENGLISH);
         // arch = "x86_64"
        if (arch.contains("ppc")) {
            return Architecture.PPC;
        } else if (arch.contains("i386") || arch.contains("x86")) {
            return Architecture.I386;
        } else if (arch.contains("amd64") || arch.contains("x86_64")) {
            return Architecture.AMD64;
        } else {
            throw new IllegalArgumentException("Unsupported architecture: " + arch);
        }
    }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.