小编Fra*_*les的帖子

来自 google colab 中的 spacy 的置换

我正在尝试在 google colab 中运行一个显示服务器:

from spacy import displacy

frasesin=nlp("Yo quisiera saber porqué el jugador hizo tan mala jugada")

dep=[]
for x in range(1,len(frasesin)):
    dep.append([ frasesin[x].text, frasesin[x].dep_, frasesin[x].head.text])

dep
displacy.serve(frasesin, style="dep")

Run Code Online (Sandbox Code Playgroud)

它运行良好:

Using the 'dep' visualizer
Serving on http://0.0.0.0:5000 ...
Run Code Online (Sandbox Code Playgroud)

但是如何在 colab 中访问此端口以查看结果?

python spacy google-colaboratory

7
推荐指数
1
解决办法
2289
查看次数

标签 统计

google-colaboratory ×1

python ×1

spacy ×1