linkterm 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.
data/README.txt CHANGED
@@ -12,13 +12,33 @@ require 'MeCab'できるようになります。
12
12
 
13
13
  OS Xでのインストール方法は
14
14
  http://ujihisa.nowa.jp/entry/0da2db2747
15
- にあります。
15
+ に掲載されております。
16
16
 
17
- == How to use
17
+ mecabをインストールしたあとは、
18
+ sudo gem install linkterm
19
+ でインストールできます。
20
+
21
+ == HOW TO USE
18
22
  コマンドラインインタフェースを用意しています。
19
23
  example/example.rbを実行して、適当なキーワードを入力してください。
20
24
 
21
25
  example.rbはexample/docs以下のファイルから知識を得、
22
- その知識に基づいて入力されたキーワードに対応する
23
- ルールを出力します。
26
+ その知識に基づいて入力されたキーワードに対応するルールを出力します。
27
+ Ctrl+cで終了します。
28
+
29
+ より一般的な用途で利用するにあたって
30
+ example.rbのソースコードが参考になるかと思います。
31
+
32
+ example/docsにはサンプルの文章として
33
+ README.jaとREADME.EXT.jaがあります。
34
+ これは2007-07-08現在のRuby 1.9 (trunk)のものです。
35
+
36
+ == LIBRARIES
37
+ lisc.rbというライブラリを添付しています。
38
+ これはRubyでリスト内包表記をサポートするためのものです。
39
+ これは今後単独のライブラリとして独立する可能性があります。
24
40
 
41
+ lisc.rbについて詳しくは
42
+ rubyneko - Rubyでもリスト内包表記(2)
43
+ http://ujihisa.nowa.jp/entry/ec2b88e80e
44
+ を参照ください。
data/Rakefile CHANGED
@@ -12,10 +12,10 @@ require 'hoe'
12
12
  include FileUtils
13
13
  require File.join(File.dirname(__FILE__), 'lib', 'linkterm', 'version')
14
14
 
15
- AUTHOR = 'Linkterm' # can also be an array of Authors
15
+ AUTHOR = 'Tatsuhiro Ujihisa' # can also be an array of Authors
16
16
  EMAIL = "ujihisa gmail com"
17
- DESCRIPTION = "description of gem"
18
- GEM_NAME = 'linkterm' # what ppl will type to install your gem
17
+ DESCRIPTION = "A text mining tool based on Rough Sets Theory"
18
+ GEM_NAME = 'linkterm'
19
19
 
20
20
  @config_file = "~/.rubyforge/user-config.yml"
21
21
  @config = nil
@@ -2,7 +2,7 @@ module Linkterm #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- TINY = 1
5
+ TINY = 2
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
data/lib/linkterm.rb CHANGED
@@ -1,9 +1,9 @@
1
1
  $KCODE = 'u'
2
+ require 'linkterm/version'
3
+ require 'linkterm/lisc'
2
4
  require 'MeCab'
3
- require 'pp'
4
5
  require 'set'
5
6
  require 'mathn'
6
- require 'linktermlisc'
7
7
  require 'nkf'
8
8
 
9
9
  class Array
@@ -55,10 +55,11 @@ class Counter
55
55
  @i = 0
56
56
  @max = max
57
57
  @message = message.nil? ? '' : "[#{message}]: "
58
+ @output = output
58
59
  end
59
60
 
60
61
  def display!
61
- output.puts "#{@message} #{@i += 1}/#{@max}"
62
+ @output.puts "#{@message} #{@i += 1}/#{@max}"
62
63
  end
63
64
  end
64
65
 
@@ -66,7 +67,7 @@ end
66
67
  module Linkterm
67
68
  class Base
68
69
  def initialize(options = {})
69
- @doc_dir = options[:doc_dir] || 'docs'
70
+ @doc_dir = options[:doc_dir]
70
71
 
71
72
  @documents = Documents.new Dir.open(@doc_dir).reject {|f| /^\.+$/ =~ f }.map {|f| "#{@doc_dir}/" + f }
72
73
  end
@@ -192,21 +193,3 @@ module Linkterm
192
193
  end
193
194
  end
194
195
  end
195
-
196
-
197
- # CUI
198
- linkterm = Linkterm::Base.new
199
- rule_table = linkterm.rule_table
200
- pp rule_table
201
- puts "input?"
202
- loop do
203
- str = NKF.nkf('-w', gets.chop)
204
- rule_table.select {|record|
205
- record[:a1].any? {|r| /^#{str}/ =~ r } ||
206
- record[:a2].any? {|r| /^#{str}/ =~ r }
207
- }.each {|record|
208
- puts "[#{record[:a1].join(', ')}]\t\t-> [#{record[:a2].join(', ')}]"
209
- }
210
- end
211
-
212
-
data/website/index.html CHANGED
@@ -33,7 +33,7 @@
33
33
  <h1>linkterm</h1>
34
34
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/linkterm"; return false'>
35
35
  <p>Get Version</p>
36
- <a href="http://rubyforge.org/projects/linkterm" class="numbers">0.0.1</a>
36
+ <a href="http://rubyforge.org/projects/linkterm" class="numbers">0.0.2</a>
37
37
  </div>
38
38
  <h1>&#x2192; &#8216;linkterm&#8217;</h1>
39
39
 
@@ -41,6 +41,9 @@
41
41
  <h2>What</h2>
42
42
 
43
43
 
44
+ <p><img src='rosetownnozomi.png' alt='Rosetown Nozomi' /></p>
45
+
46
+
44
47
  <h2>Installing</h2>
45
48
 
46
49
 
data/website/index.txt CHANGED
@@ -5,6 +5,7 @@ h1. &#x2192; 'linkterm'
5
5
 
6
6
  h2. What
7
7
 
8
+ <img src='rosetownnozomi.png' alt='Rosetown Nozomi' />
8
9
 
9
10
  h2. Installing
10
11
 
metadata CHANGED
@@ -3,15 +3,15 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: linkterm
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.1
6
+ version: 0.0.2
7
7
  date: 2007-07-08 00:00:00 +09:00
8
- summary: description of gem
8
+ summary: A text mining tool based on Rough Sets Theory
9
9
  require_paths:
10
10
  - lib
11
11
  email: ujihisa gmail com
12
12
  homepage: http://linkterm.rubyforge.org
13
13
  rubyforge_project: linkterm
14
- description: description of gem
14
+ description: A text mining tool based on Rough Sets Theory
15
15
  autorequire:
16
16
  default_executable:
17
17
  bindir: bin
@@ -27,7 +27,7 @@ signing_key:
27
27
  cert_chain:
28
28
  post_install_message:
29
29
  authors:
30
- - Linkterm
30
+ - Tatsuhiro Ujihisa
31
31
  files:
32
32
  - History.txt
33
33
  - License.txt