GithubHelp home page GithubHelp logo

lizaku / vec2graph Goto Github PK

View Code? Open in Web Editor NEW
28.0 28.0 3.0 46 KB

Mini-library for producing graph visualizations from embedding models

License: MIT License

HTML 3.78% JavaScript 18.50% Python 77.71%

vec2graph's People

Contributors

akutuzov avatar ananastii avatar lizaku avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

vec2graph's Issues

Argument depth doesn't work

Always one page for the query token is generated
No alerts with depth=-0.5 (depth must be integer and positive.

`vec2graph` not working with Gensim 4.0

Attempt to run vec2graph with gensim=4.0.0 produces error:

Traceback (most recent call last):
File "graphs.py", line 13, in
visualize('graphs', model, 'party')
File "C:\Anaconda\lib\site-packages\vec2graph\genviz.py", line 146, in visualize
data = get_data(model, words, depth=depth, topn=topn)
File "C:\Anaconda\lib\site-packages\vec2graph\genviz.py", line 23, in get_data
if word not in model.vocab:
File "C:\Anaconda\lib\site-packages\gensim-4.0.1-py3.8-win-amd64.egg\gensim\models\keyedvectors.py", line 645, in vocab
raise AttributeError(
AttributeError: The vocab attribute was removed from KeyedVector in Gensim 4.0.0.
Use KeyedVector's .key_to_index dict, .index_to_key list, and methods .get_vecattr(key, attr) and .set_vecattr(key, attr, new_val) instead.
See https://github.com/RaRe-Technologies/gensim/wiki/Migrating-from-Gensim-3.x-to-4

Get graph in JSON

It would be great to get some JSON representation of a graph in output (to export into custom graph editor).

Also, have an idea to add some filters for similar words array.

I will try to do mods by myself, but it wouldn't be soon.

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.