NAME
Lingua::THA::Word2Num
VERSION
version 0.2603250
Word 2 Number conversion in THA.
Lingua::THA::Word2Num is module for converting Thai numerals into numbers. Converts whole numbers from 0 up to 999 999 999. Input is expected to be in UTF-8.
SYNOPSIS
use Lingua::THA::Word2Num;
my $num = Lingua::THA::Word2Num::w2n( 'สิบเจ็ด' );
print defined($num) ? $num : "sorry, can't convert this text into number.";
Functions Reference
- w2n (positional)
-
1 str string to convert (Thai UTF-8 text) => num converted number undef if input string is not knownConvert text representation to number. You can specify a numeral from interval [0,999_999_999].
Handles Thai special forms:
เอ็ด (et) for 1 in units position of compound numbers
ยี่ (yi) for 2 in tens position (20-29)
- tha_numerals (void)
-
=> obj new parser objectInternal parser.
EXPORT_OK
- w2n
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. 2004-present