File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change 57
57
" # graphviz.Source(deplacy.dot(doc))"
58
58
]
59
59
},
60
+ {
61
+ "cell_type" :" markdown" ,
62
+ "metadata" :{ "colab_type" :" text" },
63
+ "source" :[
64
+ " ## 於[GuwenCOMBO](https://github.com/KoichiYasuoka/GuwenCOMBO)\n "
65
+ ]
66
+ },
67
+ {
68
+ "cell_type" :" code" ,
69
+ "metadata" :{ "colab_type" :" code" },
70
+ "source" :[
71
+ " !pip install allennlp@git+https://github.com/allenai/allennlp\n " ,
72
+ " !pip install 'transformers<4.31'\n " ,
73
+ " !pip install deplacy guwencombo\n " ,
74
+ " !python -m spacy download en_core_web_sm\n " ,
75
+ " import guwencombo\n " ,
76
+ " nlp=guwencombo.load(Danku=True)\n " ,
77
+ " doc=nlp(\" 瓜田不納履李下不正冠\" )\n " ,
78
+ " import deplacy\n " ,
79
+ " deplacy.render(doc)\n " ,
80
+ " deplacy.serve(doc,port=None)\n " ,
81
+ " # import graphviz\n " ,
82
+ " # graphviz.Source(deplacy.dot(doc))"
83
+ ]
84
+ },
60
85
{
61
86
"cell_type" :" markdown" ,
62
87
"metadata" :{ "colab_type" :" text" },
Original file line number Diff line number Diff line change 40
40
冠 NOUN < ╝ obj
41
41
```
42
42
43
+ ## 於[ GuwenCOMBO] ( https://github.com/KoichiYasuoka/GuwenCOMBO )
44
+
45
+ ``` py
46
+ >> > import guwencombo
47
+ >> > nlp= guwencombo.load(Danku = True )
48
+ >> > doc= nlp(" 瓜田不納履李下不正冠" )
49
+ >> > import deplacy
50
+ >> > deplacy.render(doc)
51
+ 瓜 NOUN < ╗ nmod
52
+ 田 NOUN ═╝< ══╗ nsubj
53
+ 不 ADV < ══╗ ║ advmod
54
+ 納 VERB ═╗═╝═╝ root
55
+ 履 NOUN < ╝ obj
56
+ 李 PROPN ═╗< ══╗ nsubj
57
+ 下 NOUN < ╝ ║ flat
58
+ 不 ADV < ══╗ ║ advmod
59
+ 正 VERB ═╗═╝═╝ root
60
+ 冠 NOUN < ╝ obj
61
+ ```
62
+
43
63
## 於[ UD-Chinese] ( https://pypi.org/project/udchinese )
44
64
45
65
``` py
You can’t perform that action at this time.
0 commit comments