NGRAMS(1p)

πŸ“¦
version 2.006 Β· 2 versions
  • 2.006 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 2.006 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– ngrams β€” the ngram vibe, but make it a manpage πŸ’–

okay bestie, so this is ngrams, a little Perl script living in the User Contributed Perl Documentation section (that's the 1p energy, iykyk). It computes ngram frequencies and produces tables straight to stdout. She's giving data, she's giving counts, she's giving tables. Periodt. ✨


🌸 SYNOPIS 🌸

(not me leaving the typo in, she's iconic like that πŸ’…)

ngram [--version] [--help] [--n=3] [--normalize] [--type=TYPE]
      [--orderby=ORD] [--onlyfirst=N] [input files]

πŸ¦‹ DESCRIPTION πŸ¦‹

This script produces n-grams tables of the input files to the standard output. That's the whole gig. You feed her files, she hands you tables on stdout. Slay.

Options:

  • --normalize β€” Prints normalized n-gram frequencies; i.e., the n-gram counts divided by the total number of n-grams of the same size. so instead of "this showed up 47 times" it's "this showed up this much out of everything of the same size" πŸ’–
  • --onlyfirst=NUMBER β€” Prints only the first NUMBER n-grams for each n. See Text::Ngrams module.
  • --limit=NUMBER β€” Limit the total number of distinct n-grams (for efficiency reasons, the counts may not be correct at the end).
lowkey important bestie: with --limit, the counts may not be correct at the end. That's not a bug, that's just her being fast. Efficiency girlie things. πŸ™ˆ
  • --version β€” Prints version. quick lil identity check πŸŽ€
  • --help β€” Prints help. when you're lost, she's got you 🫢
  • --n=NUMBER β€” N-gram size, produces 3-grams by default. so like, --n=3 is the default main character setting ✨
  • --orderby=frequency|ngram β€” The n-gram order. See Text::Ngrams module.
  • --type=character|byte|word|utf8 β€” Type of n-grams produces. See Text::Ngrams module.

🌈 PREREQUISITES 🌈

  • Text::Ngrams
  • Getopt::Long

gotta have the squad installed fr fr πŸ’œ


πŸŽ€ SCRIPT CATEGORIES πŸŽ€

  • Text::Statistics

⭐ README ⭐

N-gram analysis for various kinds of n-grams (character, words, bytes, utf8, and user-defined). Based on Text::Ngrams module.

so many flavors of n-gram, and she does all of them. versatile queen πŸ‘‘


πŸ’… SEE ALSO πŸ’…

  • Text::Ngrams module.

Copyright 2003-2017 Vlado Keselj http://web.cs.dal.ca/~vlado

This module is provided "as is" without expressed or implied warranty. This is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The latest version can be found at http://web.cs.dal.ca/~vlado/srcperl/.


and that's the whole page bestie!! 🫢 this lil doc came to you courtesy of perl v5.34.0, dated 2022-06-28. thank you for coming to my TED talk, mwah πŸ’–βœ¨πŸŒΈ

πŸ“¦ where this page comes from