README-work
DSL::Entity::Foods
Raku grammar classes for food and drink entities (food and drink names.)
Remark: The food entity names in this package were taken from an archived GitHub repository related to IBM's Watson engine. I can no longer find that repository.
Installation
From Zef ecosystem:
zef install DSL::Entity::FoodsFrom GitHub:
zef install https://github.com/antononcube/Raku-DSL-Entity-Foods.gitExamples
use DSL::Entity::Foods;
say ToFoodEntityCode('banana split');
say ToFoodEntityCode('arizona ice tea');
say ToFoodEntityCode('high fructose corn syrup');Grammar parsing
One of the main motivations for this package is to be able to use known country names and related adjectives as grammar tokens. For example, in packages like "DSL::English::FoodPreparationWorkflows", [AAp2].
Here are few grammar parsing examples:
use DSL::Entity::Foods::Grammar;
my $pCOMMAND = DSL::Entity::Foods::Grammar.new;
$pCOMMAND.set-resources(DSL::Entity::Foods::resource-access-object());
say $pCOMMAND.parse('arizona iced tea', rule => 'food-entity-command');say $pCOMMAND.parse('fried tomatoese', rule => 'food-entity-command');References
[AAp1] Anton Antonov, DSL::Shared Raku package, (2020), GitHub/antononcube.
[AAp2] Anton Antonov, DSL::English::FoodPreparationWorkflows Raku package, (2021), GitHub/antononcube.
[AAp3] Anton Antonov, DSL::Entity::Jobs Raku package, (2021), GitHub/antononcube.