Hi,
I need to split a file of 20290 lines into two files randomly for 1000 times; each random split has to produce two subfiles, one representing 80%, the other 20% of the original 20290.
I have to make sure that each of the 1000 80-20 splits of the corpus, I get a different split.
Now, is...
Hi,
$f-measure = (2 * $recall * $precision) / ($recall + $precision);
gives me the following error message:
Can't modify substraction (-) in scalar assignment at line (the one above) near ");"
This is insane: why doens;t this work ?!
Grazia
Hi,
I am working on my PC running Windows XP
I have these few lines of code:
$dir = "c:/Program\ Files/eclipse/eclipse/workspace/ura";
print "DIR: $dir\n";
$cmd = "$dir/etc/run.bat $dir/build/edu/umd/simfinder/Eval ";
system($cmd);
I am trying to write a script that calls java classes to be...
I get this error message
/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/: regexp too big at ...
But I do not have a regex with a seried of \\\\\\ at all !
Any ideas ?
Thank you,
Grazia
Hi,
I have two questions:
1. how does one check to see the encoding of a .txt file when working in a Unix environment ?
2. how does one check to see if there are characters that are not visible through the text editor one is using (pico, vi, emacs) but can create problems with regex when...
Hi,
I get an error message at a certain point in my code because evidently the regex is too large.
How can I know what the size of a regex is so that I can skip processing it ?
Thank you,
Grazia
I am having problems concatenating variables and
printing the concatenated string.
I really hope you can help me because I have never seen this behavior in
Perl
and my only explanation is that there is something in Perl 5.8 that I do
not
know how to use.
Input file (ID, pattern pairs)...
Hi,
I really need some help with a concatenation problem I am having.
I have tried all possible ways of concatenating two strings. For instance, I am trying to concatenate
$old = "1844" and $new = "1866"
by the expression ":" (or any other expression)
I have tried:
$joined_pattern =...
Hi,
I think this is an issue of dereferencing.
I am using a module with
use Lingua::EN::Sentence qw(get_sentences);
Then my code contains:
my ($sen) = &get_sentences($text);
print "HELLO $sen\n";
where get_sentences is a subroutine called from the module Sentence.pm in the...
Hi,
if $q = "How far from the earth is the sun?"
and I want to print $q in between <HELLO> and </HELLO>,
using simply the line
print "<HELLO> $q </HELLO>\n";
Why would the output be:
</HELLO>ow far from the earth is the sun?
With the second </HELLO> printed first, and the...
Hello,
I am trying to use a module, but I get this error
Can't locate Lingua/EN/Sentence.pm in @INC (@INC contains:...)
How do I get @INC to recognize the module ?
Thanks,
Grazia
Hello,
with these lines of code
if ($buf =~ /($pattern)/){
$match = $1;
print "MATCH $match\n";
}
I get the error message "unmatched () in regexp ...". No surprise since $pattern is actually a regex, and might...
Hi,
print "<QUESTION> $questions <\\QUESTION>";
with the double backslash, does not work. Perl still confuses \\Q with one of its special characters.
How could I print <\QUESTION> ?
Grazia
Hi,
I have a list of patterns, for instance,
$pattern = "l\,?454\s*\-?\s*f(oo|ee)t";
The usual way of looking for that pattern in a string, that is,
if ($test =~ /$pattern/){ #do something }
does not work.
How could I tell perl that $pattern is an already formed regular expression ?
Thank...
Hello,
this is something that I still do not know how to avoid.
Assume I have some statement like this one
if ($eng =~ /$chunk/) {
print "$eng\n";
}
If $chunk is something like "word (" then I get an error message like unmatched () in regexp
But I want to be able to search for "word...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.