summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2014-06-16 17:44:07 +0200
committerPatrick Simianer <p@simianer.de>2014-06-16 17:44:07 +0200
commit4059a5d048cb0f72872c98073ef1ce120a30d78c (patch)
tree4fbff0dc62c5ef3deea0ffdec578e3f2c0ed74b6
parent912ff6aebcf4f89f9e64b5f59956dbf7d8f624e3 (diff)
renaming to zipf
-rw-r--r--Makefile14
-rw-r--r--README.md6
-rwxr-xr-xlib/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
-rwxr-xr-xtest/test_dag.rb2
-rwxr-xr-xtest/test_hg.rb2
-rw-r--r--zipf.gemspec (renamed from nlp_ruby.gemspec)8
17 files changed, 23 insertions, 20 deletions
diff --git a/Makefile b/Makefile
index abebe27..d8ae75b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,19 +1,19 @@
-version := $$(grep s.version nlp_ruby.gemspec | awk '{print $$3}' | sed "s|'||g")
+version := $$(grep s.version zipf.gemspec | awk '{print $$3}' | sed "s|'||g")
-all: lib/nlp_ruby.rb lib/nlp_ruby/bleu.rb lib/nlp_ruby/dag.rb lib/nlp_ruby/fileutil.rb lib/nlp_ruby/misc.rb lib/nlp_ruby/semirings.rb lib/nlp_ruby/SparseVector.rb lib/nlp_ruby/stringutil.rb lib/nlp_ruby/tfidf.rb lib/nlp_ruby/Translation.rb
- gem build nlp_ruby.gemspec
+all: lib/zipf.rb lib/zipf/bleu.rb lib/zipf/dag.rb lib/zipf/fileutil.rb lib/zipf/misc.rb lib/zipf/semirings.rb lib/zipf/SparseVector.rb lib/zipf/stringutil.rb lib/zipf/tfidf.rb lib/zipf/Translation.rb
+ gem build zipf.gemspec
install:
- gem install nlp_ruby-$(version).gem
+ gem install zipf-$(version).gem
clean:
- rm nlp_ruby-$(version).gem
- gem uninstall nlp_ruby -v $(version)
+ rm zipf-$(version).gem
+ gem uninstall zipf -v $(version)
rake_test:
rake test
publish:
- gem push nlp_ruby-$(version).gem
+ gem push zipf-$(version).gem
diff --git a/README.md b/README.md
index cc8d3ef..ff5bd3d 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,8 @@
-nlp_ruby
-========
+zipf
+====
My little NLP library, supposed to make _my_ work a little easier and less redundant.
-The .gem can be found here: https://rubygems.org/gems/nlp_ruby
+The .gem can be found here: https://rubygems.org/gems/zipf
bleu.rb : BLEU implementation, also per-sentence-BLEU
dag.rb : implementation of a directed acyclic graph and various algorithms
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
diff --git a/test/test_dag.rb b/test/test_dag.rb
index f5330da..5c3938b 100755
--- a/test/test_dag.rb
+++ b/test/test_dag.rb
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
-require 'nlp_ruby'
+require_relative '../lib/zipf'
require 'test/unit'
diff --git a/test/test_hg.rb b/test/test_hg.rb
index 50fedc0..667a3b8 100755
--- a/test/test_hg.rb
+++ b/test/test_hg.rb
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
-require 'nlp_ruby'
+require_relative '../lib/zipf'
require 'test/unit'
diff --git a/nlp_ruby.gemspec b/zipf.gemspec
index 1393918..5873037 100644
--- a/nlp_ruby.gemspec
+++ b/zipf.gemspec
@@ -1,12 +1,12 @@
Gem::Specification.new do |s|
- s.name = 'nlp_ruby'
- s.version = '0.4.4'
- s.date = '2014-06-03'
+ s.name = 'zipf'
+ s.version = '1.0'
+ s.date = '2014-06-16'
s.summary = 'nlp_ruby'
s.description = 'NLP related tools and classes'
s.authors = ['Patrick Simianer']
s.email = 'p@simianer.de'
- s.files = Dir['lib/*.rb', 'lib/nlp_ruby/*.rb']
+ s.files = Dir['lib/*.rb', 'lib/zipf/*.rb']
s.homepage = 'http://simianer.de'
s.license = 'MIT'
end