ssoper / summarize Goto Github PK
View Code? Open in Web Editor NEWA Ruby C wrapper for Open Text Summarizer
Home Page: http://intridea.com/2010/12/3/summarize-a-ruby-c-binding-for-open-text-summarizer
A Ruby C wrapper for Open Text Summarizer
Home Page: http://intridea.com/2010/12/3/summarize-a-ruby-c-binding-for-open-text-summarizer
I tried running gem install summarize
but am getting the following error message:
Building native extensions. This could take a while...
ERROR: Error installing summarize:
ERROR: Failed to build gem native extension.
/Users/Dani/.rvm/rubies/ruby-2.1.2/bin/ruby extconf.rb
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling article.c
article.c:107:37: warning: passing 'const unsigned char *' to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
if ((aWord == NULL) || (0==strlen(aWord)) ||(NULL==aLine)) return;
^~~~~
/usr/include/string.h:82:28: note: passing argument to parameter here
size_t strlen(const char *);
^
article.c:109:68: warning: passing 'const unsigned char *' to parameter of type 'const gchar *' (aka 'const char *') converts between pointers to integer types with different sign [-Wpointer-sign]
aLine->words = g_list_append (aLine->words, (gpointer) g_strdup (aWord));
^~~~~
/usr/local/Cellar/glib/2.40.0_1/include/glib-2.0/glib/gstrfuncs.h:216:52: note: passing argument to parameter 'str' here
gchar* g_strdup (const gchar *str) G_GNUC_MALLOC;
^
2 warnings generated.
compiling dictionary.c
dictionary.c:28:10: fatal error: 'libxml/xmlmemory.h' file not found
#include <libxml/xmlmemory.h>
^
1 error generated.
make: *** [dictionary.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/Dani/.rvm/gems/ruby-2.1.2/gems/summarize-1.0.3 for inspection.
Results logged to /Users/Dani/.rvm/gems/ruby-2.1.2/extensions/x86_64-darwin-13/2.1.0-static/summarize-1.0.3/gem_make.out
Btw, I am running Ruby 2.1.2.
Thanks
Hi,
I am facing in issue when trying to deploy my app to heroku with the summarize gem.
Heroku returns the following error
remote: Fetching dependency metadata from https://rubygems.org
remote: Could not find summarize-1.0.4 in any of the sources.
when I try specifying the github repository in my gemfile before pushing it, I get:
remote: Fetching https://github.com/ssoper/summarize.git
remote: There was a LoadError while loading summarize.gemspec:
remote: cannot load such file -- summarize/summarize from
remote: /tmp/build_4223d0ae60599e1f77e9caca2476e8b3/vendor/bundle/ruby/2.2.0/bundler/gems/summarize-a80c110fa4fe/summarize.gemspec:2:in
remote: `
Please can somebody help me out?
Thank you.
EDIT:
Turns out I was making a mistake in specifying the verison on Heroku. I was referring to version 1.0.4 which is not out on rubygems (it refers to v1.0.3)
2 warnings generated.
compiling dictionary.c
dictionary.c:28:10: fatal error: 'libxml/xmlmemory.h' file not found
#include <libxml/xmlmemory.h>
^~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [dictionary.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/djdavis/.rvm/gems/ruby-2.6.3/gems/summarize-1.0.3 for inspection.
Results logged to /Users/djdavis/.rvm/gems/ruby-2.6.3/extensions/x86_64-darwin-18/2.6.0/summarize-1.0.3/gem_make.out```
More of a feature request rather than a bug.. But would be nice to get access to --about (since --keywords is deprecated), which simply returns the top keywords/topics for the input doc!
ex:
ots ig1 --about
Article talks about "concurrent,models,process,threads,channels"
Hello,
I'm trying to install gem on windows 8, with rails configured. When trying to install via bundler, I'm getting the following error:
$ gem install summarize
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing summarize:
ERROR: Failed to build gem native extension.
c:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
creating Makefile
make
generating summarize-i386-mingw32.def
compiling article.c
In file included from article.c:25:0:
libots.h:24:18: fatal error: glib.h: No such file or directory
compilation terminated.
make: *** [article.o] Error 1
Gem files will remain installed in c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/summarize-1.0.3 for inspection.
Results logged to c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/summarize-1.0.3/ext/summarize/gem_make.out
Any suggestions?
Thank you,
Sid
I have all the necessary packages installed for summarize, the gem is installed via my gemfile in my rails 3 application, and in development it seems to be working correctly however since deploying to production I am now getting an "undefined method 'summarize'"
Error message : gems/summarize-1.0.3/lib/summarize.rb:100:in `summarize': Cannot load dictionary file (RuntimeError)
Hello,
After installing the gem and trying to run a test through irb like:
"My string".summarize(:ratio => 25)
I always get the following error:
NoMethodError: undefined method `summarize' for "your_string":String
It looks like although the gem is installed it is not being recognized. I doubled check I have glib2 and libxml2 installed.
Any idea on how to solve this?
Thanks!
Sean:
First, thanks for your work on this. It's a lifesaver. But of course no good deed goes unpunished.
I'm having trouble opening a custom dictionary file. The context is maybe unusual -- I'm in the middle of a block that opens a persistent httpd connection, like this (highly simplified):
httpcon = Net::HTTP.new(server_uri.host, server_uri.port)
httpcon.start do |http|
...
## fetch a file
contents, topics = filecontents.summarize( :topics => true, :dictionary => '/some/random/dicfile')
...
end
I get something in the depths of http.rb complaining that it can't open the file, apparently thinking that it should be doing so over the http connection rather than reading it off local disk.
Any ideas? For now, I'm mangling the local (gem) copy of en.xml, but that's not good ;).
t
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.