<commit_before>package DDG::Goodie::Dessert;

use DDG::Goodie;
use utf8;

zci answer_type => 'dessert';
zci is_cached => 0;

primary_example_queries 'a dessert that starts with the letter a';
secondary_example_queries 'dessert that begins with the letter z';
description 'Returns a dessert given a letter.';
name 'Dessert';
code_url 'https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/Dessert.pm';
category 'food';
topics 'food_and_drink', 'special_interest';
attribution github => ['https://github.com/kennydude', 'kennydude'];
source 'http://food.sulekha.com/dishes/course/desserts/alphabets/a.htm';

triggers start => 'dessert', 'desserts', 'a dessert';

# Returns HTML version of our dessert.
sub to_html {
    my $dessert_name = shift;
    my $dessert_link = $dessert_name;
    $dessert_link =~ s/\s/+/g;

    return "<a href='http://duckduckgo.com/?q=$dessert_link+recipe'>" . $dessert_name . "</a>";
}

# This function picks a dessert from our lists.
sub itemify {<commit_msg>Dessert: Add comments.<commit_after>package DDG::Goodie::Dessert;

use DDG::Goodie;
use utf8;
use warnings;
use strict;

zci answer_type => 'dessert';
# We add is_cached so that we get different results for the same query.
zci is_cached => 0;

# Metadata for our instant answer.
primary_example_queries 'a dessert that starts with the letter a';
secondary_example_queries 'dessert that begins with the letter z';
description 'Returns a dessert given a letter.';
name 'Dessert';
code_url 'https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/Dessert.pm';
category 'food';
topics 'food_and_drink', 'special_interest';
attribution github => ['https://github.com/kennydude', 'kennydude'];
source 'http://food.sulekha.com/dishes/course/desserts/alphabets/a.htm';

triggers start => 'dessert', 'desserts', 'a dessert';

# Returns HTML version of our dessert.
sub to_html {
    my $dessert_name = shift;
    my $dessert_link = $dessert_name;
    $dessert_link =~ s/\s/+/g;

    return "<a href='http://duckduckgo.com/?q=$dessert_link+recipe'>" . $dessert_name . "</a>";
}

# This function picks a dessert from our lists.
sub itemify {
{'fraction_non_alphanumeric': 0.13955637707948243, 'fraction_numerical': 0.0018484288354898336, 'mean_word_length': 5.013888888888889, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, 'https://': 4, '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': '7454668', 'n_tokens_mistral': 783, 'n_tokens_neox': 758, 'n_words': 200}