<commit_before>package DDG::Goodie::Shortcut;
# ABSTRACT: Display keyboard shortcut for an action.

use DDG::Goodie;

triggers any => 'shortcut','keyboard shortcut', 'key combination';

zci answer_type => 'shortcut';

primary_example_queries 'windows show desktop shortcut';
secondary_example_queries 'ubuntu shortcut new folder', 'paste keyboard shortcut';
description 'keyboard shortcuts';
name 'Shortcut';
topics 'computing';
category 'computing_info';
attribution github => ['https://github.com/dariog88a','dariog88a'],
            email => [ 'mailto:<EMAIL>', 'dariog88' ],
            twitter => ['http://twitter.com/dariog88','dariog88'];

my @shortcuts = share('shortcuts.csv')->slurp(iomode => '<:encoding(UTF-8)');

handle remainder_lc => sub {
    #keep only letters and spaces (remove versioning)
    s/[^a-z ]//gi;
    #replace all OS words with starting char
    s/windows|win|xp|vista|seven|eight/W/gi;
    s/mac|os[ ]*x/M/gi;
    s/linux|ubuntu|debian|fedora|kde|gnome/L/gi;

    #get OS char (if any)
    my $search = $_;
    $search =~ /(W|M|L)/;
    my $os = $1; #save OS char
    $search =~ tr/[WML]//d; #remove all OS chars from search
    $search =~ tr/ / /s; #leave just one blank between words
    $search =~ s/^\s+|\s+$//g; #trim<commit_msg>Shortcut: Removed example from metadata.<commit_after>package DDG::Goodie::Shortcut;
# ABSTRACT: Display keyboard shortcut for an action.

use DDG::Goodie;

triggers any => 'shortcut','keyboard shortcut', 'key combination';

zci answer_type => 'shortcut';

primary_example_queries 'windows show desktop shortcut';
secondary_example_queries 'ubuntu shortcut new folder';
description 'Keyboard shortcuts';
name 'Shortcut';
topics 'computing';
category 'computing_info';
attribution github => ['https://github.com/dariog88a','dariog88a'],
            email => [ 'mailto:<EMAIL>', 'dariog88' ],
            twitter => ['http://twitter.com/dariog88','dariog88'];

my @shortcuts = share('shortcuts.csv')->slurp(iomode => '<:encoding(UTF-8)');

handle remainder_lc => sub {
    #keep only letters and spaces (remove versioning)
    s/[^a-z ]//gi;
    #replace all OS words with starting char
    s/windows|win|xp|vista|seven|eight/W/gi;
    s/mac|os[ ]*x/M/gi;
    s/linux|ubuntu|debian|fedora|kde|gnome/L/gi;

    #get OS char (if any)
    my $search = $_;
    $search =~ /(W|M|L)/;
    my $os = $1; #save OS char
    $search =~ tr/[WML]//d; #remove all OS chars from search
    $search =~ tr/ / /s; #leave just one blank between words
    $search =~ s/^\s+|\s+$//g; #trim
{'fraction_non_alphanumeric': 0.16627172195892576, 'fraction_numerical': 0.009478672985781991, 'mean_word_length': 3.9960552268244576, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 21, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, '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': '6856627', 'n_tokens_mistral': 928, 'n_tokens_neox': 872, 'n_words': 224}