in reply to Re^4: n-dimensional statistical analysis of DNA sequences (or text, or ...)
in thread n-dimensional statistical analysis of DNA sequences (or text, or ...)
I've tried to replicate and extend the first results I got, but I don't seem to be calling this properly. The logic for Getopt::Long seems pretty opaque to me now. Do you see why this is fundamentally different than what worked before?
$ ./2.analyse_text.pl --input-corpus 84-0.txt --ngram-length 4 --outp +ut-state 4.shelley.state args are --input-corpus 84-0.txt --ngram-length 4 --output-state 4.she +lley.state Unknown option: input-corpus Unknown option: ngram-length Unknown option: output-state Usage : ./2.analyse_text.pl <options> Something wrong with command-line parameters... $ cat 2.analyse_text.pl #!/usr/bin/env perl # FILE: analyse_text.pl # by bliako use 5.011; use warnings; use Getopt::Long; use Data::Dump qw/dump/; use lib '.'; use Markov::Ndimensional; my @args = @ARGV; say "args are @args"; my $input_corpus_filename = undef; my $input_state_filename = undef; my $output_state_filename = undef; my $output_stats_filename = undef; my $separator = '\s'; my $internal_separator = '|'; my $seed = undef; my $num_iterations = 100; if( ! Getopt::Long::GetOptions( 'input-state=s' => \$input_state_filename, 'separator=s' => \$separator, 'num-iterations=i' => $num_iterations, 'seed=s' => \$seed, 'help|h' => sub { print STDERR usage($0); exit(0) } ) ){ print STDERR usage($0) . "\n\nSomething wrong with command-line p +arameters...\n"; exit(1); } ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: n-dimensional statistical analysis of DNA sequences (or text, or ...)
by bliako (Abbot) on Feb 07, 2019 at 11:37 UTC | |
by Aldebaran (Curate) on Jun 27, 2019 at 23:16 UTC | |
by bliako (Abbot) on Jun 28, 2019 at 13:40 UTC | |
by Aldebaran (Curate) on Jul 05, 2019 at 23:30 UTC | |
by bliako (Abbot) on Jul 06, 2019 at 00:43 UTC | |
|