summaryrefslogtreecommitdiffstats
path: root/perl-install/timezone.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-12-24 00:26:22 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-12-24 00:26:22 +0000
commit63ee6b158bf74b995d1e6ed294b6d4b3f3e95ca5 (patch)
treedb9522b8dc1c02af74c6c5050a58e7fd002bdc55 /perl-install/timezone.pm
parent685a29887953bf36c2d0dab4e7bce8a64bd8934e (diff)
downloaddrakx-backup-do-not-use-63ee6b158bf74b995d1e6ed294b6d4b3f3e95ca5.tar
drakx-backup-do-not-use-63ee6b158bf74b995d1e6ed294b6d4b3f3e95ca5.tar.gz
drakx-backup-do-not-use-63ee6b158bf74b995d1e6ed294b6d4b3f3e95ca5.tar.bz2
drakx-backup-do-not-use-63ee6b158bf74b995d1e6ed294b6d4b3f3e95ca5.tar.xz
drakx-backup-do-not-use-63ee6b158bf74b995d1e6ed294b6d4b3f3e95ca5.zip
no_comment
Diffstat (limited to 'perl-install/timezone.pm')
-rw-r--r--perl-install/timezone.pm17
1 files changed, 17 insertions, 0 deletions
diff --git a/perl-install/timezone.pm b/perl-install/timezone.pm
index f0c7cb207..9c1427c76 100644
--- a/perl-install/timezone.pm
+++ b/perl-install/timezone.pm
@@ -78,4 +78,21 @@ sub bestTimezone {
$l2t{common::bestMatchSentence($langtext, keys %l2t)};
}
+my %sex = (
+fr_FR => { '[iln]a$' => 1, '[cdilnst]e$' => 1, 'e$' => .8, 'n$' => .1, 'd$' => .05 },
+en => { 'a$' => 1, 'o$' => 0, '[ln]$' => .3, '[rs]$' => .2 },
+);
+
+
+sub sexProb($) {
+ local ($_) = @_;
+ my $l = $sex{$ENV{LC_ALL}} or return 0.5;
+
+ my ($prob, $nb) = (0, 0);
+ foreach my $k (keys %$l) {
+ /$k/ and $prob += $l->{$k}, $nb++;
+ }
+ $nb ? $prob / $nb : 0.5;
+}
+
1;