GithubHelp home page GithubHelp logo

trellixvulnteam / build-syntaxnet_j1fw Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tianran/build-syntaxnet

0.0 0.0 0.0 46.61 MB

A package for installing the (good old) SyntaxNet (Parsey McParseface) dependency parser.

Shell 1.03% JavaScript 0.05% C++ 46.65% Python 37.38% C 0.74% Objective-C 0.02% Java 0.17% TypeScript 2.53% CSS 0.01% Objective-C++ 0.18% Makefile 0.09% HTML 2.08% CMake 0.15% Jupyter Notebook 7.10% Dockerfile 0.03% Starlark 1.59% SWIG 0.20%

build-syntaxnet_j1fw's Introduction

build-syntaxnet

A package for installing the (good old) SyntaxNet (Parsey McParseface) dependency parser.

Install Anaconda2:

$ cd build
$ wget https://repo.anaconda.com/archive/Anaconda2-5.1.0-Linux-x86_64.sh
$ cd ..
$ bash build/Anaconda2-5.1.0-Linux-x86_64.sh

optional: add anaconda2/bin to PATH

optional: update

$ conda update conda
$ conda update anaconda

Install bazel:

$ cd build
$ wget https://github.com/bazelbuild/bazel/releases/download/0.3.1/bazel-0.3.1-installer-linux-x86_64.sh
$ chmod +x bazel-0.3.1-installer-linux-x86_64.sh
$ ./bazel-0.3.1-installer-linux-x86_64.sh --user
$ cd ..

add $HOME/bin to PATH

Config and install Tensorflow:

$ cd tensorflow-0.10.0
$ bash ./configure

If choose GPU support and CUDA is not installed at /usr/local, edit file third_party/gpus/crosstool/CROSSTOOL.tpl:

# Include directory for cuda headers.
# cxx_builtin_include_directory: "/usr/local/cuda%{cuda_version}/include"
cxx_builtin_include_directory: "/path/to/cuda/include"

Now build the python package:

  • with GPU:

    $ bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package

  • without GPU:

    $ bazel build -c opt //tensorflow/tools/pip_package:build_pip_package

Install the python package:

$ mkdir -p ../build/tensorflow_pkg
$ bazel-bin/tensorflow/tools/pip_package/build_pip_package ../build/tensorflow_pkg
$ cd ..
$ pip install --ignore-installed --upgrade build/tensorflow_pkg/tensorflow-0.10.0-py2-none-any.whl

Build Syntaxnet:

$ cd syntaxnet-goodold-repo
$ bazel build -c opt //syntaxnet:parser_ops.so

Install Syntaxnet:

$ cp -r ../syntaxnet ~
$ cp bazel-bin/syntaxnet/parser_ops.so ~/syntaxnet
$ cp -r syntaxnet/models/parsey_mcparseface ~/syntaxnet
$ ./parsey_mcparseface_context.sh ~/syntaxnet
$ cp ../bin/* ~/bin

Check:

$ echo "John loves Mary." | parse -v

build-syntaxnet_j1fw's People

Contributors

tianran avatar trellixvulnteam avatar

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.