Odd problem involving rubygems / classifier and Windows


#1

Dear all,

I am experiencing a strange error when calling two Ruby programs
which work fine when called alone or from different *.rb files.

In a first Ruby method, I call the summarization method
script from http://classifier.rufy.com/ (http://classifier.rufy.com/)
to
summarize a text (or rather,
to reduce the number of sentences in it to some ratio), and later to
output
the result in an RTF file, while coloring those sentences in black which
are
kept, and coloring those sentences that are discarded in red.
This actually works fine.

Now, in the discarding process, the red and the black sentences
generally are not neatly separated, by there is, say, one sentence in
black,
followed
by three sentences in red, and then two sentences in red etc.
Now, for a reader who only gets the remaining, black sentences,
words like ‘there’,‘she’,‘it’, etc. may have no meaning if the place or
person one is talking about is actually in one of the discarded
sentences
before that
sentence.

To fix this, I call a parts-of-speech tagger as an external program in
Windows
using the ‘system’ command. (A parts of speech tagger takes every
word form an English text file and decides whether it is a noun, a verb
etc.)
I do this to find nouns that could be referred to as
‘he’,‘she’,‘hers’,‘it’,
‘there’ etc.

Both scripts work on texts that are read in from files.
But when I combine them in one .rb file,

require “rubygems”
require ‘classifier’

class String
def text_summ
# call summary from classifier
end
def tag_it(language,output_file) # call external tagging program
tag_command=’/c/axelhome/lang/mytagger/bin/tag-’ + language + '.bat ’ +
self

  • ’ ’ + output_file
    system(tag_command)
    end
    end

color text for discarding

“a_too_long_text.txt”.text_summ(30,‘a_30_percent_as_long_text.rtf’)

tag text for parts of speech

‘a_30_percent_as_long_text.rtf’.tag_it(‘english’,‘output_file.txt’) ,

I get the following set of errors :

3 [main] ruby 3948 C:\cygwin\ur\local\bin\ruby.exe : *** fatal error:
unable to remap
C:\cygwin\usr\local\lib\ruby\1.8\i-386-cygwin\opensll.so to same address
as parent
(0x2870000) != 0x28B0000
108726 [main] ruby 280: child_copy: loaded dll child copy failed
0x63096000…0x630A2E70,
done 0, windows pid 5468565, Win32 error 5.

These lines keep returning, with some differences in the windows pid
numbers.

What is going on here? What could be done to fix it ?

Thank you very much,

Best regards,
Axel