rsyntaxtree 1.2.3 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.tags +364 -127
- data/Rakefile +3 -0
- data/bin/rsyntaxtree +2 -0
- data/docs/_examples/000.md +2 -1
- data/docs/_examples/001.md +1 -0
- data/docs/_examples/002.md +1 -0
- data/docs/_examples/003.md +1 -0
- data/docs/_examples/004.md +1 -0
- data/docs/_examples/005.md +1 -0
- data/docs/_examples/006.md +1 -0
- data/docs/_examples/007.md +1 -0
- data/docs/_examples/008.md +1 -0
- data/docs/_examples/009.md +1 -0
- data/docs/_examples/010.md +1 -0
- data/docs/_examples/011.md +1 -0
- data/docs/_examples/012.md +1 -0
- data/docs/_examples/013.md +1 -0
- data/docs/_examples/014.md +1 -0
- data/docs/_examples/015.md +1 -0
- data/docs/_examples/016.md +1 -0
- data/docs/_examples/017.md +1 -0
- data/docs/_examples/018.md +1 -0
- data/docs/_examples/019.md +1 -0
- data/docs/_examples/020.md +7 -6
- data/docs/_examples/021.md +1 -0
- data/docs/_examples/022.md +1 -0
- data/docs/_examples/023.md +1 -0
- data/docs/_examples/024.md +1 -0
- data/docs/_examples/025.md +1 -0
- data/docs/_examples/026.md +1 -0
- data/docs/_examples/027.md +1 -0
- data/docs/_examples/028.md +1 -0
- data/docs/_examples/029.md +1 -0
- data/docs/_examples/030.md +1 -0
- data/docs/_examples/031.md +1 -0
- data/docs/_examples/032.md +1 -0
- data/docs/_examples/033.md +1 -0
- data/docs/_examples/034.md +1 -0
- data/docs/_examples/035.md +1 -0
- data/docs/_examples/036.md +1 -0
- data/docs/_examples/037.md +1 -0
- data/docs/_examples/038.md +2 -1
- data/docs/_examples/039.md +2 -0
- data/docs/_examples/040.md +62 -0
- data/docs/_examples/041.md +34 -0
- data/docs/assets/img/000.png +0 -0
- data/docs/assets/img/001.png +0 -0
- data/docs/assets/img/002.png +0 -0
- data/docs/assets/img/003.png +0 -0
- data/docs/assets/img/004.png +0 -0
- data/docs/assets/img/005.png +0 -0
- data/docs/assets/img/006.png +0 -0
- data/docs/assets/img/007.png +0 -0
- data/docs/assets/img/008.png +0 -0
- data/docs/assets/img/009.png +0 -0
- data/docs/assets/img/010.png +0 -0
- data/docs/assets/img/011.png +0 -0
- data/docs/assets/img/012.png +0 -0
- data/docs/assets/img/013.png +0 -0
- data/docs/assets/img/014.png +0 -0
- data/docs/assets/img/015.png +0 -0
- data/docs/assets/img/016.png +0 -0
- data/docs/assets/img/017.png +0 -0
- data/docs/assets/img/018.png +0 -0
- data/docs/assets/img/019.png +0 -0
- data/docs/assets/img/020.png +0 -0
- data/docs/assets/img/021.png +0 -0
- data/docs/assets/img/022.png +0 -0
- data/docs/assets/img/023.png +0 -0
- data/docs/assets/img/024.png +0 -0
- data/docs/assets/img/025.png +0 -0
- data/docs/assets/img/026.png +0 -0
- data/docs/assets/img/027.png +0 -0
- data/docs/assets/img/028.png +0 -0
- data/docs/assets/img/029.png +0 -0
- data/docs/assets/img/030.png +0 -0
- data/docs/assets/img/031.png +0 -0
- data/docs/assets/img/032.png +0 -0
- data/docs/assets/img/033.png +0 -0
- data/docs/assets/img/034.png +0 -0
- data/docs/assets/img/035.png +0 -0
- data/docs/assets/img/036.png +0 -0
- data/docs/assets/img/037.png +0 -0
- data/docs/assets/img/038.png +0 -0
- data/docs/assets/img/040.png +0 -0
- data/docs/assets/img/041.png +0 -0
- data/docs/assets/svg/000.svg +43 -43
- data/docs/assets/svg/001.svg +14 -14
- data/docs/assets/svg/002.svg +19 -19
- data/docs/assets/svg/003.svg +16 -16
- data/docs/assets/svg/004.svg +18 -18
- data/docs/assets/svg/005.svg +11 -11
- data/docs/assets/svg/006.svg +13 -13
- data/docs/assets/svg/007.svg +15 -15
- data/docs/assets/svg/008.svg +19 -19
- data/docs/assets/svg/009.svg +17 -17
- data/docs/assets/svg/010.svg +32 -32
- data/docs/assets/svg/011.svg +15 -15
- data/docs/assets/svg/012.svg +16 -16
- data/docs/assets/svg/013.svg +140 -140
- data/docs/assets/svg/014.svg +102 -109
- data/docs/assets/svg/015.svg +21 -21
- data/docs/assets/svg/016.svg +144 -144
- data/docs/assets/svg/017.svg +22 -22
- data/docs/assets/svg/018.svg +25 -25
- data/docs/assets/svg/019.svg +202 -232
- data/docs/assets/svg/020.svg +37 -35
- data/docs/assets/svg/021.svg +20 -20
- data/docs/assets/svg/022.svg +39 -39
- data/docs/assets/svg/023.svg +31 -31
- data/docs/assets/svg/024.svg +11 -11
- data/docs/assets/svg/025.svg +144 -144
- data/docs/assets/svg/026.svg +9 -9
- data/docs/assets/svg/027.svg +19 -19
- data/docs/assets/svg/028.svg +15 -15
- data/docs/assets/svg/029.svg +88 -98
- data/docs/assets/svg/030.svg +47 -53
- data/docs/assets/svg/031.svg +9 -9
- data/docs/assets/svg/032.svg +60 -66
- data/docs/assets/svg/033.svg +29 -29
- data/docs/assets/svg/034.svg +58 -67
- data/docs/assets/svg/035.svg +48 -53
- data/docs/assets/svg/036.svg +26 -29
- data/docs/assets/svg/037.svg +24 -25
- data/docs/assets/svg/038.svg +51 -57
- data/docs/assets/svg/039.svg +8 -8
- data/docs/assets/svg/040.svg +120 -0
- data/docs/assets/svg/041.svg +93 -0
- data/docs/documentation.md +7 -3
- data/docs/documentation_ja.md +7 -3
- data/docs/examples.html +2 -0
- data/lib/rsyntaxtree/base_graph.rb +7 -6
- data/lib/rsyntaxtree/element.rb +2 -0
- data/lib/rsyntaxtree/svg_graph.rb +51 -48
- data/lib/rsyntaxtree/version.rb +1 -1
- data/lib/rsyntaxtree.rb +5 -0
- data/test/example_verify_test.rb +1 -0
- metadata +9 -3
data/Rakefile
CHANGED
@@ -28,6 +28,7 @@ task :generate do
|
|
28
28
|
leafstyle: "auto",
|
29
29
|
fontstyle: "sans",
|
30
30
|
fontsize: 16,
|
31
|
+
linewidth: 1,
|
31
32
|
margin: 1,
|
32
33
|
vheight: 2.0,
|
33
34
|
color: "modern",
|
@@ -53,6 +54,8 @@ task :generate do
|
|
53
54
|
else
|
54
55
|
"off"
|
55
56
|
end
|
57
|
+
when "linewidth", "line_width"
|
58
|
+
opts[:linewidth] = value
|
56
59
|
when "polyline"
|
57
60
|
opts[:polyline] = value
|
58
61
|
when "hide_default_connectors"
|
data/bin/rsyntaxtree
CHANGED
@@ -22,6 +22,7 @@ opts = Optimist.options do
|
|
22
22
|
opt :fontstyle, "Font style (available when ttf font is specified): sans, serif, cjk, mono", default: "sans"
|
23
23
|
opt :font, "Path to a ttf font used to generate tree (optional)", type: String
|
24
24
|
opt :fontsize, "Size: 8-26", default: 16
|
25
|
+
opt :linewidth, "Size: 1-5", default: 1
|
25
26
|
opt :margin, "Margin: 0-10", default: 1
|
26
27
|
opt :vheight, "Connector Height: 0.5-5.0", default: 2.0
|
27
28
|
opt :color, "Color text and bars: modern, traditional, or off", default: "modern"
|
@@ -37,6 +38,7 @@ Optimist.die :leafstyle, "must be auto, triangle, bar, or nothing" unless /\A(au
|
|
37
38
|
Optimist.die :fontstyle, "must be sans, serif, cjk, or mono" unless /\A(sans|serif|cjk|mono)\z/ =~ opts[:fontstyle]
|
38
39
|
Optimist.die :font, "must be path to an existing ttf font" if opts[:font] && !File.exist?(opts[:font])
|
39
40
|
Optimist.die :fontsize, "must be in the range of 8-26" unless opts[:fontsize] >= 8 && opts[:fontsize] <= 26
|
41
|
+
Optimist.die :linewidth, "must be in the range of 1-5" unless opts[:linewidth] >= 1 && opts[:linewidth] <= 5
|
40
42
|
Optimist.die :color, "must be either modern, traditional, or off" unless /\A(modern|traditional|on|off|true|false)\z/ =~ opts[:color]
|
41
43
|
Optimist.die :symmetrize, "must be either on or off" unless /\A(on|off|true|false)\z/ =~ opts[:symmetrize]
|
42
44
|
Optimist.die :margin, "must be in the range of 0-10" if opts[:margin].negative? || opts[:margin] > 10
|
data/docs/_examples/000.md
CHANGED
data/docs/_examples/001.md
CHANGED
data/docs/_examples/002.md
CHANGED
data/docs/_examples/003.md
CHANGED
data/docs/_examples/004.md
CHANGED
data/docs/_examples/005.md
CHANGED
data/docs/_examples/006.md
CHANGED
data/docs/_examples/007.md
CHANGED
data/docs/_examples/008.md
CHANGED
data/docs/_examples/009.md
CHANGED
data/docs/_examples/010.md
CHANGED
data/docs/_examples/011.md
CHANGED
data/docs/_examples/012.md
CHANGED
data/docs/_examples/013.md
CHANGED
data/docs/_examples/014.md
CHANGED
data/docs/_examples/015.md
CHANGED
data/docs/_examples/016.md
CHANGED
data/docs/_examples/017.md
CHANGED
data/docs/_examples/018.md
CHANGED
data/docs/_examples/019.md
CHANGED
data/docs/_examples/020.md
CHANGED
@@ -6,6 +6,7 @@ category: "General"
|
|
6
6
|
polyline: "off"
|
7
7
|
symmetrization: "off"
|
8
8
|
connector: "bar"
|
9
|
+
linewidth: "1"
|
9
10
|
hide_default_connectors: "off"
|
10
11
|
font: "WQY Zen Hei"
|
11
12
|
reference:
|
@@ -13,8 +14,8 @@ reference:
|
|
13
14
|
```
|
14
15
|
[The<>umpires<>talked<>to<>the<>players
|
15
16
|
[the<>umpires
|
16
|
-
[the
|
17
|
-
[<> ði]
|
17
|
+
[the+-1
|
18
|
+
[<> ði+-1]
|
18
19
|
]
|
19
20
|
[umpires
|
20
21
|
[umpire ʌ́mpaɪər]
|
@@ -26,11 +27,11 @@ reference:
|
|
26
27
|
[talk tɔːk]
|
27
28
|
[ed t]
|
28
29
|
]
|
29
|
-
[to
|
30
|
-
[<>
|
30
|
+
[to+-2
|
31
|
+
[<> tə+-2]
|
31
32
|
]
|
32
|
-
[the
|
33
|
-
[<>
|
33
|
+
[the+-3
|
34
|
+
[<> ðə+-3]
|
34
35
|
]
|
35
36
|
[players
|
36
37
|
[player pléɪər]
|
data/docs/_examples/021.md
CHANGED
data/docs/_examples/022.md
CHANGED
data/docs/_examples/023.md
CHANGED
data/docs/_examples/024.md
CHANGED
data/docs/_examples/025.md
CHANGED
data/docs/_examples/026.md
CHANGED
data/docs/_examples/027.md
CHANGED
data/docs/_examples/028.md
CHANGED
data/docs/_examples/029.md
CHANGED
data/docs/_examples/030.md
CHANGED
data/docs/_examples/031.md
CHANGED
data/docs/_examples/032.md
CHANGED
data/docs/_examples/033.md
CHANGED
data/docs/_examples/034.md
CHANGED
data/docs/_examples/035.md
CHANGED
data/docs/_examples/036.md
CHANGED
data/docs/_examples/037.md
CHANGED
data/docs/_examples/038.md
CHANGED
@@ -2,10 +2,11 @@
|
|
2
2
|
name: "038"
|
3
3
|
caption: "Relations between WordNet senses"
|
4
4
|
color: "none"
|
5
|
-
category: "
|
5
|
+
category: "Natural Language Processing"
|
6
6
|
polyline: "off"
|
7
7
|
symmetrization: "on"
|
8
8
|
connector: "auto"
|
9
|
+
linewidth: "1"
|
9
10
|
hide_default_connectors: "on"
|
10
11
|
font: "Noto Sans Mono"
|
11
12
|
reference: "Jurafsky and Martin 2018"
|
data/docs/_examples/039.md
CHANGED
@@ -0,0 +1,62 @@
|
|
1
|
+
---
|
2
|
+
name: "040"
|
3
|
+
color: "none"
|
4
|
+
caption: "Sound feature geometry"
|
5
|
+
category: "Phonology"
|
6
|
+
polyline: "on"
|
7
|
+
symmetrization: "off"
|
8
|
+
connector: "auto"
|
9
|
+
linewidth: "1"
|
10
|
+
hide_default_connectors: "off"
|
11
|
+
font: "Noto sans mono"
|
12
|
+
reference: "Halle 1992"
|
13
|
+
---
|
14
|
+
```
|
15
|
+
[root\
|
16
|
+
\[cons\]\<>\[sonor\]\
|
17
|
+
stricture\
|
18
|
+
\[later\]\<>\[strid\]\<>\[contin\]
|
19
|
+
[cavity\ Oral
|
20
|
+
[articulator\ Labial
|
21
|
+
terminal\
|
22
|
+
features\
|
23
|
+
\[round\]
|
24
|
+
]
|
25
|
+
[articulator\ Coronal
|
26
|
+
terminal\
|
27
|
+
features\
|
28
|
+
\[anter\]\
|
29
|
+
\[distrib\]
|
30
|
+
]
|
31
|
+
[articulator\ Dorsal
|
32
|
+
terminal\
|
33
|
+
features\
|
34
|
+
\[back\]\
|
35
|
+
\[high\]\
|
36
|
+
\[low\]
|
37
|
+
]
|
38
|
+
]
|
39
|
+
[cavity\ Nasal
|
40
|
+
[articulator\ Soft<>Palate
|
41
|
+
terminal\
|
42
|
+
features\
|
43
|
+
\[nasal\]
|
44
|
+
]
|
45
|
+
]
|
46
|
+
[cavity\ Pharyngeal
|
47
|
+
[articulator\ Radical
|
48
|
+
terminal\
|
49
|
+
features\
|
50
|
+
\[ATR\]\
|
51
|
+
\[RTR\]
|
52
|
+
]
|
53
|
+
[articulator\ Glottal
|
54
|
+
terminal\
|
55
|
+
features\
|
56
|
+
\[spread<>gl\]\
|
57
|
+
\[constr<>gl\]\
|
58
|
+
\[voiced\]
|
59
|
+
]
|
60
|
+
]
|
61
|
+
]
|
62
|
+
```
|
@@ -0,0 +1,34 @@
|
|
1
|
+
---
|
2
|
+
name: "041"
|
3
|
+
caption: "Cognitive science linkages"
|
4
|
+
color: "none"
|
5
|
+
category: "Miscellaneous"
|
6
|
+
polyline: "off"
|
7
|
+
symmetrization: "on"
|
8
|
+
connector: "auto"
|
9
|
+
linewidth: "3"
|
10
|
+
hide_default_connectors: "on"
|
11
|
+
font: "Noto Serif"
|
12
|
+
reference: "Miller et al. 1978"
|
13
|
+
---
|
14
|
+
```
|
15
|
+
[##Philosophy+-1+-2+-3+-4+-5
|
16
|
+
[##Psychology+-1+-6+-7+-8+-9+-10
|
17
|
+
[<>
|
18
|
+
[##Computer<>Science+-2+-6+-7+-11+-12+-13]
|
19
|
+
]
|
20
|
+
]
|
21
|
+
[<>
|
22
|
+
[<>
|
23
|
+
[<>
|
24
|
+
[##Neuroscience+-3+-8+-11+-14+-15]
|
25
|
+
]
|
26
|
+
]
|
27
|
+
]
|
28
|
+
[##Linguistics+-4+-9+-12+-14+-16
|
29
|
+
[<>
|
30
|
+
[##Anthropology+-5+-10+-13+-15+-16]
|
31
|
+
]
|
32
|
+
]
|
33
|
+
]
|
34
|
+
```
|
data/docs/assets/img/000.png
CHANGED
Binary file
|
data/docs/assets/img/001.png
CHANGED
Binary file
|
data/docs/assets/img/002.png
CHANGED
Binary file
|
data/docs/assets/img/003.png
CHANGED
Binary file
|
data/docs/assets/img/004.png
CHANGED
Binary file
|
data/docs/assets/img/005.png
CHANGED
Binary file
|
data/docs/assets/img/006.png
CHANGED
Binary file
|
data/docs/assets/img/007.png
CHANGED
Binary file
|
data/docs/assets/img/008.png
CHANGED
Binary file
|
data/docs/assets/img/009.png
CHANGED
Binary file
|
data/docs/assets/img/010.png
CHANGED
Binary file
|
data/docs/assets/img/011.png
CHANGED
Binary file
|
data/docs/assets/img/012.png
CHANGED
Binary file
|
data/docs/assets/img/013.png
CHANGED
Binary file
|
data/docs/assets/img/014.png
CHANGED
Binary file
|
data/docs/assets/img/015.png
CHANGED
Binary file
|
data/docs/assets/img/016.png
CHANGED
Binary file
|
data/docs/assets/img/017.png
CHANGED
Binary file
|
data/docs/assets/img/018.png
CHANGED
Binary file
|
data/docs/assets/img/019.png
CHANGED
Binary file
|
data/docs/assets/img/020.png
CHANGED
Binary file
|
data/docs/assets/img/021.png
CHANGED
Binary file
|
data/docs/assets/img/022.png
CHANGED
Binary file
|
data/docs/assets/img/023.png
CHANGED
Binary file
|
data/docs/assets/img/024.png
CHANGED
Binary file
|
data/docs/assets/img/025.png
CHANGED
Binary file
|
data/docs/assets/img/026.png
CHANGED
Binary file
|
data/docs/assets/img/027.png
CHANGED
Binary file
|
data/docs/assets/img/028.png
CHANGED
Binary file
|
data/docs/assets/img/029.png
CHANGED
Binary file
|
data/docs/assets/img/030.png
CHANGED
Binary file
|
data/docs/assets/img/031.png
CHANGED
Binary file
|
data/docs/assets/img/032.png
CHANGED
Binary file
|
data/docs/assets/img/033.png
CHANGED
Binary file
|
data/docs/assets/img/034.png
CHANGED
Binary file
|
data/docs/assets/img/035.png
CHANGED
Binary file
|
data/docs/assets/img/036.png
CHANGED
Binary file
|
data/docs/assets/img/037.png
CHANGED
Binary file
|
data/docs/assets/img/038.png
CHANGED
Binary file
|
Binary file
|
Binary file
|