Forum: Ruby Odd problem involving rubygems / classifier and Windows

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
unknown (Guest)
on 2006-05-03 21:08
(Received via mailing list)
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 _ (
summarize a text (or rather,
to reduce the number of sentences in it to some ratio), and later to
the result in an RTF file, while coloring those sentences in black which
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
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
before that

To fix this, I call a parts-of-speech tagger as an external program in
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
I do this to find nouns that could be referred to as
'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
    def tag_it(language,output_file)  # call external  tagging program
tag_command='/c/axelhome/lang/mytagger/bin/tag-' + language + '.bat ' +
+ '  '  +                 output_file

#  color text for discarding
#  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\ to same  address
as parent
> (0x2870000) != 0x28B0000
> 108726 [main] ruby 280: child_copy: loaded dll child copy failed
> done 0, windows pid 5468565, Win32 error 5.

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

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

Thank you very much,

Best regards,
This topic is locked and can not be replied to.