Giter VIP home page Giter VIP logo

dissect's Introduction

DIStributional SEmantics Composition Toolkit

For documentation, please, refer to http://clic.cimec.unitn.it/composes/toolkit/

Support for word2vec binaries

Word2Vec binaries can be converted into a .dm format using ./dev/tests/word2vec_bin_to_dm.c

cd dev-tests
gcc word2vec_bin_to_dm.c
./a.out PATH_TO_WORD_2_VEC_BINARY > word2vec.dm

or you can also directly use the python interface to import the binary model in your python code.
But NOTE : The python implementation will be slower as it doesnot currently use Cython for an optimized way to process the binary file

import composes.utils.space_utils as space_utils

space_file = "PATH_TO/"+ "word2vec_model.bin"
# result can be True or False depending on if it was successful
# the binary format released by the google folks has changed the few times(depending on the internal version they use), so you never know :(
(result, space) = space_utils.load_word2vec_bnary_as_space(space_file)

#Now this is a Space class object of DISSECT, and hence you use all the available composition models, etc on it
#Refer to word2vec_example.py for more detailed usage instructions

Installation

git clone https://github.com/spMohanty/dissect
cd dissect
python setup.py install

Usage

You can run the test example using

cd dissect
python src/examples/word2vec_example.py

dissect's People

Contributors

composes-toolkit avatar spmohanty avatar dimazest avatar germank avatar mbatchkarov avatar georgiana-dinu avatar

Watchers

James Cloos avatar  avatar

Forkers

aliases

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.