ruby-spacy 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +58 -0
  3. data/.yardopts +2 -0
  4. data/Gemfile +18 -0
  5. data/Gemfile.lock +39 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.md +498 -0
  8. data/Rakefile +12 -0
  9. data/bin/console +15 -0
  10. data/bin/setup +8 -0
  11. data/examples/get_started/lexeme.rb +24 -0
  12. data/examples/get_started/linguistic_annotations.rb +32 -0
  13. data/examples/get_started/most_similar.rb +46 -0
  14. data/examples/get_started/named_entities.rb +24 -0
  15. data/examples/get_started/outputs/test_dep.svg +84 -0
  16. data/examples/get_started/outputs/test_dep_compact.svg +84 -0
  17. data/examples/get_started/outputs/test_ent.html +11 -0
  18. data/examples/get_started/pos_tags_and_dependencies.rb +31 -0
  19. data/examples/get_started/similarity.rb +13 -0
  20. data/examples/get_started/tokenization.rb +22 -0
  21. data/examples/get_started/visualizing_dependencies.rb +14 -0
  22. data/examples/get_started/visualizing_dependencies_compact.rb +12 -0
  23. data/examples/get_started/visualizing_named_entities.rb +12 -0
  24. data/examples/get_started/vocab.rb +10 -0
  25. data/examples/get_started/word_vectors.rb +24 -0
  26. data/examples/japanese/ancestors.rb +44 -0
  27. data/examples/japanese/entity_annotations_and_labels.rb +45 -0
  28. data/examples/japanese/information_extraction.rb +27 -0
  29. data/examples/japanese/lemmatization.rb +32 -0
  30. data/examples/japanese/most_similar.rb +46 -0
  31. data/examples/japanese/named_entity_recognition.rb +27 -0
  32. data/examples/japanese/navigating_parse_tree.rb +34 -0
  33. data/examples/japanese/noun_chunks.rb +23 -0
  34. data/examples/japanese/outputs/test_dep.svg +149 -0
  35. data/examples/japanese/outputs/test_ent.html +16 -0
  36. data/examples/japanese/pos_tagging.rb +34 -0
  37. data/examples/japanese/sentence_segmentation.rb +16 -0
  38. data/examples/japanese/similarity.rb +12 -0
  39. data/examples/japanese/tokenization.rb +38 -0
  40. data/examples/japanese/visualizing_dependencies.rb +13 -0
  41. data/examples/japanese/visualizing_named_entities.rb +14 -0
  42. data/examples/linguistic_features/ancestors.rb +41 -0
  43. data/examples/linguistic_features/entity_annotations_and_labels.rb +29 -0
  44. data/examples/linguistic_features/finding_a_verb_with_a_subject.rb +20 -0
  45. data/examples/linguistic_features/information_extraction.rb +36 -0
  46. data/examples/linguistic_features/iterating_children.rb +24 -0
  47. data/examples/linguistic_features/iterating_lefts_and_rights.rb +20 -0
  48. data/examples/linguistic_features/lemmatization.rb +31 -0
  49. data/examples/linguistic_features/morphology.rb +17 -0
  50. data/examples/linguistic_features/named_entity_recognition.rb +25 -0
  51. data/examples/linguistic_features/navigating_parse_tree.rb +32 -0
  52. data/examples/linguistic_features/noun_chunks.rb +27 -0
  53. data/examples/linguistic_features/outputs/test_ent.html +11 -0
  54. data/examples/linguistic_features/pos_tagging.rb +31 -0
  55. data/examples/linguistic_features/retokenize_1.rb +29 -0
  56. data/examples/linguistic_features/retokenize_2.rb +16 -0
  57. data/examples/linguistic_features/rule_based_morphology.rb +12 -0
  58. data/examples/linguistic_features/sentence_segmentation.rb +16 -0
  59. data/examples/linguistic_features/similarity.rb +14 -0
  60. data/examples/linguistic_features/similarity_between_spans.rb +23 -0
  61. data/examples/linguistic_features/special_case_tokenization_rules.rb +19 -0
  62. data/examples/linguistic_features/tokenization.rb +23 -0
  63. data/examples/rule_based_matching/creating_spans_from_matches.rb +16 -0
  64. data/examples/rule_based_matching/matcher.rb +19 -0
  65. data/lib/ruby-spacy.rb +567 -0
  66. data/lib/ruby-spacy/version.rb +6 -0
  67. data/ruby-spacy.gemspec +42 -0
  68. metadata +157 -0
@@ -0,0 +1,12 @@
1
+ require "ruby-spacy"
2
+
3
+ nlp = Spacy::Language.new("en_core_web_sm")
4
+
5
+ sentence ="When Sebastian Thrun started working on self-driving cars at Google in 2007, few people outside of the company took him seriously."
6
+ doc = nlp.read(sentence)
7
+
8
+ ent_html = doc.displacy(style: 'ent')
9
+
10
+ File.open(File.join(File.dirname(__FILE__), "test_ent.html"), "w") do |file|
11
+ file.write(ent_html)
12
+ end
@@ -0,0 +1,10 @@
1
+ require "ruby-spacy"
2
+
3
+ nlp = Spacy::Language.new("en_core_web_sm")
4
+ doc = nlp.read("I love coffee")
5
+
6
+ pp doc.vocab.strings["coffee"]
7
+ pp doc.vocab.strings[3197928453018144401]
8
+
9
+ # 3197928453018144401
10
+ # "coffee"
@@ -0,0 +1,24 @@
1
+ require "ruby-spacy"
2
+ require "terminal-table"
3
+
4
+ nlp = Spacy::Language.new("en_core_web_lg")
5
+ doc = nlp.read("dog cat banana afskfsd")
6
+
7
+ headings = ["text", "has_vector", "vector_norm", "is_oov"]
8
+ rows = []
9
+
10
+ doc.each do |token|
11
+ rows << [token.text, token.has_vector, token.vector_norm, token.is_oov]
12
+ end
13
+
14
+ table = Terminal::Table.new rows: rows, headings: headings
15
+ puts table
16
+
17
+ # +---------+------------+-------------------+--------+
18
+ # | text | has_vector | vector_norm | is_oov |
19
+ # +---------+------------+-------------------+--------+
20
+ # | dog | true | 7.033673286437988 | false |
21
+ # | cat | true | 6.680818557739258 | false |
22
+ # | banana | true | 6.700014114379883 | false |
23
+ # | afskfsd | false | 0.0 | true |
24
+ # +---------+------------+-------------------+--------+
@@ -0,0 +1,44 @@
1
+ require "ruby-spacy"
2
+ require "terminal-table"
3
+
4
+ nlp = Spacy::Language.new("ja_core_news_lg")
5
+
6
+ sentence = "私の父は寿司が好きだ。"
7
+ doc = nlp.read(sentence)
8
+
9
+ headings = ["text", "dep", "n_lefts", "n_rights", "ancestors"]
10
+ rows = []
11
+
12
+ root = doc.tokens.select do |t|
13
+ # need to compare token and its head using their indices
14
+ t.i == t.head.i
15
+ end.first
16
+
17
+ puts "The sentence: " + sentence
18
+
19
+ # subject = Spacy::Token.new(root.lefts[0])
20
+ subject = Spacy::Token.new(root.lefts[0])
21
+
22
+ puts "The root of the sentence is: " + root.text
23
+ puts "The subject of the sentence is: " + subject.text
24
+
25
+ subject.subtree.each do |descendant|
26
+ # need to convert "ancestors" object from a python generator to a ruby array
27
+ ancestors = Spacy::generator_to_array(descendant.ancestors)
28
+ rows << [descendant.text, descendant.dep_, descendant.n_lefts, descendant.n_rights, ancestors]
29
+ end
30
+
31
+ table = Terminal::Table.new rows: rows, headings: headings
32
+ puts table
33
+
34
+ # The sentence: 私の父は寿司が好きだ。
35
+ # The root of the sentence is: 好き
36
+ # The subject of the sentence is: 父
37
+ # +------+------------+---------+----------+----------------+
38
+ # | text | dep | n_lefts | n_rights | ancestors |
39
+ # +------+------------+---------+----------+----------------+
40
+ # | 私 | nmod | 0 | 1 | [父, 好き] |
41
+ # | の | case | 0 | 0 | [私, 父, 好き] |
42
+ # | 父 | dislocated | 1 | 1 | [好き] |
43
+ # | は | case | 0 | 0 | [父, 好き] |
44
+ # +------+------------+---------+----------+----------------+
@@ -0,0 +1,45 @@
1
+ require "ruby-spacy"
2
+ require "terminal-table"
3
+
4
+ nlp = Spacy::Language.new("ja_core_news_lg")
5
+
6
+ sentence = "同志社大学は日本の京都にある私立大学で、新島襄という人物が創立しました。"
7
+ doc = nlp.read(sentence)
8
+
9
+ headings = ["text", "ent_iob", "ent_iob_", "ent_type_"]
10
+ rows = []
11
+
12
+ doc.each do |ent|
13
+ rows << [ent.text, ent.ent_iob, ent.ent_iob_, ent.ent_type_]
14
+ end
15
+
16
+ table = Terminal::Table.new rows: rows, headings: headings
17
+ puts table
18
+
19
+ # +--------+---------+----------+-----------+
20
+ # | text | ent_iob | ent_iob_ | ent_type_ |
21
+ # +--------+---------+----------+-----------+
22
+ # | 同志社 | 3 | B | ORG |
23
+ # | 大学 | 1 | I | ORG |
24
+ # | は | 2 | O | |
25
+ # | 日本 | 3 | B | GPE |
26
+ # | の | 2 | O | |
27
+ # | 京都 | 3 | B | GPE |
28
+ # | に | 2 | O | |
29
+ # | ある | 2 | O | |
30
+ # | 私立 | 2 | O | |
31
+ # | 大学 | 2 | O | |
32
+ # | で | 2 | O | |
33
+ # | 、 | 2 | O | |
34
+ # | 新島 | 3 | B | PERSON |
35
+ # | 襄 | 1 | I | PERSON |
36
+ # | と | 2 | O | |
37
+ # | いう | 2 | O | |
38
+ # | 人物 | 2 | O | |
39
+ # | が | 2 | O | |
40
+ # | 創立 | 2 | O | |
41
+ # | し | 2 | O | |
42
+ # | まし | 2 | O | |
43
+ # | た | 2 | O | |
44
+ # | 。 | 2 | O | |
45
+ # +--------+---------+----------+-----------+
@@ -0,0 +1,27 @@
1
+ require( "ruby-spacy")
2
+ require "terminal-table"
3
+
4
+ nlp = Spacy::Language.new("ja_core_news_lg")
5
+
6
+ nlp.add_pipe("merge_entities")
7
+ nlp.add_pipe("merge_noun_chunks")
8
+
9
+ texts = [
10
+ "アメリカ合衆国の国土面積は日本の約25倍あります。",
11
+ "現在1ドルは日本円で110円です。",
12
+ ]
13
+
14
+ texts.each do |text|
15
+ doc = nlp.read(text)
16
+ doc.each do |token|
17
+ if token.dep_ == "case"
18
+ puts token.head.text + " --> " + token.text
19
+ end
20
+ end
21
+ end
22
+
23
+ # アメリカ合衆国 --> の
24
+ # 国土面積 --> は
25
+ # 日本 --> の
26
+ # 現在1ドル --> は
27
+ # 日本円 --> で
@@ -0,0 +1,32 @@
1
+ require "ruby-spacy"
2
+ require "terminal-table"
3
+
4
+ nlp = Spacy::Language.new("ja_core_news_sm")
5
+
6
+ doc = nlp.read("私は論文を読んでいるところだった。")
7
+
8
+ headings = ["text", "lemma"]
9
+ rows = []
10
+
11
+ doc.each do |token|
12
+ rows << [token.text, token.lemma_]
13
+ end
14
+
15
+ table = Terminal::Table.new rows: rows, headings: headings
16
+ puts table
17
+
18
+ # +--------+--------+
19
+ # | text | lemma |
20
+ # +--------+--------+
21
+ # | 私 | 私 |
22
+ # | は | は |
23
+ # | 論文 | 論文 |
24
+ # | を | を |
25
+ # | 読ん | 読む |
26
+ # | で | で |
27
+ # | いる | いる |
28
+ # | ところ | ところ |
29
+ # | だっ | だ |
30
+ # | た | た |
31
+ # | 。 | 。 |
32
+ # +--------+--------+
@@ -0,0 +1,46 @@
1
+ require "ruby-spacy"
2
+ require "terminal-table"
3
+
4
+ nlp = Spacy::Language.new("ja_core_news_lg")
5
+
6
+ tokyo = nlp.get_lexeme("東京")
7
+ japan = nlp.get_lexeme("日本")
8
+ france = nlp.get_lexeme("フランス")
9
+
10
+ query = tokyo.vector - japan.vector + france.vector
11
+
12
+ headings = ["key", "text", "score"]
13
+ rows = []
14
+
15
+ results = nlp.most_similar(query, 20)
16
+ results.each do |lexeme|
17
+ rows << [lexeme[:key], lexeme[:text], lexeme[:score],]
18
+ end
19
+
20
+ table = Terminal::Table.new rows: rows, headings: headings
21
+ puts table
22
+
23
+ # +----------------------+----------------+--------------------+
24
+ # | key | text | score |
25
+ # +----------------------+----------------+--------------------+
26
+ # | 12090003238699662352 | パリ | 0.7376999855041504 |
27
+ # | 18290786970454458111 | フランス | 0.7221999764442444 |
28
+ # | 9360021637096476946 | 東京 | 0.6697999835014343 |
29
+ # | 2437546359230213520 | ストラスブール | 0.631600022315979 |
30
+ # | 13988178952745813186 | リヨン | 0.5939000248908997 |
31
+ # | 10427160276079242800 | Paris | 0.574400007724762 |
32
+ # | 5562396768860926997 | ベルギー | 0.5683000087738037 |
33
+ # | 15029176915627965481 | ニース | 0.5679000020027161 |
34
+ # | 9750625950625019690 | アルザス | 0.5644999742507935 |
35
+ # | 2381640614569534741 | 南仏 | 0.5547999739646912 |
36
+ # | 7486004458946554189 | ロンドン | 0.5525000095367432 |
37
+ # | 7457654095417343716 | モンマルトル | 0.5453000068664551 |
38
+ # | 14063777960246535660 | ブローニュ | 0.5338000059127808 |
39
+ # | 3297880777656467136 | トゥールーズ | 0.5275999903678894 |
40
+ # | 3059066136348671923 | バスティーユ | 0.5213000178337097 |
41
+ # | 2423471048892368989 | フランス人 | 0.5194000005722046 |
42
+ # | 15944886306236465675 | ロレーヌ | 0.5148000121116638 |
43
+ # | 9592561648283566590 | モンパルナス | 0.513700008392334 |
44
+ # | 6560045335275831141 | 渡仏 | 0.5131000280380249 |
45
+ # | 8597467336360225096 | イタリア | 0.5127000212669373 |
46
+ # +----------------------+----------------+--------------------+
@@ -0,0 +1,27 @@
1
+ require "ruby-spacy"
2
+ require "terminal-table"
3
+
4
+ nlp = Spacy::Language.new("ja_core_news_lg")
5
+
6
+ sentence = "任天堂は1983年にファミコンを14,800円で発売した。"
7
+ doc = nlp.read(sentence)
8
+
9
+ headings = ["text", "start", "end", "label"]
10
+ rows = []
11
+
12
+ doc.ents.each do |ent|
13
+ rows << [ent.text, ent.start_char, ent.end_char, ent.label_]
14
+ end
15
+
16
+ table = Terminal::Table.new rows: rows, headings: headings
17
+ puts table
18
+
19
+ # +------------+-------+-----+---------+
20
+ # | text | start | end | label |
21
+ # +------------+-------+-----+---------+
22
+ # | 任天堂 | 0 | 3 | ORG |
23
+ # | 1983年 | 4 | 9 | DATE |
24
+ # | ファミコン | 10 | 15 | PRODUCT |
25
+ # | 14,800円 | 16 | 23 | MONEY |
26
+ # +------------+-------+-----+---------+
27
+
@@ -0,0 +1,34 @@
1
+ require "ruby-spacy"
2
+ require "terminal-table"
3
+
4
+ nlp = Spacy::Language.new("ja_core_news_sm")
5
+
6
+ doc = nlp.read("自動運転車は保険責任を製造者に転嫁する。")
7
+
8
+ headings = ["text", "dep", "head text", "head pos", "children"]
9
+ rows = []
10
+
11
+ doc.each do |token|
12
+ rows << [token.text, token.dep_, token.head.text, token.head.pos_, token.children.to_s]
13
+ end
14
+
15
+ table = Terminal::Table.new rows: rows, headings: headings
16
+ puts table
17
+
18
+ # +------+----------+-----------+----------+--------------------------+
19
+ # | text | dep | head text | head pos | children |
20
+ # +------+----------+-----------+----------+--------------------------+
21
+ # | 自動 | compound | 車 | NOUN | [] |
22
+ # | 運転 | compound | 車 | NOUN | [] |
23
+ # | 車 | nsubj | 転嫁 | VERB | [自動, 運転, は] |
24
+ # | は | case | 車 | NOUN | [] |
25
+ # | 保険 | compound | 責任 | NOUN | [] |
26
+ # | 責任 | obj | 転嫁 | VERB | [保険, を] |
27
+ # | を | case | 責任 | NOUN | [] |
28
+ # | 製造 | compound | 者 | NOUN | [] |
29
+ # | 者 | obl | 転嫁 | VERB | [製造, に] |
30
+ # | に | case | 者 | NOUN | [] |
31
+ # | 転嫁 | ROOT | 転嫁 | VERB | [車, 責任, 者, する, 。] |
32
+ # | する | aux | 転嫁 | VERB | [] |
33
+ # | 。 | punct | 転嫁 | VERB | [] |
34
+ # +------+----------+-----------+----------+--------------------------+
@@ -0,0 +1,23 @@
1
+ require "ruby-spacy"
2
+ require "terminal-table"
3
+
4
+ nlp = Spacy::Language.new("ja_core_news_lg")
5
+
6
+ doc = nlp.read("自動運転車は保険責任を製造者に転嫁する。")
7
+
8
+ headings = ["text", "root.text", "root.dep", "root.head.text"]
9
+ rows = []
10
+
11
+ doc.noun_chunks.each do |chunk|
12
+ rows << [chunk.text, chunk.root.text, chunk.root.dep_, chunk.root.head.text]
13
+ end
14
+
15
+ table = Terminal::Table.new rows: rows, headings: headings
16
+ puts table
17
+
18
+ # +------------+-----------+----------+----------------+
19
+ # | text | root.text | root.dep | root.head.text |
20
+ # +------------+-----------+----------+----------------+
21
+ # | 自動運転車 | 車 | nsubj | 転嫁 |
22
+ # | 製造者 | 者 | obl | 転嫁 |
23
+ # +------------+-----------+----------+----------------+
@@ -0,0 +1,149 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:lang="ja" id="f7ccefe3c5304a1eac38bdfa9bbd6bf2-0" class="displacy" width="2150" height="487.0" direction="ltr" style="max-width: none; height: 487.0px; color: #000000; background: #ffffff; font-family: Arial; direction: ltr">
2
+ <text class="displacy-token" fill="currentColor" text-anchor="middle" y="397.0">
3
+ <tspan class="displacy-word" fill="currentColor" x="50">自動</tspan>
4
+ <tspan class="displacy-tag" dy="2em" fill="currentColor" x="50">NOUN</tspan>
5
+ </text>
6
+
7
+ <text class="displacy-token" fill="currentColor" text-anchor="middle" y="397.0">
8
+ <tspan class="displacy-word" fill="currentColor" x="225">運転</tspan>
9
+ <tspan class="displacy-tag" dy="2em" fill="currentColor" x="225">NOUN</tspan>
10
+ </text>
11
+
12
+ <text class="displacy-token" fill="currentColor" text-anchor="middle" y="397.0">
13
+ <tspan class="displacy-word" fill="currentColor" x="400">車</tspan>
14
+ <tspan class="displacy-tag" dy="2em" fill="currentColor" x="400">NOUN</tspan>
15
+ </text>
16
+
17
+ <text class="displacy-token" fill="currentColor" text-anchor="middle" y="397.0">
18
+ <tspan class="displacy-word" fill="currentColor" x="575">は</tspan>
19
+ <tspan class="displacy-tag" dy="2em" fill="currentColor" x="575">ADP</tspan>
20
+ </text>
21
+
22
+ <text class="displacy-token" fill="currentColor" text-anchor="middle" y="397.0">
23
+ <tspan class="displacy-word" fill="currentColor" x="750">保険</tspan>
24
+ <tspan class="displacy-tag" dy="2em" fill="currentColor" x="750">NOUN</tspan>
25
+ </text>
26
+
27
+ <text class="displacy-token" fill="currentColor" text-anchor="middle" y="397.0">
28
+ <tspan class="displacy-word" fill="currentColor" x="925">責任</tspan>
29
+ <tspan class="displacy-tag" dy="2em" fill="currentColor" x="925">NOUN</tspan>
30
+ </text>
31
+
32
+ <text class="displacy-token" fill="currentColor" text-anchor="middle" y="397.0">
33
+ <tspan class="displacy-word" fill="currentColor" x="1100">を</tspan>
34
+ <tspan class="displacy-tag" dy="2em" fill="currentColor" x="1100">ADP</tspan>
35
+ </text>
36
+
37
+ <text class="displacy-token" fill="currentColor" text-anchor="middle" y="397.0">
38
+ <tspan class="displacy-word" fill="currentColor" x="1275">製造</tspan>
39
+ <tspan class="displacy-tag" dy="2em" fill="currentColor" x="1275">NOUN</tspan>
40
+ </text>
41
+
42
+ <text class="displacy-token" fill="currentColor" text-anchor="middle" y="397.0">
43
+ <tspan class="displacy-word" fill="currentColor" x="1450">者</tspan>
44
+ <tspan class="displacy-tag" dy="2em" fill="currentColor" x="1450">NOUN</tspan>
45
+ </text>
46
+
47
+ <text class="displacy-token" fill="currentColor" text-anchor="middle" y="397.0">
48
+ <tspan class="displacy-word" fill="currentColor" x="1625">に</tspan>
49
+ <tspan class="displacy-tag" dy="2em" fill="currentColor" x="1625">ADP</tspan>
50
+ </text>
51
+
52
+ <text class="displacy-token" fill="currentColor" text-anchor="middle" y="397.0">
53
+ <tspan class="displacy-word" fill="currentColor" x="1800">転嫁</tspan>
54
+ <tspan class="displacy-tag" dy="2em" fill="currentColor" x="1800">VERB</tspan>
55
+ </text>
56
+
57
+ <text class="displacy-token" fill="currentColor" text-anchor="middle" y="397.0">
58
+ <tspan class="displacy-word" fill="currentColor" x="1975">する。</tspan>
59
+ <tspan class="displacy-tag" dy="2em" fill="currentColor" x="1975">AUX</tspan>
60
+ </text>
61
+
62
+ <g class="displacy-arrow">
63
+ <path class="displacy-arc" id="arrow-f7ccefe3c5304a1eac38bdfa9bbd6bf2-0-0" stroke-width="2px" d="M70,352.0 C70,177.0 390.0,177.0 390.0,352.0" fill="none" stroke="currentColor"/>
64
+ <text dy="1.25em" style="font-size: 0.8em; letter-spacing: 1px">
65
+ <textPath xlink:href="#arrow-f7ccefe3c5304a1eac38bdfa9bbd6bf2-0-0" class="displacy-label" startOffset="50%" side="left" fill="currentColor" text-anchor="middle">compound</textPath>
66
+ </text>
67
+ <path class="displacy-arrowhead" d="M70,354.0 L62,342.0 78,342.0" fill="currentColor"/>
68
+ </g>
69
+
70
+ <g class="displacy-arrow">
71
+ <path class="displacy-arc" id="arrow-f7ccefe3c5304a1eac38bdfa9bbd6bf2-0-1" stroke-width="2px" d="M245,352.0 C245,264.5 385.0,264.5 385.0,352.0" fill="none" stroke="currentColor"/>
72
+ <text dy="1.25em" style="font-size: 0.8em; letter-spacing: 1px">
73
+ <textPath xlink:href="#arrow-f7ccefe3c5304a1eac38bdfa9bbd6bf2-0-1" class="displacy-label" startOffset="50%" side="left" fill="currentColor" text-anchor="middle">compound</textPath>
74
+ </text>
75
+ <path class="displacy-arrowhead" d="M245,354.0 L237,342.0 253,342.0" fill="currentColor"/>
76
+ </g>
77
+
78
+ <g class="displacy-arrow">
79
+ <path class="displacy-arc" id="arrow-f7ccefe3c5304a1eac38bdfa9bbd6bf2-0-2" stroke-width="2px" d="M420,352.0 C420,2.0 1800.0,2.0 1800.0,352.0" fill="none" stroke="currentColor"/>
80
+ <text dy="1.25em" style="font-size: 0.8em; letter-spacing: 1px">
81
+ <textPath xlink:href="#arrow-f7ccefe3c5304a1eac38bdfa9bbd6bf2-0-2" class="displacy-label" startOffset="50%" side="left" fill="currentColor" text-anchor="middle">nsubj</textPath>
82
+ </text>
83
+ <path class="displacy-arrowhead" d="M420,354.0 L412,342.0 428,342.0" fill="currentColor"/>
84
+ </g>
85
+
86
+ <g class="displacy-arrow">
87
+ <path class="displacy-arc" id="arrow-f7ccefe3c5304a1eac38bdfa9bbd6bf2-0-3" stroke-width="2px" d="M420,352.0 C420,264.5 560.0,264.5 560.0,352.0" fill="none" stroke="currentColor"/>
88
+ <text dy="1.25em" style="font-size: 0.8em; letter-spacing: 1px">
89
+ <textPath xlink:href="#arrow-f7ccefe3c5304a1eac38bdfa9bbd6bf2-0-3" class="displacy-label" startOffset="50%" side="left" fill="currentColor" text-anchor="middle">case</textPath>
90
+ </text>
91
+ <path class="displacy-arrowhead" d="M560.0,354.0 L568.0,342.0 552.0,342.0" fill="currentColor"/>
92
+ </g>
93
+
94
+ <g class="displacy-arrow">
95
+ <path class="displacy-arc" id="arrow-f7ccefe3c5304a1eac38bdfa9bbd6bf2-0-4" stroke-width="2px" d="M770,352.0 C770,264.5 910.0,264.5 910.0,352.0" fill="none" stroke="currentColor"/>
96
+ <text dy="1.25em" style="font-size: 0.8em; letter-spacing: 1px">
97
+ <textPath xlink:href="#arrow-f7ccefe3c5304a1eac38bdfa9bbd6bf2-0-4" class="displacy-label" startOffset="50%" side="left" fill="currentColor" text-anchor="middle">compound</textPath>
98
+ </text>
99
+ <path class="displacy-arrowhead" d="M770,354.0 L762,342.0 778,342.0" fill="currentColor"/>
100
+ </g>
101
+
102
+ <g class="displacy-arrow">
103
+ <path class="displacy-arc" id="arrow-f7ccefe3c5304a1eac38bdfa9bbd6bf2-0-5" stroke-width="2px" d="M945,352.0 C945,89.5 1795.0,89.5 1795.0,352.0" fill="none" stroke="currentColor"/>
104
+ <text dy="1.25em" style="font-size: 0.8em; letter-spacing: 1px">
105
+ <textPath xlink:href="#arrow-f7ccefe3c5304a1eac38bdfa9bbd6bf2-0-5" class="displacy-label" startOffset="50%" side="left" fill="currentColor" text-anchor="middle">obj</textPath>
106
+ </text>
107
+ <path class="displacy-arrowhead" d="M945,354.0 L937,342.0 953,342.0" fill="currentColor"/>
108
+ </g>
109
+
110
+ <g class="displacy-arrow">
111
+ <path class="displacy-arc" id="arrow-f7ccefe3c5304a1eac38bdfa9bbd6bf2-0-6" stroke-width="2px" d="M945,352.0 C945,264.5 1085.0,264.5 1085.0,352.0" fill="none" stroke="currentColor"/>
112
+ <text dy="1.25em" style="font-size: 0.8em; letter-spacing: 1px">
113
+ <textPath xlink:href="#arrow-f7ccefe3c5304a1eac38bdfa9bbd6bf2-0-6" class="displacy-label" startOffset="50%" side="left" fill="currentColor" text-anchor="middle">case</textPath>
114
+ </text>
115
+ <path class="displacy-arrowhead" d="M1085.0,354.0 L1093.0,342.0 1077.0,342.0" fill="currentColor"/>
116
+ </g>
117
+
118
+ <g class="displacy-arrow">
119
+ <path class="displacy-arc" id="arrow-f7ccefe3c5304a1eac38bdfa9bbd6bf2-0-7" stroke-width="2px" d="M1295,352.0 C1295,264.5 1435.0,264.5 1435.0,352.0" fill="none" stroke="currentColor"/>
120
+ <text dy="1.25em" style="font-size: 0.8em; letter-spacing: 1px">
121
+ <textPath xlink:href="#arrow-f7ccefe3c5304a1eac38bdfa9bbd6bf2-0-7" class="displacy-label" startOffset="50%" side="left" fill="currentColor" text-anchor="middle">compound</textPath>
122
+ </text>
123
+ <path class="displacy-arrowhead" d="M1295,354.0 L1287,342.0 1303,342.0" fill="currentColor"/>
124
+ </g>
125
+
126
+ <g class="displacy-arrow">
127
+ <path class="displacy-arc" id="arrow-f7ccefe3c5304a1eac38bdfa9bbd6bf2-0-8" stroke-width="2px" d="M1470,352.0 C1470,177.0 1790.0,177.0 1790.0,352.0" fill="none" stroke="currentColor"/>
128
+ <text dy="1.25em" style="font-size: 0.8em; letter-spacing: 1px">
129
+ <textPath xlink:href="#arrow-f7ccefe3c5304a1eac38bdfa9bbd6bf2-0-8" class="displacy-label" startOffset="50%" side="left" fill="currentColor" text-anchor="middle">obl</textPath>
130
+ </text>
131
+ <path class="displacy-arrowhead" d="M1470,354.0 L1462,342.0 1478,342.0" fill="currentColor"/>
132
+ </g>
133
+
134
+ <g class="displacy-arrow">
135
+ <path class="displacy-arc" id="arrow-f7ccefe3c5304a1eac38bdfa9bbd6bf2-0-9" stroke-width="2px" d="M1470,352.0 C1470,264.5 1610.0,264.5 1610.0,352.0" fill="none" stroke="currentColor"/>
136
+ <text dy="1.25em" style="font-size: 0.8em; letter-spacing: 1px">
137
+ <textPath xlink:href="#arrow-f7ccefe3c5304a1eac38bdfa9bbd6bf2-0-9" class="displacy-label" startOffset="50%" side="left" fill="currentColor" text-anchor="middle">case</textPath>
138
+ </text>
139
+ <path class="displacy-arrowhead" d="M1610.0,354.0 L1618.0,342.0 1602.0,342.0" fill="currentColor"/>
140
+ </g>
141
+
142
+ <g class="displacy-arrow">
143
+ <path class="displacy-arc" id="arrow-f7ccefe3c5304a1eac38bdfa9bbd6bf2-0-10" stroke-width="2px" d="M1820,352.0 C1820,264.5 1960.0,264.5 1960.0,352.0" fill="none" stroke="currentColor"/>
144
+ <text dy="1.25em" style="font-size: 0.8em; letter-spacing: 1px">
145
+ <textPath xlink:href="#arrow-f7ccefe3c5304a1eac38bdfa9bbd6bf2-0-10" class="displacy-label" startOffset="50%" side="left" fill="currentColor" text-anchor="middle">aux</textPath>
146
+ </text>
147
+ <path class="displacy-arrowhead" d="M1960.0,354.0 L1968.0,342.0 1952.0,342.0" fill="currentColor"/>
148
+ </g>
149
+ </svg>