Permalink
Browse files

Integrated jeweler and bundler. Reorganized files. Updated README.rdoc.

  • Loading branch information...
jcwilk committed Jun 25, 2010
1 parent b6b98c9 commit a18aa47f8c28fd14557f40b8652951d011a8e3e1
Showing with 246 additions and 24 deletions.
  1. +5 −0 .document
  2. +25 −0 .gitignore
  3. +6 −0 Gemfile
  4. +45 −0 Gemfile.lock
  5. +18 −0 LICENSE
  6. +7 −1 README.rdoc
  7. +60 −0 Rakefile
  8. +5 −0 VERSION.yml
  9. +1 −1 examples/stanford-sentence-parser.rb
  10. +5 −22 lib/stanfordparser.rb
  11. 0 lib/{ → stanfordparser}/java_object.rb
  12. +69 −0 stanfordparser.gemspec
View
@@ -0,0 +1,5 @@
+README.rdoc
+lib/**/*.rb
+bin/*
+features/**/*.feature
+LICENSE
View
@@ -0,0 +1,25 @@
+## MAC OS
+.DS_Store
+
+## TEXTMATE
+*.tmproj
+tmtags
+
+## EMACS
+*~
+\#*
+.\#*
+
+## VIM
+*.swp
+
+## RubyMine
+/.idea
+
+## PROJECT::GENERAL
+coverage
+rdoc
+pkg
+
+## PROJECT::SPECIFIC
+.bundle
View
@@ -0,0 +1,6 @@
+source :gemcutter
+gem "rjb"
+gem "rake"
+gem "jeweler"
+gem "treebank", ">= 3.0.0"
+gem "rspec", ">= 1.2.9"
View
@@ -0,0 +1,45 @@
+---
+dependencies:
+ rake:
+ group:
+ - :default
+ version: ">= 0"
+ rspec:
+ group:
+ - :default
+ version: ">= 1.2.9"
+ jeweler:
+ group:
+ - :default
+ version: ">= 0"
+ treebank:
+ group:
+ - :default
+ version: ">= 3.0.0"
+ rjb:
+ group:
+ - :default
+ version: ">= 0"
+specs:
+- rake:
+ version: 0.8.7
+- json_pure:
+ version: 1.4.3
+- gemcutter:
+ version: 0.5.0
+- git:
+ version: 1.2.5
+- rubyforge:
+ version: 2.0.4
+- jeweler:
+ version: 1.4.0
+- rjb:
+ version: 1.2.5
+- rspec:
+ version: 1.3.0
+- treebank:
+ version: 3.0.0
+hash: 264a823adfd7bb2231dd1037e95b74038b67283d
+sources:
+- Rubygems:
+ uri: http://gemcutter.org
View
18 LICENSE
@@ -0,0 +1,18 @@
+Copyright 2007-2008 William Patrick McNeill
+Copyright (c) 2010 John Wilkinson
+
+This file is part of the Stanford Parser Ruby Wrapper.
+
+The Stanford Parser Ruby Wrapper is free software; you can redistribute it
+and/or modify it under the terms of the GNU General Public License as
+published by the Free Software Foundation; either version 2 of the License,
+or (at your option) any later version.
+
+The Stanford Parser Ruby Wrapper is distributed in the hope that it will be
+useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+editalign; if not, write to the Free Software Foundation, Inc., 51 Franklin
+St, Fifth Floor, Boston, MA 02110-1301 USA
View
@@ -14,6 +14,12 @@ AFAIK there aren't other copies of this on github, please correct me if I'm mist
See README.orig for Bill's readme, which includes dependencies, installation, and usage.
+== Branches
+
+master - Jeweler and Bundler integrated along with slight reorganization of files to be more gem-standard. This is the branch you should use if you want to source the gem straight from github. I will leave this branch alone for the most part unless I find/come up with stable and useful additions. All changes will be backwards compatible.
+stock - Almost untouched from Bill's version, except for the README. Use this branch if that's what you're looking for.
+experimental - I'll be putting in some code as examples and testing out some ideas. Do not use this branch as a gem. You are very encouraged, however, to fork it and add some code/make my code better. I'll try to integrate all the pull requests I get, if not in that branch into another.
+
== Note on Patches/Pull Requests
* Fork the project.
@@ -25,4 +31,4 @@ See README.orig for Bill's readme, which includes dependencies, installation, an
== Copyright
Copyright (c) 2010 John Wilkinson. See LICENSE for details.
-Copyright 2007-2008, William Patrick McNeill. See README.orig for details.
+Copyright 2007-2008, William Patrick McNeill. See README.orig for details.
View
@@ -0,0 +1,60 @@
+require 'rubygems'
+require 'rake'
+
+$LOAD_PATH.unshift('lib')
+
+begin
+ require 'jeweler'
+ Jeweler::Tasks.new do |gem|
+ gem.name = "stanfordparser"
+ gem.summary = "GitHub upload/extension of Bill McNeal's stanfordparser rubygem"
+ gem.description = "Ruby wrapper of the Stanford Parser, a NLP parser built in Java."
+ gem.email = "jcwilk@gmail.com"
+ gem.homepage = "http://github.com/jcwilk/stanfordparser"
+ gem.authors = ["John Wilkinson","Bill McNeal"]
+
+ gem.add_dependency "rjb", ">= 1.2.5"
+ gem.add_dependency "treebank", ">= 3.0.0"
+ gem.add_development_dependency "rspec", ">= 1.2.9"
+ end
+ Jeweler::GemcutterTasks.new
+rescue LoadError
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
+end
+
+require 'rake/testtask'
+Rake::TestTask.new(:test) do |test|
+ test.test_files = FileList.new('test/**/test_*.rb') do |list|
+ list.exclude 'test/test_helper.rb'
+ end
+ test.libs << 'test'
+ test.verbose = true
+end
+
+require 'spec/rake/spectask'
+Spec::Rake::SpecTask.new(:spec) do |spec|
+ spec.libs << 'lib' << 'spec'
+ spec.spec_files = FileList['spec/**/*_spec.rb']
+end
+
+Spec::Rake::SpecTask.new(:rcov) do |spec|
+ spec.libs << 'lib' << 'spec'
+ spec.pattern = 'spec/**/*_spec.rb'
+ spec.rcov = true
+end
+
+task :test => :check_dependencies
+
+task :spec => :check_dependencies
+
+task :default => :test
+
+require 'rake/rdoctask'
+Rake::RDocTask.new do |rdoc|
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
+
+ rdoc.rdoc_dir = 'rdoc'
+ rdoc.title = "stanfordparser #{version}"
+ rdoc.rdoc_files.include('README*')
+ rdoc.rdoc_files.include('lib/**/*.rb')
+end
View
@@ -0,0 +1,5 @@
+---
+:major: 2
+:minor: 2
+:patch: 1
+:build: s
View
@@ -36,7 +36,7 @@
# sentence::
# A sentence to parse. This must appear after all the options and be quoted.
-
+require 'rubygems'
require "stanfordparser"
# The last argument is the sentence. The rest of the command line is passed
View
@@ -1,21 +1,4 @@
-# Copyright 2007-2008 William Patrick McNeill
-#
-# This file is part of the Stanford Parser Ruby Wrapper.
-#
-# The Stanford Parser Ruby Wrapper is free software; you can redistribute it
-# and/or modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of the License,
-# or (at your option) any later version.
-#
-# The Stanford Parser Ruby Wrapper is distributed in the hope that it will be
-# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-# Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# editalign; if not, write to the Free Software Foundation, Inc., 51 Franklin
-# St, Fifth Floor, Boston, MA 02110-1301 USA
-
+require 'rubygems'
require "pathname"
require "rjb"
@@ -28,13 +11,13 @@
end
require "yaml"
-require "java_object.rb"
-
# Wrapper for the {Stanford Natural Language
# Parser}[http://nlp.stanford.edu/downloads/lex-parser.shtml].
module StanfordParser
- VERSION = "2.2.0"
+ require "stanfordparser/java_object"
+
+ VERSION = "2.2.1"
# The default sentence segmenter and tokenizer. This is an English-language
# tokenizer with support for Penn Treebank markup.
@@ -62,7 +45,7 @@ module StanfordParser
# This function returns the path of the parser installation root.
def StanfordParser.initialize_on_load
if RUBY_PLATFORM =~ /(win|w)32$/
- root = Pathname.new("C:\\stanford-parser\\current")
+ root = Pathname.new("C:\\stanford-parser\\current ")
config = Pathname.new("C:\\stanford-parser\\ruby-stanford-parser.yaml")
else
root = Pathname.new("/usr/local/stanford-parser/current")
File renamed without changes.
View
@@ -0,0 +1,69 @@
+# Generated by jeweler
+# DO NOT EDIT THIS FILE DIRECTLY
+# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
+# -*- encoding: utf-8 -*-
+
+Gem::Specification.new do |s|
+ s.name = %q{stanfordparser}
+ s.version = "2.2.1.s"
+
+ s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
+ s.authors = ["John Wilkinson", "Bill McNeal"]
+ s.date = %q{2010-06-21}
+ s.description = %q{Ruby wrapper of the Stanford Parser, a NLP parser built in Java.}
+ s.email = %q{jcwilk@gmail.com}
+ s.extra_rdoc_files = [
+ "LICENSE",
+ "README.orig",
+ "README.rdoc"
+ ]
+ s.files = [
+ ".document",
+ ".gitignore",
+ "LICENSE",
+ "README.orig",
+ "README.rdoc",
+ "Rakefile",
+ "VERSION.yml",
+ "examples/connection_finder.rb",
+ "examples/stanford-sentence-parser.rb",
+ "lib/stanfordparser.rb",
+ "lib/stanfordparser/java_object.rb",
+ "spec/spec.opts",
+ "spec/spec_helper.rb",
+ "spec/stanfordparser_spec.rb",
+ "test/test_stanfordparser.rb"
+ ]
+ s.homepage = %q{http://github.com/jcwilk/stanfordparser}
+ s.rdoc_options = ["--charset=UTF-8"]
+ s.require_paths = ["lib"]
+ s.rubygems_version = %q{1.3.7}
+ s.summary = %q{GitHub upload/extension of Bill McNeal's stanfordparser rubygem}
+ s.test_files = [
+ "spec/spec_helper.rb",
+ "spec/stanfordparser_spec.rb",
+ "test/test_stanfordparser.rb",
+ "examples/connection_finder.rb",
+ "examples/stanford-sentence-parser.rb"
+ ]
+
+ if s.respond_to? :specification_version then
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
+ s.specification_version = 3
+
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
+ s.add_runtime_dependency(%q<rjb>, [">= 1.2.5"])
+ s.add_runtime_dependency(%q<treebank>, [">= 3.0.0"])
+ s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
+ else
+ s.add_dependency(%q<rjb>, [">= 1.2.5"])
+ s.add_dependency(%q<treebank>, [">= 3.0.0"])
+ s.add_dependency(%q<rspec>, [">= 1.2.9"])
+ end
+ else
+ s.add_dependency(%q<rjb>, [">= 1.2.5"])
+ s.add_dependency(%q<treebank>, [">= 3.0.0"])
+ s.add_dependency(%q<rspec>, [">= 1.2.9"])
+ end
+end
+

0 comments on commit a18aa47

Please sign in to comment.