New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How could I inline nltk graph to jupyter notebook? #1765
Comments
ok possible work around could be by: 1 installing but as for me it looks more like a dirty hack. There should be some more robust way to render tree. |
I think it's a good idea to move away from |
Moving away from tkinter is a good idea in general, but there's already support for rendering trees as inline PNGs in notebooks:
|
Good catch! Someone else just opened a new issue (#1887) about the same thing. Not sure about the procedure, but can we merge them? |
Just to add to rmalouf solution which works for me after a few tweaks: Mac You need to have ghostscript installed for this to work: https://wiki.scribus.net/canvas/Installation_and_Configuration_of_Ghostscript If this fails due xcrun: error: invalid active developer path Then do the following first |
I've recently put together a pure python=>SVG tree-drawing package that can be used as a drop-in replacement for https://github.com/rawlins/svgling (n.b. if you want to fully avoid tkinter-related issues in Jupyter, you may also need to remove |
I have already asked this question on stackoverflow without any luck and decide to duplicate it here.
According to the sources of
nltk
it draws graph bytkinter (GUI)
but I need to inline this graph tojupyter notebook
. And I'm trying to do it inside of official docker from anaconda3 in other words I don't need any popup GUI here but just image inside of notebook, that should be render on server side by nltk lib.How could I overcome this by nltk? Maybe there is third party libs which could help there?
Sources of my try is here - the last 18th cell.
PS:
in the same time matplotlib inline by itself works like a charm. Could I use matplotlib for graph rendering?
Thanks!
The text was updated successfully, but these errors were encountered: