| 1 | package WordList::Phrase::FR::Idiom::Wiktionary; | ||
| 2 | |||
| 3 | 1 | our $DATE = '2016-02-10'; # DATE | |
| 4 | 1 | our $VERSION = '0.01'; # VERSION | |
| 5 | |||
| 6 | 1 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 1 | ▶ | use WordList; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 1 | our @ISA = qw(WordList); | |
| 10 | |||
| 11 | 1 | our %STATS = ("shortest_word_len",4,"num_words_contains_whitespace",370,"num_words",377,"num_words_contains_unicode",135,"num_words_contains_nonword_chars",373,"avg_word_len",17.8143236074271,"longest_word_len",48); # STATS | |
| 12 | |||
| 13 | 1 | 1; | |
| 14 | # ABSTRACT: French idioms from wiktionary.org | ||
| 15 | |||
| 16 | =pod | ||
| 17 | |||
| 18 | =encoding UTF-8 | ||
| 19 | |||
| 20 | =head1 NAME | ||
| 21 | |||
| 22 | WordList::Phrase::FR::Idiom::Wiktionary - French idioms from wiktionary.org | ||
| 23 | |||
| 24 | =head1 VERSION | ||
| 25 | |||
| 26 | This document describes version 0.01 of WordList::Phrase::FR::Idiom::Wiktionary (from Perl distribution WordList-Phrase-FR-Idiom-Wiktionary), released on 2016-02-10. | ||
| 27 | |||
| 28 | =head1 SYNOPSIS | ||
| 29 | |||
| 30 | use WordList::Phrase::FR::Idiom::Wiktionary; | ||
| 31 | |||
| 32 | my $wl = WordList::Phrase::FR::Idiom::Wiktionary->new; | ||
| 33 | |||
| 34 | # Pick a (or several) random word(s) from the list | ||
| 35 | my $word = $wl->pick; | ||
| 36 | my @words = $wl->pick(3); | ||
| 37 | |||
| 38 | # Check if a word exists in the list | ||
| 39 | if ($wl->word_exists('foo')) { ... } | ||
| 40 | |||
| 41 | # Call a callback for each word | ||
| 42 | $wl->each_word(sub { my $word = shift; ... }); | ||
| 43 | |||
| 44 | # Get all the words | ||
| 45 | my @all_words = $wl->all_words; | ||
| 46 | |||
| 47 | =head1 STATISTICS | ||
| 48 | |||
| 49 | +----------------------------------+------------------+ | ||
| 50 | | key | value | | ||
| 51 | +----------------------------------+------------------+ | ||
| 52 | | avg_word_len | 17.8143236074271 | | ||
| 53 | | longest_word_len | 48 | | ||
| 54 | | num_words | 377 | | ||
| 55 | | num_words_contains_nonword_chars | 373 | | ||
| 56 | | num_words_contains_unicode | 135 | | ||
| 57 | | num_words_contains_whitespace | 370 | | ||
| 58 | | shortest_word_len | 4 | | ||
| 59 | +----------------------------------+------------------+ | ||
| 60 | |||
| 61 | The statistics is available in the C<%STATS> package variable. | ||
| 62 | |||
| 63 | =head1 HOMEPAGE | ||
| 64 | |||
| 65 | Please visit the project's homepage at L<https://metacpan.org/release/WordList-Phrase-FR-Idiom-Wiktionary>. | ||
| 66 | |||
| 67 | =head1 SOURCE | ||
| 68 | |||
| 69 | Source repository is at L<https://github.com/perlancar/perl-WordList-Phrase-FR-Idiom-Wiktionary>. | ||
| 70 | |||
| 71 | =head1 BUGS | ||
| 72 | |||
| 73 | Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=WordList-Phrase-FR-Idiom-Wiktionary> | ||
| 74 | |||
| 75 | When submitting a bug or request, please include a test-file or a | ||
| 76 | patch to an existing test-file that illustrates the bug or desired | ||
| 77 | feature. | ||
| 78 | |||
| 79 | =head1 SEE ALSO | ||
| 80 | |||
| 81 | L<https://en.wiktionary.org/wiki/Category:French_idioms> | ||
| 82 | |||
| 83 | =head1 AUTHOR | ||
| 84 | |||
| 85 | perlancar <perlancar@cpan.org> | ||
| 86 | |||
| 87 | =head1 COPYRIGHT AND LICENSE | ||
| 88 | |||
| 89 | This software is copyright (c) 2016 by perlancar@cpan.org. | ||
| 90 | |||
| 91 | This is free software; you can redistribute it and/or modify it under | ||
| 92 | the same terms as the Perl 5 programming language system itself. | ||
| 93 | |||
| 94 | =cut | ||
| 95 | |||
| 96 | __DATA__ | ||