ssoper / summarize

A Ruby C wrapper for Open Text Summarizer
http://intridea.com/2010/12/3/summarize-a-ruby-c-binding-for-open-text-summarizer
205 stars 14 forks source link

Odd behavior when loading custom dict file #8

Open tbruce opened 10 years ago

tbruce commented 10 years ago

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)

fetch many files and summarize them

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