NAME
Lingua::LAT::Word2Num - Word to number conversion in Latin
VERSION
version 0.2603300
Lingua::LAT::Word2Num is a module for converting Latin numerals into numbers. Converts whole numbers from 0 up to 999 999. Input is expected to be in UTF-8.
SYNOPSIS
use Lingua::LAT::Word2Num;
my $num = Lingua::LAT::Word2Num::w2n( 'septendecim' );
print defined($num) ? $num : "sorry, can't convert this text into number.";
Functions Reference
- w2n (positional)
-
1 str string to convert => num converted number undef if input string is not knownConvert Latin text representation to number. You can specify a numeral from interval [0,999_999].
Handles Latin's subtractive forms (e.g. duodeviginti = 18, undetriginta = 29) and the additive exception for 98.
- ordinal2cardinal (positional)
-
1 str ordinal text (e.g. 'primus', 'tertius', 'vicesimus') => str cardinal text (e.g. 'unus', 'tres', 'viginti') undef if input is not recognised as an ordinalConvert Latin ordinal text to cardinal text (morphological reversal). Handles all three genders (-us/-a/-um), subtractive forms (duodevicesimus, undevicesimus), and compound ordinals.
- lat_numerals (void)
-
=> obj new parser objectInternal parser.
EXPORT_OK
- w2n
- ordinal2cardinal
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
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.