<commit_before># emoji plugin
#
# Makes emoji support available within ZSH
#
# This plugin provides support for working with emoji characters in zsh using human-readable
# identifiers. It provides global variables which map emoji names to the actual
# characters, and some anmed groupings of emoji. It also provides associated functions 
# for displaying them.
#
# Global variables:
#   $emoji          - Maps emoji names to characters
#   $emoji2         - Auxiliary and combining characters
#   $emoji_flags    - Maps country names to flag characters (using region-indicators)
#   $emoji_skintone - Skin tone modifiers (from Unicode 8.0)
#   $emoji_groups   - Named groups of emoji. Keys are group names; values are whitespace-separated 
#                       lists of character names
#
# Functions:
#   random_emoji   - Prints a random emoji character
#   display_emoji  - Displays emoji, along with their names
#
# The emoji names and codes are sourced from Unicode Technical Report #51, which provides
# information on emoji support in Unicode. It can be found at http://www.unicode.org/reports/tr51/index.html.
#
# The group definitions are added by this OMZ plugin. They are not based on external definitions.
#
# The emoji in the main $emoji map are standalone character sequences which can all be output on their
# own, without worrying about combining effects. The values may actually be multi-code-point sequences, 
# instead of a single code point, and may include combining characters in those sequences. But they're
# arranged so their effects do not extend beyond that sequence.
#
# Usage and Examples:
#
# To output a specific emoji, use:
#    $> echo $emoji[<name>]
# E.g.: 
#    $> echo $emoji[mouse_face]
#
# To output a random emoji, use:
#    $> random_emoji
# To output a random emoji from a particular group, use:
#    $> random_emoji <group>
# E.g.:
#    $> random_emoji fruits
#    $> random_emoji animals
#    $> random_emoji vehicles
#    $> random_emoji faces
# The valid group names can be found with `echo ${(k)emoji_groups}`
#
# To list all available emoji with their names, use:
#    $> display_emoji
#    $> display_emoji fruits
#    $> display_emoji animals
#    $> display_emoji vehicles
#    $> display_emoji faces
#
# To use emoji in a prompt:
#    PROMPT="$emoji[penguin]  > ""
#    PROMPT='$(random_emoji fruits)  > '
#    surfer=$emoji[surfer]
#    PROMPT="$surfer  > "
#
#
# TODO: Move doco to a README
# TODO: Factor out parsing from generation in update_emoji.pl
# TODO: Incorporate CLDR data for ordering and groupings
# TODO: Short :bracket: style names (from gemoji)
# TODO: Country codes for flags
# TODO: ZWJ combining function?

_omz_emoji_plugin_dir="${0:h}"

() {

local LC_ALL=en_US.UTF-8

typeset -gAH emoji_groups
typeset -gAH emoji_con
typeset -gAH emoji2
typeset -gAH emoji_skintone

source "$_omz_emoji_plugin_dir/emoji-char-definitions.zsh"
unset _omz_emoji_plugin_dir

# These additional emoji are not in the definition file, but are useful in conjunction with it

# This is a combinin character that can be placed after any other character to surround
# it in a "keycap" symbol.
# The digits 0-9 are already in the emoji table as keycap_digit_<N>, keycap_ten, etc. 
# It's unclear whether this should be in the $emoji array, because those characters are all ones
# which can be displayed on their own.
#emoji[combining_enclosing_keycap]="\U20E3"

emoji[regional_indicator_symbol_letter_d_regional_indicator_symbol_letter_e]=$'\xF0\x9F\x87\xA9\xF0\x9F\x87\xAA'
emoji[regional_indicator_symbol_letter_g_regional_indicator_symbol_letter_b]=$'\xF0\x9F\x87\xAC\xF0\x9F\x87\xA7'<commit_msg>Remove redundant comments from the .zsh file (since they're in README now).<commit_after># emoji plugin
#
# Makes emoji support available within ZSH
#
# See the README for documentation.

_omz_emoji_plugin_dir="${0:h}"

() {

local LC_ALL=en_US.UTF-8

typeset -gAH emoji_groups
typeset -gAH emoji_con
typeset -gAH emoji2
typeset -gAH emoji_skintone

source "$_omz_emoji_plugin_dir/emoji-char-definitions.zsh"
unset _omz_emoji_plugin_dir

# These additional emoji are not in the definition file, but are useful in conjunction with it

# This is a combinin character that can be placed after any other character to surround
# it in a "keycap" symbol.
# The digits 0-9 are already in the emoji table as keycap_digit_<N>, keycap_ten, etc. 
# It's unclear whether this should be in the $emoji array, because those characters are all ones
# which can be displayed on their own.
#emoji[combining_enclosing_keycap]="\U20E3"

emoji[regional_indicator_symbol_letter_d_regional_indicator_symbol_letter_e]=$'\xF0\x9F\x87\xA9\xF0\x9F\x87\xAA'
emoji[regional_indicator_symbol_letter_g_regional_indicator_symbol_letter_b]=$'\xF0\x9F\x87\xAC\xF0\x9F\x87\xA7'
{'fraction_non_alphanumeric': 0.08208020050125313, 'fraction_numerical': 0.012322472848788638, 'mean_word_length': 4.374859708193042, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6118228', 'n_tokens_mistral': 1630, 'n_tokens_neox': 1596, 'n_words': 538}