diff options
author | Patrick Simianer <p@simianer.de> | 2014-06-16 17:44:07 +0200 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2014-06-16 17:44:07 +0200 |
commit | 4059a5d048cb0f72872c98073ef1ce120a30d78c (patch) | |
tree | 4fbff0dc62c5ef3deea0ffdec578e3f2c0ed74b6 /lib | |
parent | 912ff6aebcf4f89f9e64b5f59956dbf7d8f624e3 (diff) |
renaming to zipf
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/zipf.rb (renamed from lib/nlp_ruby.rb) | 0 | ||||
-rw-r--r-- | lib/zipf/SparseVector.rb (renamed from lib/nlp_ruby/SparseVector.rb) | 0 | ||||
-rw-r--r-- | lib/zipf/Translation.rb (renamed from lib/nlp_ruby/Translation.rb) | 0 | ||||
-rw-r--r-- | lib/zipf/bleu.rb (renamed from lib/nlp_ruby/bleu.rb) | 2 | ||||
-rw-r--r-- | lib/zipf/dag.rb (renamed from lib/nlp_ruby/dag.rb) | 2 | ||||
-rw-r--r-- | lib/zipf/fileutil.rb (renamed from lib/nlp_ruby/fileutil.rb) | 0 | ||||
-rw-r--r-- | lib/zipf/grammar.rb (renamed from lib/nlp_ruby/grammar.rb) | 3 | ||||
-rw-r--r-- | lib/zipf/hg.rb (renamed from lib/nlp_ruby/hg.rb) | 2 | ||||
-rw-r--r-- | lib/zipf/misc.rb (renamed from lib/nlp_ruby/misc.rb) | 0 | ||||
-rw-r--r-- | lib/zipf/semirings.rb (renamed from lib/nlp_ruby/semirings.rb) | 2 | ||||
-rw-r--r-- | lib/zipf/stringutil.rb (renamed from lib/nlp_ruby/stringutil.rb) | 0 | ||||
-rw-r--r-- | lib/zipf/tfidf.rb (renamed from lib/nlp_ruby/tfidf.rb) | 0 |
12 files changed, 7 insertions, 4 deletions
diff --git a/lib/nlp_ruby.rb b/lib/zipf.rb index 0e26e97..0e26e97 100755 --- a/lib/nlp_ruby.rb +++ b/lib/zipf.rb diff --git a/lib/nlp_ruby/SparseVector.rb b/lib/zipf/SparseVector.rb index 3096412..3096412 100644 --- a/lib/nlp_ruby/SparseVector.rb +++ b/lib/zipf/SparseVector.rb diff --git a/lib/nlp_ruby/Translation.rb b/lib/zipf/Translation.rb index 3759a1d..3759a1d 100644 --- a/lib/nlp_ruby/Translation.rb +++ b/lib/zipf/Translation.rb diff --git a/lib/nlp_ruby/bleu.rb b/lib/zipf/bleu.rb index 56f341b..69de00b 100644 --- a/lib/nlp_ruby/bleu.rb +++ b/lib/zipf/bleu.rb @@ -126,5 +126,5 @@ def BLEU::per_sentence_bleu hypothesis, reference, n=4, smooth=0.0 end -end # module +end #module diff --git a/lib/nlp_ruby/dag.rb b/lib/zipf/dag.rb index 94afa23..45ede20 100644 --- a/lib/nlp_ruby/dag.rb +++ b/lib/zipf/dag.rb @@ -201,5 +201,5 @@ def DAG::read_graph_from_json fn, semiring=RealSemiring.new end -end # module +end #module diff --git a/lib/nlp_ruby/fileutil.rb b/lib/zipf/fileutil.rb index eb69136..eb69136 100644 --- a/lib/nlp_ruby/fileutil.rb +++ b/lib/zipf/fileutil.rb diff --git a/lib/nlp_ruby/grammar.rb b/lib/zipf/grammar.rb index 7bd8fe6..568b9fc 100644 --- a/lib/nlp_ruby/grammar.rb +++ b/lib/zipf/grammar.rb @@ -1,5 +1,6 @@ module Grammar + class T attr_accessor :word @@ -118,5 +119,5 @@ class Grammar end -end # module +end #module diff --git a/lib/nlp_ruby/hg.rb b/lib/zipf/hg.rb index b8b147e..f86bf60 100644 --- a/lib/nlp_ruby/hg.rb +++ b/lib/zipf/hg.rb @@ -1,6 +1,6 @@ #!/usr/bin/env ruby -require 'nlp_ruby' +require_relative 'semirings' require 'json' diff --git a/lib/nlp_ruby/misc.rb b/lib/zipf/misc.rb index 0319a5f..0319a5f 100644 --- a/lib/nlp_ruby/misc.rb +++ b/lib/zipf/misc.rb diff --git a/lib/nlp_ruby/semirings.rb b/lib/zipf/semirings.rb index fda4683..920923f 100644 --- a/lib/nlp_ruby/semirings.rb +++ b/lib/zipf/semirings.rb @@ -2,6 +2,8 @@ # as described in: # 'Dynamic Programming Algorithms in # Semiring and Hypergraph Frameworks' (Liang Huang) +# + class Semiring attr_accessor :add, :multiply, :one, :null, :convert end diff --git a/lib/nlp_ruby/stringutil.rb b/lib/zipf/stringutil.rb index aa9be00..aa9be00 100644 --- a/lib/nlp_ruby/stringutil.rb +++ b/lib/zipf/stringutil.rb diff --git a/lib/nlp_ruby/tfidf.rb b/lib/zipf/tfidf.rb index 13a40a3..13a40a3 100644 --- a/lib/nlp_ruby/tfidf.rb +++ b/lib/zipf/tfidf.rb |