tyccl 0.0.1 → 0.0.2
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.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/README.md +14 -9
- data/Rakefile +10 -0
- data/doc/Object.html +154 -0
- data/doc/README_md.html +182 -0
- data/doc/Tyccl.html +1020 -0
- data/doc/Tyccl/Containers.html +130 -0
- data/doc/Tyccl/Logger.html +130 -0
- data/doc/Tyccl/YAML.html +130 -0
- data/doc/created.rid +3 -0
- data/doc/images/add.png +0 -0
- data/doc/images/arrow_up.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +166 -0
- data/doc/js/darkfish.js +155 -0
- data/doc/js/jquery.js +18 -0
- data/doc/js/navigation.js +142 -0
- data/doc/js/search.js +94 -0
- data/doc/js/search_index.js +1 -0
- data/doc/js/searcher.js +228 -0
- data/doc/rdoc.css +595 -0
- data/doc/table_of_contents.html +111 -0
- data/lib/Inverted.yaml +1 -1
- data/lib/tyccl.rb +63 -66
- data/lib/tyccl/version.rb +2 -2
- data/test/test_tyccl.rb +35 -35
- metadata +43 -2
@@ -0,0 +1,130 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
+
|
7
|
+
<title>module Tyccl::Containers - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
|
10
|
+
|
11
|
+
<script type="text/javascript">
|
12
|
+
var rdoc_rel_prefix = "../";
|
13
|
+
</script>
|
14
|
+
|
15
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
16
|
+
<script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
|
17
|
+
<script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
|
18
|
+
<script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
|
19
|
+
<script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
|
20
|
+
<script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>
|
21
|
+
|
22
|
+
|
23
|
+
<body id="top" class="module">
|
24
|
+
<nav id="metadata">
|
25
|
+
<nav id="home-section" class="section">
|
26
|
+
<h3 class="section-header">
|
27
|
+
<a href="../index.html">Home</a>
|
28
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
29
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
30
|
+
</h3>
|
31
|
+
</nav>
|
32
|
+
|
33
|
+
|
34
|
+
<nav id="search-section" class="section project-section" class="initially-hidden">
|
35
|
+
<form action="#" method="get" accept-charset="utf-8">
|
36
|
+
<h3 class="section-header">
|
37
|
+
<input type="text" name="search" placeholder="Search" id="search-field"
|
38
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
39
|
+
</h3>
|
40
|
+
</form>
|
41
|
+
|
42
|
+
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
+
</nav>
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
<div id="file-metadata">
|
49
|
+
<nav id="file-list-section" class="section">
|
50
|
+
<h3 class="section-header">Defined In</h3>
|
51
|
+
<ul>
|
52
|
+
<li>lib/tyccl.rb
|
53
|
+
</ul>
|
54
|
+
</nav>
|
55
|
+
|
56
|
+
|
57
|
+
</div>
|
58
|
+
|
59
|
+
<div id="class-metadata">
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
</div>
|
66
|
+
|
67
|
+
<div id="project-metadata">
|
68
|
+
<nav id="fileindex-section" class="section project-section">
|
69
|
+
<h3 class="section-header">Pages</h3>
|
70
|
+
|
71
|
+
<ul>
|
72
|
+
|
73
|
+
<li class="file"><a href="../README_md.html">README</a>
|
74
|
+
|
75
|
+
</ul>
|
76
|
+
</nav>
|
77
|
+
|
78
|
+
<nav id="classindex-section" class="section project-section">
|
79
|
+
<h3 class="section-header">Class and Module Index</h3>
|
80
|
+
|
81
|
+
<ul class="link-list">
|
82
|
+
|
83
|
+
<li><a href="../Object.html">Object</a>
|
84
|
+
|
85
|
+
<li><a href="../Tyccl.html">Tyccl</a>
|
86
|
+
|
87
|
+
<li><a href="../Tyccl/Containers.html">Tyccl::Containers</a>
|
88
|
+
|
89
|
+
<li><a href="../Tyccl/Logger.html">Tyccl::Logger</a>
|
90
|
+
|
91
|
+
<li><a href="../Tyccl/YAML.html">Tyccl::YAML</a>
|
92
|
+
|
93
|
+
</ul>
|
94
|
+
</nav>
|
95
|
+
|
96
|
+
</div>
|
97
|
+
</nav>
|
98
|
+
|
99
|
+
<div id="documentation">
|
100
|
+
<h1 class="module">module Tyccl::Containers</h1>
|
101
|
+
|
102
|
+
<div id="description" class="description">
|
103
|
+
|
104
|
+
</div><!-- description -->
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
<!-- Methods -->
|
119
|
+
|
120
|
+
</section><!-- 5Buntitled-5D -->
|
121
|
+
|
122
|
+
</div><!-- documentation -->
|
123
|
+
|
124
|
+
|
125
|
+
<footer id="validator-badges">
|
126
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
127
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
|
128
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
129
|
+
</footer>
|
130
|
+
|
@@ -0,0 +1,130 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
+
|
7
|
+
<title>module Tyccl::Logger - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
|
10
|
+
|
11
|
+
<script type="text/javascript">
|
12
|
+
var rdoc_rel_prefix = "../";
|
13
|
+
</script>
|
14
|
+
|
15
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
16
|
+
<script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
|
17
|
+
<script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
|
18
|
+
<script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
|
19
|
+
<script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
|
20
|
+
<script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>
|
21
|
+
|
22
|
+
|
23
|
+
<body id="top" class="module">
|
24
|
+
<nav id="metadata">
|
25
|
+
<nav id="home-section" class="section">
|
26
|
+
<h3 class="section-header">
|
27
|
+
<a href="../index.html">Home</a>
|
28
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
29
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
30
|
+
</h3>
|
31
|
+
</nav>
|
32
|
+
|
33
|
+
|
34
|
+
<nav id="search-section" class="section project-section" class="initially-hidden">
|
35
|
+
<form action="#" method="get" accept-charset="utf-8">
|
36
|
+
<h3 class="section-header">
|
37
|
+
<input type="text" name="search" placeholder="Search" id="search-field"
|
38
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
39
|
+
</h3>
|
40
|
+
</form>
|
41
|
+
|
42
|
+
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
+
</nav>
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
<div id="file-metadata">
|
49
|
+
<nav id="file-list-section" class="section">
|
50
|
+
<h3 class="section-header">Defined In</h3>
|
51
|
+
<ul>
|
52
|
+
<li>lib/tyccl.rb
|
53
|
+
</ul>
|
54
|
+
</nav>
|
55
|
+
|
56
|
+
|
57
|
+
</div>
|
58
|
+
|
59
|
+
<div id="class-metadata">
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
</div>
|
66
|
+
|
67
|
+
<div id="project-metadata">
|
68
|
+
<nav id="fileindex-section" class="section project-section">
|
69
|
+
<h3 class="section-header">Pages</h3>
|
70
|
+
|
71
|
+
<ul>
|
72
|
+
|
73
|
+
<li class="file"><a href="../README_md.html">README</a>
|
74
|
+
|
75
|
+
</ul>
|
76
|
+
</nav>
|
77
|
+
|
78
|
+
<nav id="classindex-section" class="section project-section">
|
79
|
+
<h3 class="section-header">Class and Module Index</h3>
|
80
|
+
|
81
|
+
<ul class="link-list">
|
82
|
+
|
83
|
+
<li><a href="../Object.html">Object</a>
|
84
|
+
|
85
|
+
<li><a href="../Tyccl.html">Tyccl</a>
|
86
|
+
|
87
|
+
<li><a href="../Tyccl/Containers.html">Tyccl::Containers</a>
|
88
|
+
|
89
|
+
<li><a href="../Tyccl/Logger.html">Tyccl::Logger</a>
|
90
|
+
|
91
|
+
<li><a href="../Tyccl/YAML.html">Tyccl::YAML</a>
|
92
|
+
|
93
|
+
</ul>
|
94
|
+
</nav>
|
95
|
+
|
96
|
+
</div>
|
97
|
+
</nav>
|
98
|
+
|
99
|
+
<div id="documentation">
|
100
|
+
<h1 class="module">module Tyccl::Logger</h1>
|
101
|
+
|
102
|
+
<div id="description" class="description">
|
103
|
+
|
104
|
+
</div><!-- description -->
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
<!-- Methods -->
|
119
|
+
|
120
|
+
</section><!-- 5Buntitled-5D -->
|
121
|
+
|
122
|
+
</div><!-- documentation -->
|
123
|
+
|
124
|
+
|
125
|
+
<footer id="validator-badges">
|
126
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
127
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
|
128
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
129
|
+
</footer>
|
130
|
+
|
data/doc/Tyccl/YAML.html
ADDED
@@ -0,0 +1,130 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
+
|
7
|
+
<title>module Tyccl::YAML - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
|
10
|
+
|
11
|
+
<script type="text/javascript">
|
12
|
+
var rdoc_rel_prefix = "../";
|
13
|
+
</script>
|
14
|
+
|
15
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
16
|
+
<script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
|
17
|
+
<script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
|
18
|
+
<script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
|
19
|
+
<script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
|
20
|
+
<script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>
|
21
|
+
|
22
|
+
|
23
|
+
<body id="top" class="module">
|
24
|
+
<nav id="metadata">
|
25
|
+
<nav id="home-section" class="section">
|
26
|
+
<h3 class="section-header">
|
27
|
+
<a href="../index.html">Home</a>
|
28
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
29
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
30
|
+
</h3>
|
31
|
+
</nav>
|
32
|
+
|
33
|
+
|
34
|
+
<nav id="search-section" class="section project-section" class="initially-hidden">
|
35
|
+
<form action="#" method="get" accept-charset="utf-8">
|
36
|
+
<h3 class="section-header">
|
37
|
+
<input type="text" name="search" placeholder="Search" id="search-field"
|
38
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
39
|
+
</h3>
|
40
|
+
</form>
|
41
|
+
|
42
|
+
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
+
</nav>
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
<div id="file-metadata">
|
49
|
+
<nav id="file-list-section" class="section">
|
50
|
+
<h3 class="section-header">Defined In</h3>
|
51
|
+
<ul>
|
52
|
+
<li>lib/tyccl.rb
|
53
|
+
</ul>
|
54
|
+
</nav>
|
55
|
+
|
56
|
+
|
57
|
+
</div>
|
58
|
+
|
59
|
+
<div id="class-metadata">
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
</div>
|
66
|
+
|
67
|
+
<div id="project-metadata">
|
68
|
+
<nav id="fileindex-section" class="section project-section">
|
69
|
+
<h3 class="section-header">Pages</h3>
|
70
|
+
|
71
|
+
<ul>
|
72
|
+
|
73
|
+
<li class="file"><a href="../README_md.html">README</a>
|
74
|
+
|
75
|
+
</ul>
|
76
|
+
</nav>
|
77
|
+
|
78
|
+
<nav id="classindex-section" class="section project-section">
|
79
|
+
<h3 class="section-header">Class and Module Index</h3>
|
80
|
+
|
81
|
+
<ul class="link-list">
|
82
|
+
|
83
|
+
<li><a href="../Object.html">Object</a>
|
84
|
+
|
85
|
+
<li><a href="../Tyccl.html">Tyccl</a>
|
86
|
+
|
87
|
+
<li><a href="../Tyccl/Containers.html">Tyccl::Containers</a>
|
88
|
+
|
89
|
+
<li><a href="../Tyccl/Logger.html">Tyccl::Logger</a>
|
90
|
+
|
91
|
+
<li><a href="../Tyccl/YAML.html">Tyccl::YAML</a>
|
92
|
+
|
93
|
+
</ul>
|
94
|
+
</nav>
|
95
|
+
|
96
|
+
</div>
|
97
|
+
</nav>
|
98
|
+
|
99
|
+
<div id="documentation">
|
100
|
+
<h1 class="module">module Tyccl::YAML</h1>
|
101
|
+
|
102
|
+
<div id="description" class="description">
|
103
|
+
|
104
|
+
</div><!-- description -->
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
<!-- Methods -->
|
119
|
+
|
120
|
+
</section><!-- 5Buntitled-5D -->
|
121
|
+
|
122
|
+
</div><!-- documentation -->
|
123
|
+
|
124
|
+
|
125
|
+
<footer id="validator-badges">
|
126
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
127
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
|
128
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
129
|
+
</footer>
|
130
|
+
|
data/doc/created.rid
ADDED
data/doc/images/add.png
ADDED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/doc/images/bug.png
ADDED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/doc/images/date.png
ADDED
Binary file
|
Binary file
|
data/doc/images/find.png
ADDED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/doc/images/ruby.png
ADDED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/doc/images/zoom.png
ADDED
Binary file
|
data/doc/index.html
ADDED
@@ -0,0 +1,166 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
+
|
7
|
+
<title>RDoc Documentation</title>
|
8
|
+
|
9
|
+
<link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
|
10
|
+
|
11
|
+
<script type="text/javascript">
|
12
|
+
var rdoc_rel_prefix = "./";
|
13
|
+
</script>
|
14
|
+
|
15
|
+
<script type="text/javascript" charset="utf-8" src="./js/jquery.js"></script>
|
16
|
+
<script type="text/javascript" charset="utf-8" src="./js/navigation.js"></script>
|
17
|
+
<script type="text/javascript" charset="utf-8" src="./js/search_index.js"></script>
|
18
|
+
<script type="text/javascript" charset="utf-8" src="./js/search.js"></script>
|
19
|
+
<script type="text/javascript" charset="utf-8" src="./js/searcher.js"></script>
|
20
|
+
<script type="text/javascript" charset="utf-8" src="./js/darkfish.js"></script>
|
21
|
+
|
22
|
+
|
23
|
+
<body>
|
24
|
+
<nav id="metadata">
|
25
|
+
<nav id="home-section" class="section">
|
26
|
+
<h3 class="section-header">
|
27
|
+
<a href="./index.html">Home</a>
|
28
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
29
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
30
|
+
</h3>
|
31
|
+
</nav>
|
32
|
+
|
33
|
+
|
34
|
+
<nav id="search-section" class="section project-section" class="initially-hidden">
|
35
|
+
<form action="#" method="get" accept-charset="utf-8">
|
36
|
+
<h3 class="section-header">
|
37
|
+
<input type="text" name="search" placeholder="Search" id="search-field"
|
38
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
39
|
+
</h3>
|
40
|
+
</form>
|
41
|
+
|
42
|
+
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
+
</nav>
|
44
|
+
|
45
|
+
|
46
|
+
<div id="project-metadata">
|
47
|
+
<nav id="fileindex-section" class="section project-section">
|
48
|
+
<h3 class="section-header">Pages</h3>
|
49
|
+
|
50
|
+
<ul>
|
51
|
+
|
52
|
+
<li class="file"><a href="./README_md.html">README</a>
|
53
|
+
|
54
|
+
</ul>
|
55
|
+
</nav>
|
56
|
+
|
57
|
+
<nav id="classindex-section" class="section project-section">
|
58
|
+
<h3 class="section-header">Class and Module Index</h3>
|
59
|
+
|
60
|
+
<ul class="link-list">
|
61
|
+
|
62
|
+
<li><a href="./Object.html">Object</a>
|
63
|
+
|
64
|
+
<li><a href="./Tyccl.html">Tyccl</a>
|
65
|
+
|
66
|
+
<li><a href="./Tyccl/Containers.html">Tyccl::Containers</a>
|
67
|
+
|
68
|
+
<li><a href="./Tyccl/Logger.html">Tyccl::Logger</a>
|
69
|
+
|
70
|
+
<li><a href="./Tyccl/YAML.html">Tyccl::YAML</a>
|
71
|
+
|
72
|
+
</ul>
|
73
|
+
</nav>
|
74
|
+
|
75
|
+
</div>
|
76
|
+
</nav>
|
77
|
+
|
78
|
+
<div id="documentation" class="description">
|
79
|
+
|
80
|
+
<h1 id="label-Tyccl"><a href="Tyccl.html">Tyccl</a><span><a href="#label-Tyccl">¶</a> <a href="#documentation">↑</a></span></h1>
|
81
|
+
|
82
|
+
<p>tyccl(同义词词林 哈工大扩展版) is a ruby gem that provides friendly functions to
|
83
|
+
analyse similarity between Chinese Words.</p>
|
84
|
+
|
85
|
+
<p>all of Tyccl`s source files using charset: UTF-8</p>
|
86
|
+
|
87
|
+
<h2 id="label-Installation">Installation<span><a href="#label-Installation">¶</a> <a href="#documentation">↑</a></span></h2>
|
88
|
+
|
89
|
+
<p>Add this line to your application's Gemfile:</p>
|
90
|
+
|
91
|
+
<pre>gem 'tyccl'</pre>
|
92
|
+
|
93
|
+
<p>And then execute:</p>
|
94
|
+
|
95
|
+
<pre>$ bundle</pre>
|
96
|
+
|
97
|
+
<p>Or install it yourself as:</p>
|
98
|
+
|
99
|
+
<pre>$ gem install tyccl</pre>
|
100
|
+
|
101
|
+
<h2 id="label-Usage">Usage<span><a href="#label-Usage">¶</a> <a href="#documentation">↑</a></span></h2>
|
102
|
+
|
103
|
+
<p>simple example:</p>
|
104
|
+
|
105
|
+
<pre class="ruby">
|
106
|
+
<span class="ruby-comment"># Result_t = Struct.new(:value,:x_id,:y_id)</span>
|
107
|
+
<span class="ruby-comment"># this struct is used to return analysing result</span>
|
108
|
+
<span class="ruby-comment"># * field 'value' store the analysing value</span>
|
109
|
+
<span class="ruby-comment"># * field 'x_id' 'y_id' store the ID of word X and Y </span>
|
110
|
+
|
111
|
+
<span class="ruby-identifier">require</span> <span class="ruby-string">'tyccl'</span>
|
112
|
+
|
113
|
+
<span class="ruby-comment"># Given wordA(string) and wordB(string). </span>
|
114
|
+
<span class="ruby-comment"># Returns a Struct Result_t which contains idA, idB, and shortest semantic distance(int) between wordA and wordB. </span>
|
115
|
+
|
116
|
+
<span class="ruby-identifier">result</span> = <span class="ruby-constant">Tyccl</span>.<span class="ruby-identifier">dist</span>(<span class="ruby-string">"西红柿"</span>,<span class="ruby-string">"黄瓜"</span>)
|
117
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">result</span>.<span class="ruby-identifier">value</span>
|
118
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">result</span>.<span class="ruby-identifier">x_id</span>
|
119
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">result</span>.<span class="ruby-identifier">y_id</span>
|
120
|
+
|
121
|
+
<span class="ruby-comment"># Given wordA(string) and wordB(string).</span>
|
122
|
+
<span class="ruby-comment"># Returns a Struct Result_t which contains the most similar Pairs wordA`s ID and wordB`s ID, and similarity(float) between idA and idB.</span>
|
123
|
+
<span class="ruby-identifier">result</span> = <span class="ruby-constant">Tyccl</span>.<span class="ruby-identifier">sim</span>(<span class="ruby-string">"西红柿"</span>,<span class="ruby-string">"黄瓜"</span>)
|
124
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">result</span>.<span class="ruby-identifier">value</span>
|
125
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">result</span>.<span class="ruby-identifier">x_id</span>
|
126
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">result</span>.<span class="ruby-identifier">y_id</span>
|
127
|
+
|
128
|
+
<span class="ruby-comment"># Given a word(string) and a level(int),level`s value range is [0,4],4 is default, value of level is more bigger, the similarity between returned words and the given word is more less. </span>
|
129
|
+
<span class="ruby-comment"># Returns a two dimensional array that contains the parameter Word`s similar words which divided by different ID that the word matchs.</span>
|
130
|
+
<span class="ruby-comment"># If the word has no similar, nil is returned.</span>
|
131
|
+
|
132
|
+
<span class="ruby-identifier">m</span> = <span class="ruby-constant">Tyccl</span>.<span class="ruby-identifier">get_similar</span>(<span class="ruby-string">"人"</span>)
|
133
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">m</span>
|
134
|
+
<span class="ruby-comment">#[ ["人", "士", "人物", "人士", "人氏", "人选"],</span>
|
135
|
+
<span class="ruby-comment"># ["成年人", "壮年人", "大人", "人", "丁", "壮丁", "佬", "中年人"],</span>
|
136
|
+
<span class="ruby-comment"># ["身体", "人"],</span>
|
137
|
+
<span class="ruby-comment"># ["人格", "人品", "人头", "人", "品质", "质地", "格调", "灵魂", "为人"],</span>
|
138
|
+
<span class="ruby-comment"># ["人数", "人头", "人口", "人", "口", "丁", "家口", "食指", "总人口"] ]</span>
|
139
|
+
</pre>
|
140
|
+
|
141
|
+
<p>download and see more methods in <a
|
142
|
+
href="https://github.com/JoeWoo/tyccl/blob/master/doc/index.html">api
|
143
|
+
doc</a> and more examples in <a
|
144
|
+
href="https://github.com/JoeWoo/tyccl/blob/master/test/test_tyccl.rb">test</a>.</p>
|
145
|
+
|
146
|
+
<h2 id="label-Contributing">Contributing<span><a href="#label-Contributing">¶</a> <a href="#documentation">↑</a></span></h2>
|
147
|
+
|
148
|
+
<p>1. Fork it ( <a
|
149
|
+
href="http://github.com/JoeWoo/tyccl/fork">github.com/JoeWoo/tyccl/fork</a>
|
150
|
+
)
|
151
|
+
2. Create your feature branch (<code>git checkout -b fork-new</code>)
|
152
|
+
3.
|
153
|
+
Commit your changes (<code>git commit -am 'Add some
|
154
|
+
feature'</code>)
|
155
|
+
4. Push to the branch (<code>git push origin
|
156
|
+
fork-new</code>)
|
157
|
+
5. Create new Pull Request</p>
|
158
|
+
</div>
|
159
|
+
|
160
|
+
|
161
|
+
<footer id="validator-badges">
|
162
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
163
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
|
164
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
165
|
+
</footer>
|
166
|
+
|