.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "ngrams 3pm" .TH ngrams 3pm "2022-06-28" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" ngrams \- Compute the ngram frequencies and produce tables to the stdout. .SH "SYNOPIS" .IX Header "SYNOPIS" .Vb 2 \& ngram [\-\-version] [\-\-help] [\-\-n=3] [\-\-normalize] [\-\-type=TYPE] \& [\-\-orderby=ORD] [\-\-onlyfirst=N] [input files] .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This script produces n\-grams tables of the input files to the standard output. .PP Options: .IP "\-\-normalize" 4 .IX Item "--normalize" Prints normalized n\-gram frequencies; i.e., the n\-gram counts divided by the total number of n\-grams of the same size. .IP "\-\-onlyfirst=NUMBER" 4 .IX Item "--onlyfirst=NUMBER" Prints only the first \s-1NUMBER\s0 n\-grams for each n. See Text::Ngrams module. .IP "\-\-limit=NUMBER" 4 .IX Item "--limit=NUMBER" Limit the total number of distinct n\-grams (for efficiency reasons, the counts may not be correct at the end). .IP "\-\-version" 4 .IX Item "--version" Prints version. .IP "\-\-help" 4 .IX Item "--help" Prints help. .IP "\-\-n=NUMBER" 4 .IX Item "--n=NUMBER" N\-gram size, produces 3\-grams by default. .IP "\-\-orderby=frequency|ngram" 4 .IX Item "--orderby=frequency|ngram" The n\-gram order. See Text::Ngrams module. .IP "\-\-type=character|byte|word|utf8" 4 .IX Item "--type=character|byte|word|utf8" Type of n\-grams produces. See Text::Ngrams module. .SH "PREREQUISITES" .IX Header "PREREQUISITES" Text::Ngrams, Getopt::Long .SH "SCRIPT CATEGORIES" .IX Header "SCRIPT CATEGORIES" Text::Statistics .SH "README" .IX Header "README" N\-gram analysis for various kinds of n\-grams (character, words, bytes, utf8, and user-defined). Based on Text::Ngrams module. .SH "SEE ALSO" .IX Header "SEE ALSO" Text::Ngrams module. .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright 2003\-2017 Vlado Keselj \fIhttp://web.cs.dal.ca/~vlado\fR .PP This module is provided \*(L"as is\*(R" without expressed or implied warranty. This is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .PP The latest version can be found at \fIhttp://web.cs.dal.ca/~vlado/srcperl/\fR.