File Coverage

blib/lib/WordList/ID/KBBI/FigureOfSpeech.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 12 12 100.0


line stmt bran cond sub pod time code
1             package WordList::ID::KBBI::FigureOfSpeech;
2              
3 1     1   452210 use strict;
  1         2  
  1         94  
4              
5             our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
6             our $DATE = '2024-11-20'; # DATE
7             our $DIST = 'WordList-ID-KBBI-FigureOfSpeech'; # DIST
8             our $VERSION = '0.001'; # VERSION
9              
10 1     1   784 use WordList;
  1         2139  
  1         60  
11             our @ISA = qw(WordList);
12              
13 1     1   696 use Role::Tiny::With;
  1         9170  
  1         158  
14             with 'WordListRole::RandomSeekPick';
15              
16             our %STATS = ("num_words_contains_unicode",0,"num_words_contains_nonword_chars",253,"num_words",253,"num_words_contain_nonword_chars",253,"num_words_contain_unicode",0,"avg_word_len",17.4782608695652,"num_words_contain_whitespace",253,"num_words_contains_whitespace",253,"shortest_word_len",10,"longest_word_len",143); # STATS
17              
18             1;
19             # ABSTRACT: Indonesian figure of speech (kiasan) entries from Kamus Besar Bahasa Indonesia (KBBI), 3e
20              
21             =pod
22              
23             =encoding UTF-8
24              
25             =head1 NAME
26              
27             WordList::ID::KBBI::FigureOfSpeech - Indonesian figure of speech (kiasan) entries from Kamus Besar Bahasa Indonesia (KBBI), 3e
28              
29             =head1 VERSION
30              
31             This document describes version 0.001 of WordList::ID::KBBI::FigureOfSpeech (from Perl distribution WordList-ID-KBBI-FigureOfSpeech), released on 2024-11-20.
32              
33             =head1 SYNOPSIS
34              
35             use WordList::ID::KBBI::FigureOfSpeech;
36              
37             my $wl = WordList::ID::KBBI::FigureOfSpeech->new;
38              
39             # Pick a (or several) random word(s) from the list
40             my ($word) = $wl->pick;
41             my ($word) = $wl->pick(1); # ditto
42             my @words = $wl->pick(3); # no duplicates
43              
44             # Check if a word exists in the list
45             if ($wl->word_exists('foo')) { ... } # case-sensitive
46              
47             # Call a callback for each word
48             $wl->each_word(sub { my $word = shift; ... });
49              
50             # Iterate
51             my $first_word = $wl->first_word;
52             while (defined(my $word = $wl->next_word)) { ... }
53              
54             # Get all the words (beware, some wordlists are *huge*)
55             my @all_words = $wl->all_words;
56              
57             =head1 DESCRIPTION
58              
59             This wordlist uses random-seek picking, which gives higher probability for
60             longer words. See L for more details.
61              
62             =head1 WORDLIST STATISTICS
63              
64             +----------------------------------+------------------+
65             | key | value |
66             +----------------------------------+------------------+
67             | avg_word_len | 17.4782608695652 |
68             | longest_word_len | 143 |
69             | num_words | 253 |
70             | num_words_contain_nonword_chars | 253 |
71             | num_words_contain_unicode | 0 |
72             | num_words_contain_whitespace | 253 |
73             | num_words_contains_nonword_chars | 253 |
74             | num_words_contains_unicode | 0 |
75             | num_words_contains_whitespace | 253 |
76             | shortest_word_len | 10 |
77             +----------------------------------+------------------+
78              
79             The statistics is available in the C<%STATS> package variable.
80              
81             =head1 HOMEPAGE
82              
83             Please visit the project's homepage at L.
84              
85             =head1 SOURCE
86              
87             Source repository is at L.
88              
89             =head1 SEE ALSO
90              
91             L contains the same data.
92              
93             =head1 AUTHOR
94              
95             perlancar
96              
97             =head1 CONTRIBUTING
98              
99              
100             To contribute, you can send patches by email/via RT, or send pull requests on
101             GitHub.
102              
103             Most of the time, you don't need to build the distribution yourself. You can
104             simply modify the code, then test via:
105              
106             % prove -l
107              
108             If you want to build the distribution (e.g. to try to install it locally on your
109             system), you can install L,
110             L,
111             L, and sometimes one or two other
112             Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps required beyond
113             that are considered a bug and can be reported to me.
114              
115             =head1 COPYRIGHT AND LICENSE
116              
117             This software is copyright (c) 2024 by perlancar .
118              
119             This is free software; you can redistribute it and/or modify it under
120             the same terms as the Perl 5 programming language system itself.
121              
122             =head1 BUGS
123              
124             Please report any bugs or feature requests on the bugtracker website L
125              
126             When submitting a bug or request, please include a test-file or a
127             patch to an existing test-file that illustrates the bug or desired
128             feature.
129              
130             =cut
131              
132             __DATA__