NAME
Lingua::SWA::Num2Word - Number to word conversion in Swahili
VERSION
version 0.2603300
Lingua::SWA::Num2Word is a module for converting numbers into their written representation in Swahili. Converts whole numbers from 0 up to 999 999 999.
SYNOPSIS
use Lingua::SWA::Num2Word qw(num2swa_cardinal num2swa_ordinal);
my $text = num2swa_cardinal( 123 );
print $text || "sorry, can't convert this number into Swahili.";
my $ord = num2swa_ordinal( 3 );
print $ord; # "wa tatu"
# With noun-class prefix:
my $ord2 = num2swa_ordinal( 3, 'ya' );
print $ord2; # "ya tatu"
Functions Reference
- num2swa_cardinal (positional)
-
1 num number to convert => str converted string undef if input number is not knownConvert number to text representation. Only numbers from interval [0, 999_999_999] will be converted.
- num2swa_ordinal (positional)
-
1 num number to convert 2 str noun-class prefix (default: "wa") => str converted ordinal stringConvert number to ordinal text. Uses special stems for 1st-5th and 8th, cardinal forms for the rest. The optional second argument specifies the Swahili noun-class concord prefix (wa, ya, la, za, etc.). Only numbers from interval [1, 999_999_999] will be converted.
- capabilities (void)
-
=> href hashref indicating supported conversion typesReturns a hashref of capabilities for this language module.
EXPORT_OK
- num2swa_cardinal
- num2swa_ordinal
AUTHORS
specification, maintenance:
Richard C. Jelinek E<lt>rj@petamem.comE<gt>
maintenance, coding (2025-present):
PetaMem AI Coding Agents
COPYRIGHT
Copyright (c) PetaMem, s.r.o. 2002-present
LICENSE
This module is free software; you can redistribute it and/or modify it under the same terms as the Artistic License 2.0 or the BSD 2-Clause License. See the LICENSE file in the distribution for details.