Skip to content

Commit a436167

Browse files
author
Oleg Serikov
committed
Created using Colaboratory
1 parent eac04a2 commit a436167

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

UDPipe.ipynb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"## Что это?\n",
5151
"\n",
5252
"* наша цель -- представить предложение естественного языка в виде дерева\n",
53-
"* слова предложения -- вершины; *зависимости (dependencies)* между ними -- рёбра\n",
53+
"* слова предложения -- узлы; *зависимости (dependencies)* между ними -- рёбра\n",
5454
"* зависимости могут быть разными: например, субъект глагола, объект глагола, прилагательное-модификатор, и так далее\n",
5555
"\n",
5656
"## Формат\n",
@@ -95,7 +95,7 @@
9595
"source": [
9696
"print(my_example)"
9797
],
98-
"execution_count": 2,
98+
"execution_count": 0,
9999
"outputs": [
100100
{
101101
"output_type": "stream",
@@ -160,7 +160,7 @@
160160
"!pip3 install conllu\n",
161161
"from conllu import parse"
162162
],
163-
"execution_count": 3,
163+
"execution_count": 0,
164164
"outputs": [
165165
{
166166
"output_type": "stream",
@@ -190,7 +190,7 @@
190190
"sentence = sentences[0]\n",
191191
"print(sentence[0])"
192192
],
193-
"execution_count": 4,
193+
"execution_count": 0,
194194
"outputs": [
195195
{
196196
"output_type": "execute_result",
@@ -233,7 +233,7 @@
233233
"source": [
234234
"print(sentence[-1])"
235235
],
236-
"execution_count": 5,
236+
"execution_count": 0,
237237
"outputs": [
238238
{
239239
"output_type": "execute_result",
@@ -304,7 +304,7 @@
304304
"!pip3 install ufal.udpipe\n",
305305
"from ufal.udpipe import Model, Pipeline"
306306
],
307-
"execution_count": 6,
307+
"execution_count": 0,
308308
"outputs": [
309309
{
310310
"output_type": "stream",
@@ -349,7 +349,7 @@
349349
"UDPIPE_MODEL_FN = \"model_ru.udpipe\"\n",
350350
"!wget -O {UDPIPE_MODEL_FN} https://github.com/jwijffels/udpipe.models.ud.2.0/blob/master/inst/udpipe-ud-2.0-170801/russian-ud-2.0-170801.udpipe?raw=true"
351351
],
352-
"execution_count": 7,
352+
"execution_count": 0,
353353
"outputs": [
354354
{
355355
"output_type": "stream",
@@ -409,7 +409,7 @@
409409
"parsed = pipeline.process(example)\n",
410410
"print(parsed)"
411411
],
412-
"execution_count": 9,
412+
"execution_count": 0,
413413
"outputs": [
414414
{
415415
"output_type": "stream",
@@ -449,11 +449,11 @@
449449
"metadata": {
450450
"id": "crcWCaQ2vwGn",
451451
"colab_type": "code",
452+
"outputId": "c9ed0f15-1733-4cb1-cc20-7f8452b7748d",
452453
"colab": {
453454
"base_uri": "https://localhost:8080/",
454455
"height": 71
455-
},
456-
"outputId": "c9ed0f15-1733-4cb1-cc20-7f8452b7748d"
456+
}
457457
},
458458
"source": [
459459
"sentences = parse(parsed)\n",
@@ -462,7 +462,7 @@
462462
"print(pre_last_token)\n",
463463
"print(list(pre_last_token.keys()))"
464464
],
465-
"execution_count": 10,
465+
"execution_count": 0,
466466
"outputs": [
467467
{
468468
"output_type": "stream",
@@ -475,4 +475,4 @@
475475
]
476476
}
477477
]
478-
}
478+
}

0 commit comments

Comments
 (0)