All Projects → nardeas → SyntaxNet-Tensorflow

nardeas / SyntaxNet-Tensorflow

Licence: other
Minimal Tensorflow Docker image with SyntaxNet/DRAGNN based on Alpine linux

Programming Languages

python
139335 projects - #7 most used programming language
Dockerfile
14818 projects
shell
77523 projects

Projects that are alternatives of or similar to SyntaxNet-Tensorflow

alpine-buildpack-deps
An attempt at a "buildpack-deps"-like Docker image with Alpine Linux
Stars: ✭ 30 (-14.29%)
Mutual labels:  alpine
alpine-grav
Grav running on Alpine Linux [Docker]
Stars: ✭ 14 (-60%)
Mutual labels:  alpine
docker-base
Just enough to get process supervision and startup mechanisms
Stars: ✭ 25 (-28.57%)
Mutual labels:  alpine
docker-alpine-gcc
The smallest Docker image with C compiler (GCC) (130MB)
Stars: ✭ 48 (+37.14%)
Mutual labels:  alpine
CAM
macOS camera recording using ffmpeg
Stars: ✭ 43 (+22.86%)
Mutual labels:  minimal
docker-nagios
Docker image for Nagios Core in Alpine Linux with basic plugins, available for x86, x64 , ARM v6, ARM v7 and ARM64.
Stars: ✭ 33 (-5.71%)
Mutual labels:  alpine
elixir-rediscl
A minimal redis client with connection pooling for elixir
Stars: ✭ 12 (-65.71%)
Mutual labels:  minimal
Magento2-Admin-Module-Sample
Minimal code to create an admin/backend module in Magento2
Stars: ✭ 45 (+28.57%)
Mutual labels:  minimal
tiny-framework
A light wight easy to use RESTful apis framework for education & demo purposes. stripped down framework to the fundamental components that that every one would essentially need to (learn / make a demo application).
Stars: ✭ 13 (-62.86%)
Mutual labels:  minimal
hugo-bare-min-theme
A bare minimum theme for Hugo (https://gohugo.io) to help develop and debug Hugo sites -- https://hugo-bare-min.netlify.com/,
Stars: ✭ 71 (+102.86%)
Mutual labels:  minimal
SSTMCSPGAAS
Stupidly Simple Tiny Minimal Coming Soon Page Generator As A Service
Stars: ✭ 23 (-34.29%)
Mutual labels:  minimal
syntaxnet-api
A small HTTP API for SyntaxNet
Stars: ✭ 20 (-42.86%)
Mutual labels:  syntaxnet
docker-aws-s3-sync
Docker container to sync a folder to Amazon S3
Stars: ✭ 21 (-40%)
Mutual labels:  alpine
DoGUI
Hello DoGUI: (not yet completed) Bloat-free Graphical User interface for C++ with minimal dependencies and a sleek default design
Stars: ✭ 19 (-45.71%)
Mutual labels:  minimal
docker-flask
Alpine + Docker + Flask + Gunicorn + Supervisor
Stars: ✭ 16 (-54.29%)
Mutual labels:  alpine
dockerfiles-nginx-auth-ldap
Nginx on Alpine with LDAP authentication module from kvspb/nginx-auth-ldap
Stars: ✭ 25 (-28.57%)
Mutual labels:  alpine
thewhite
✒️ It's a minimal and light wordpress blog theme 🎨
Stars: ✭ 87 (+148.57%)
Mutual labels:  minimal
Fedora-KDE-Minimal-Install-Guide
Guide to install KDE Plasma desktop environment on a minimal Fedora installation
Stars: ✭ 125 (+257.14%)
Mutual labels:  minimal
docker-jitsi-meet
Docker Jitsi Meet WebRTC conferencing system w/Prosody XMPP and s6 overlay
Stars: ✭ 66 (+88.57%)
Mutual labels:  alpine
packages
Cloud Posse DevOps distribution of linux packages for native apps, binaries, alpine packages, debian packages, and redhat packages.
Stars: ✭ 107 (+205.71%)
Mutual labels:  alpine

Tensorflow SyntaxNet/DRAGNN

Pulls Stars

docker pull nardeas/tensorflow-syntaxnet

Minimal Docker image based on Alpine with Tensorflow and SyntaxNet/DRAGNN support.

This is a production ready base image for your ML needs. Build your TF apps on top of this lean image to get the most out of your precious disk space.

Build typically takes 1-1.5 hours on a 2017 MacBook Pro.

Compressed size: ~190MB
Tensorflow version: 1.3.0-rc2
Python version: 2.7.14

Note that the Tensorflow version depends on what is supported by SyntaxNet. Building a working SN installation requires some additional operations not supported by TF as is.

This version uses the latest DRAGNN mode, which is much faster than the original SyntaxNet implementation!

hub.docker.com

You can pull the image from DockerHub via

docker pull nardeas/tensorflow-syntaxnet:latest

How to actually use

You can create your own image for your TF application by using this as base image.

Included is an easy to use DRAGNN wrapper that works with the pre-trained CoNLL17 models. Here is a reference how you can download the models.

[Direct link to models archive]

You can obviously train your own models as well. Please note that this version doesn't include GPU support.

Wrapper

The included DRAGNN wrapper is built into /usr/lib/python2.7/site-packages/dragnn/wrapper so you can simply do:

from dragnn.wrapper import SyntaxNet
sn = SyntaxNet(lang="English", model_dir="/path/to/model/dir", logging=False)
sn.parse("This is an example")

It will output a dict:

{
  "input": "This is an example",
  "output": [
    {
      "break_level": 0,
      "category": "",
      "dep": "nsubj",
      "fpos": "PRON++DT",
      "head": 3,
      "label": "nsubj",
      "number": "Sing",
      "pos_tag": "DT",
      "prontype": "Dem",
      "word": "This"
    },
    {
      ...

Note that lang is the subfolder name in model_dir which should contain the language specific segmenter and parser models. The default directory to search for models is /usr/local/tfmodels/. If you have downloaded and extracted the conll17.zip via the instructions above, you can launch the container like this:

# Mount the extracted models dir on host machine as volume in container

docker run -it -v <path/to/extracted/zip>:/usr/local/tfmodels/ nardeas/tensorflow-syntaxnet

and the above example should work out of the box. Only provide lang parameter to constructor (default "English").

Notes

This image contains a full Tensorflow installation. Any readily available pre-trained models are excluded from this image to keep it as lean as possible. Having SyntaxNet support doesn't produce much overhead so this image is well suited for use with any other TF applications as well.

Also note that this version doesn't include Bazel ops from the original SN. In other words you won't use stuff like bazel-bin/syntaxnet/parser_eval - you should use DRAGNN parser instead. The easiest way to get up and running fast is using the included DRAGNN wrapper.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].