Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: Graziella
  • Content: Threads
  • Order by date
  1. Graziella

    true randomization

    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...
  2. Graziella

    Math with Perl !!!

    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
  3. Graziella

    system function problem: help

    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...
  4. Graziella

    regexp too big ! error !

    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
  5. Graziella

    "hidden" characters in .txt files

    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...
  6. Graziella

    regexp too big

    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
  7. Graziella

    concatenation problms and Perl 5.8

    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)...
  8. Graziella

    concatenation problems

    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 =...
  9. Graziella

    dereferencing

    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...
  10. Graziella

    weird behaviour of "print"

    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...
  11. Graziella

    modules and @INC

    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
  12. Graziella

    unmatched ()

    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...
  13. Graziella

    module to split text into sentences

    Hello, does anyone know of a good and easy to use module to split English text into sentences ? Thank you, Grazia
  14. Graziella

    printint &lt;\QUESTION&gt;

    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
  15. Graziella

    pattern matching help

    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...
  16. Graziella

    unmatched () in regexp

    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...

Part and Inventory Search

Back
Top