Skip to content

Instantly share code, notes, and snippets.

@Fohlen
Fohlen / foo.sh
Created October 22, 2019 21:57 — forked from waylan/foo.sh
Simple bash subcommands. Each subcommand is implemented as a function. For example, `sub_funcname` is called for `funcname` subcommand.
#!/bin/sh
ProgName=$(basename $0)
sub_help(){
echo "Usage: $ProgName <subcommand> [options]\n"
echo "Subcommands:"
echo " bar Do bar"
echo " baz Run baz"
echo ""
@Fohlen
Fohlen / gist:38ae415f13b52d246ccb8a1d4edac607
Created January 28, 2019 17:42 — forked from ttezel/gist:4138642
Natural Language Processing Notes

#A Collection of NLP notes

##N-grams

###Calculating unigram probabilities:

P( wi ) = count ( wi ) ) / count ( total number of words )

In english..