Lingua::LangId::Utils - language guesser: generic utilities |
Lingua::LangId::Utils - language guesser: generic utilities
##======================================================================== ## PRELIMINARIES use Lingua::LangId::Utils; ##======================================================================== ## Functions: generic utilities ($outfh,\$str) = stringfh($mode); $min = min2($x,$y); $max = max2($x,$y); $coefs = ylinfit($y,$x) ##-- scalar context; $coefs = ylogfit($y,$x) ##-- scalar context;
Following tags are exportabe:
fit=>[qw(ylinfit ylogfit)], norm=>[qw(_gausscdf _gausswidth)], cmp=>[qw(min2 max2)], io=>[qw(stringfh)], all=>$ALL_OF_THE_ABOVE
All functions exportable under any tag are exportable.
Everything is exported by default.
($outfh,\$str) = stringfh($mode); ($outfh,\$str) = stringfh($mode,\$str)
Returns new filehandle for I/O from/to \$str, which defaults to a new string. $mode defaults to '+<' (read/write).
$min = min2($x,$y);
Binary minimum operator for numeric scalars.
$max = max2($x,$y);
Binary maximum operator for numeric scalars.
$coefs = ylinfit($y,$x) ##-- scalar context; ($yfit,$coefs) = ylinfit($y,$x) ##-- array context
Linear fits $y to $x using PDL::Fit::linfit::linfit1d().
$coeffs are [$a,$b] such that:
all($yfit == $a*$x + $b)
$coefs = ylogfit($y,$x) ##-- scalar context; ($yfit,$coefs) = ylogfit($y,$x) ##-- array context
Linear fits log($y)
to log($x)
using ylinfit()
.
$coeffs are [$a,$b] such that:
all($yfit == $b*($x**$a))
$pvals = gausscdf($xvals, $mu,$sigma);
Returns p-values (pdl) corrsponding to $xvals for normal distribution with parameters ($mu,$sigma).
$width = gausswidth($confidence, $mu,$sigma); ##-- scalar context ($mu-$width,$mu+$width) = gausswidth($confidence, $mu,$sigma); ##-- array context
In scalar context, returns width around mean corresponding to confidence level $confidence In array context, returns interval around mean for level $confidence.
Lingua::LangId(3pm)
Bryan Jurish <jurish@uni-potsdam.de>
Copyright (C) 2009 by Bryan Jurish
This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available.
Lingua::LangId::Utils - language guesser: generic utilities |