NAME Text::Guess::Script - Guess script from text using ISO-15924 codes SYNOPSIS use Text::Guess::Script; print Text::Guess::Script->guess('Hello World'); # prints Latn print Text::Guess::Script->guesses('Hello World')->[0]->[0]; # Latn print Text::Guess::Script->guesses('Hello World')->[1]->[0]; # Zyyy use Data::Dumper; print Dumper(Text::Guess::Script->guesses('Hello World')); $VAR1 = [ [ 'Latn', '0.909090909090909' ], [ 'Zyyy', '0.0909090909090909' ] ]; DESCRIPTION Text::Guess::Script matches the characters in the text against the script property and returns the code of the script with most characters. CONSTRUCTOR new() Creates a new object which maintains internal storage areas for the Text::Guess::Script computation. Use one of these per concurrent Text::Guess::Script->guess() call. METHODS guess($text) Returns the script code with the most characters. guesses($text) Returns an array reference with an array, sorted descending by relative frequency for each script. Each entry is a pair of script code and relative frequency like this: $guesses = [ [ 'Latn', '0.909090909090909' ], [ 'Zyyy', '0.0909090909090909' ] ]; EXPORT None by design. STABILITY Until release of version 1.00 the included methods, names of methods and their interfaces are subject to change. Beginning with version 1.00 the specification will be stable, i.e. not changed between major versions. SOURCE REPOSITORY http://github.com/wollmers/Text-Guess-Script AUTHOR Helmut Wollmersdorfer COPYRIGHT Copyright 2016-2021 Helmut Wollmersdorfer LICENSE This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO Locale::Codes::Script