Data Visualization with DisplaCy (Spacy and Python Tutorial for DH 09)

preview_player
Показать описание

If you enjoy this video, please subscribe. I provide all my content at no cost. If you want to support my channel, please donate via

If there's a specific video you would like to see or a tutorial series, let me know in the comments and I will try and make it.

You can follow me at:
Рекомендации по теме
Комментарии
Автор

Thank you for this video, Prof. Mattingly. I've been struggling with visualization and used some other code which I didn't understand. Your code is very clear and effective. Also, in this particular sentence "... down went Alice...", "Alice" is the subject of the sentence with the subject/main verb inverted. Spacy probably didn't classify it properly because of inversion 3 years ago when you recorded the video. I've tested it just now and Spacy did classify it correctly as the subject of the sentence.

chessketeer
Автор

If you're using above render method in a jupyter notebook, it will return an empty html string. The concrete problem above is that displacy.render auto-detects that you're in a jupyter notebook and displays the output directly instead of returning HTML.
Important note:
To explicitly enable or disable “Jupyter mode”, you can use the jupyter keyword argument – e.g. to return raw HTML in a notebook, or to force Jupyter rendering if auto-detection fails.
html = displacy.render(sentence, style="dep", jupyter=False) :)

hamzaehsankhan
Автор

Thanks for this! In my output of the ent visualizations, I get a lot of gibberish characters instead of the original single and/or double quotes such as: "over with fright. “Oh, I beg your pardon!â€". Any idea why this happens?

iljackb
Автор

Hi, I have a doubt. I used this sentence "Today Monday 12th it is planned that Fulton Hogan will construct the road formation on top of the prepared fill., Update 12 July 2021" in spacy for named entity recognition. But in output each entity "Today", "Monday" and "12" are recognize as 3 separate labels and annotated as "Date" for each of them. But in displacy visualization it has recognize as "Today" is one entity and "Monday 12th" is another entity.So could you please explain which code recognize "Monday 12" as a single entity in displacy visualization?

sangeeth
Автор

Hi thanks alot for this great video ... how to get the code please

KhaliDALKhafaji