| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package Telugu::Utils; | 
| 2 |  |  |  |  |  |  |  | 
| 3 | 1 |  |  | 1 |  | 71165 | use Mouse; | 
|  | 1 |  |  |  |  | 28945 |  | 
|  | 1 |  |  |  |  | 5 |  | 
| 4 | 1 |  |  | 1 |  | 920 | use Kavorka -all; | 
|  | 1 |  |  |  |  | 14848 |  | 
|  | 1 |  |  |  |  | 44 |  | 
| 5 | 1 |  |  | 1 |  | 336422 | use utf8; | 
|  | 1 |  |  |  |  | 3 |  | 
|  | 1 |  |  |  |  | 11 |  | 
| 6 | 1 |  |  | 1 |  | 531 | use Telugu::TGC; | 
|  | 1 |  |  |  |  | 89323 |  | 
|  | 1 |  |  |  |  | 115 |  | 
| 7 |  |  |  |  |  |  |  | 
| 8 |  |  |  |  |  |  | our $VERSION = '0.03'; | 
| 9 |  |  |  |  |  |  |  | 
| 10 |  |  |  |  |  |  |  | 
| 11 |  |  |  |  |  |  | has 'tgc' => ( | 
| 12 |  |  |  |  |  |  | is => 'ro', | 
| 13 |  |  |  |  |  |  | isa => 'Object', | 
| 14 |  |  |  |  |  |  | default => sub { | 
| 15 |  |  |  |  |  |  | my $tgc = Telugu::TGC->new(); | 
| 16 |  |  |  |  |  |  | return $tgc; | 
| 17 |  |  |  |  |  |  | } | 
| 18 |  |  |  |  |  |  | ); | 
| 19 |  |  |  |  |  |  |  | 
| 20 |  |  |  |  |  |  |  | 
| 21 | 1 | 50 |  | 1 |  | 3028 | method ngram( Str $string, Int $n ) { | 
|  | 1 | 50 |  | 1 |  | 2 |  | 
|  | 1 | 50 |  |  |  | 388 |  | 
|  | 1 | 50 |  |  |  | 10 |  | 
|  | 1 | 50 |  |  |  | 5 |  | 
|  | 1 | 50 |  |  |  | 4 |  | 
|  | 1 |  |  |  |  | 4 |  | 
|  | 1 |  |  |  |  | 16 |  | 
|  | 1 |  |  |  |  | 48 |  | 
|  | 1 |  |  |  |  | 4 |  | 
|  | 1 |  |  |  |  | 8 |  | 
|  | 1 |  |  |  |  | 8 |  | 
| 22 | 1 |  |  |  |  | 9 | my @filtered  = $self->tgc->TGC($string); | 
| 23 |  |  |  |  |  |  |  | 
| 24 | 1 |  |  |  |  | 26227 | my @ngram; | 
| 25 | 1 |  |  |  |  | 5 | foreach my $start ( 0 .. @filtered - $n ) { | 
| 26 | 43 |  |  |  |  | 91 | push @ngram, [ @filtered[ $start .. $start + $n - 1 ] ]; | 
| 27 |  |  |  |  |  |  | } | 
| 28 |  |  |  |  |  |  |  | 
| 29 | 1 |  |  |  |  | 10 | return @ngram; | 
| 30 |  |  |  |  |  |  | } | 
| 31 |  |  |  |  |  |  |  | 
| 32 |  |  |  |  |  |  |  | 
| 33 |  |  |  |  |  |  | 1; | 
| 34 |  |  |  |  |  |  |  | 
| 35 |  |  |  |  |  |  | __END__ | 
| 36 |  |  |  |  |  |  | =encoding utf-8 | 
| 37 |  |  |  |  |  |  |  | 
| 38 |  |  |  |  |  |  | =head1 NAME | 
| 39 |  |  |  |  |  |  |  | 
| 40 |  |  |  |  |  |  | Telugu::Utils - Utilities for Telugu strings. | 
| 41 |  |  |  |  |  |  |  | 
| 42 |  |  |  |  |  |  | =head1 SYNOPSIS | 
| 43 |  |  |  |  |  |  |  | 
| 44 |  |  |  |  |  |  | use Telugu::Utils; | 
| 45 |  |  |  |  |  |  | use utf8; | 
| 46 |  |  |  |  |  |  | binmode STDOUT, ":encoding(UTF-8)"; | 
| 47 |  |  |  |  |  |  |  | 
| 48 |  |  |  |  |  |  | my $util = Telugu::Utils->new(); | 
| 49 |  |  |  |  |  |  | my @ngrams = $util->ngram("à°°à°¾à°à±à°à±à°®à°¾à°°à±à°°à±à°¡à±à°¡à°¿", 2); | 
| 50 |  |  |  |  |  |  | print $ngrams[1][0], "\n"; | 
| 51 |  |  |  |  |  |  |  | 
| 52 |  |  |  |  |  |  |  | 
| 53 |  |  |  |  |  |  | =head1 DESCRIPTION | 
| 54 |  |  |  |  |  |  |  | 
| 55 |  |  |  |  |  |  | Currently it provides one function, ngram. It takes two paramameters, first param must be a string and second param must be an integer. | 
| 56 |  |  |  |  |  |  |  | 
| 57 |  |  |  |  |  |  |  | 
| 58 |  |  |  |  |  |  | =head1 AUTHOR | 
| 59 |  |  |  |  |  |  |  | 
| 60 |  |  |  |  |  |  | Rajkumar Reddy, mesg.raj@outlook.com | 
| 61 |  |  |  |  |  |  |  | 
| 62 |  |  |  |  |  |  | =head1 COPYRIGHT AND LICENSE | 
| 63 |  |  |  |  |  |  |  | 
| 64 |  |  |  |  |  |  | Copyright (C) 2019 by Rajkumar Reddy | 
| 65 |  |  |  |  |  |  |  | 
| 66 |  |  |  |  |  |  | This library is free software; you can redistribute it and/or modify | 
| 67 |  |  |  |  |  |  | it under the same terms as Perl itself, either Perl version 5.26.1 or, | 
| 68 |  |  |  |  |  |  | at your option, any later version of Perl 5 you may have available. | 
| 69 |  |  |  |  |  |  |  | 
| 70 |  |  |  |  |  |  |  | 
| 71 |  |  |  |  |  |  | =cut |