FlipText: Add "text" to the trigger word.

"flip", "mirror", "spin", and "rotate" are all very common words, and this instant answer comes up often for queries such as "flip flops". While we don't have a way of setting individual goodies with low priority (all goodies have high priority at the moment), it's important that we control the query space of each one. So in this case, adding a "text" as a requirement will prevent it from triggering on "flip flop", "back flip", etc.
master
jagtalon 2014-06-03 18:38:32 +00:00
parent 999b6aec5c
commit 19b7425488
2 changed files with 7 additions and 7 deletions

View File

@ -2,13 +2,13 @@ package DDG::Goodie::FlipText;
use DDG::Goodie;
triggers startend => "flip", "mirror", "spin", "rotate";
triggers startend => "flip text", "mirror text", "spin text", "rotate text";
zci is_cached => 1;
zci answer_type => "flip_text";
primary_example_queries 'flip my sentence';
secondary_example_queries 'mirror text';
primary_example_queries 'flip text sentence';
secondary_example_queries 'mirror text hello';
description 'flip and mirror text';
name 'FlipText';
code_url 'https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/FlipText.pm';

View File

@ -13,10 +13,10 @@ ddg_goodie_test(
[qw(
DDG::Goodie::FlipText
)],
'flip test' => test_zci("\x{0287}\x{0073}\x{01DD}\x{0287}"),
'mirror test' => test_zci("\x{0287}\x{0073}\x{01DD}\x{0287}"),
'flip my sentence' => test_zci('ǝɔuǝʇuǝs ʎɯ'),
'mirror text' => test_zci('ʇxǝʇ'),
'flip text test' => test_zci("\x{0287}\x{0073}\x{01DD}\x{0287}"),
'mirror text test' => test_zci("\x{0287}\x{0073}\x{01DD}\x{0287}"),
'flip text my sentence' => test_zci('ǝɔuǝʇuǝs ʎɯ'),
'mirror text text' => test_zci('ʇxǝʇ'),
);
done_testing;