POS tagging probability weighted method for matching the ......cayenne-pepper black-pepper...

20
Computer Systems Jožef Stefan Institute POS tagging probability weighted method for matching the Internet recipe ingredients with food composition data Tome Eftimov Barbara Koroušić Seljak {tome.eftimov, barbara.korousic}@ijs.si Computer Systems Department, Jožef Stefan Institute, Jamova cesta 39, 1000 Ljubljana, Slovenia Jožef Stefan International Postgraduate School, Jamova cesta 39, 1000 Ljubljana, Slovenia KDIR 2015 – 7 th International Conference on Knowledge Discovery and Information Retrieval

Transcript of POS tagging probability weighted method for matching the ......cayenne-pepper black-pepper...

Page 1: POS tagging probability weighted method for matching the ......cayenne-pepper black-pepper sesame-oil eggs red-onion fresh-mushrooms ground-beef chicken-broth freshly-ground-black-pepper

ComputerSystemsJožef Stefan Institute

POS tagging probability weighted method for matching the Internet recipe ingredients

with food composition data

Tome Eftimov Barbara Koroušić Seljak {tome.eftimov, barbara.korousic}@ijs.si

Computer Systems Department, Jožef Stefan Institute, Jamova cesta 39, 1000 Ljubljana, Slovenia Jožef Stefan International Postgraduate School, Jamova cesta 39, 1000 Ljubljana, Slovenia

KDIR 2015 – 7th International Conference on Knowledge Discovery and Information Retrieval

Page 2: POS tagging probability weighted method for matching the ......cayenne-pepper black-pepper sesame-oil eggs red-onion fresh-mushrooms ground-beef chicken-broth freshly-ground-black-pepper

Overview •  Motivation •  Introduction •  Related work •  Problem definition •  Evaluation and results •  Conclusion

Page 3: POS tagging probability weighted method for matching the ......cayenne-pepper black-pepper sesame-oil eggs red-onion fresh-mushrooms ground-beef chicken-broth freshly-ground-black-pepper

Motivation

Page 4: POS tagging probability weighted method for matching the ......cayenne-pepper black-pepper sesame-oil eggs red-onion fresh-mushrooms ground-beef chicken-broth freshly-ground-black-pepper

Introduction •  Food composition databases (FCDBs)

•  Internet recipes

•  Information retrieval method

Page 5: POS tagging probability weighted method for matching the ......cayenne-pepper black-pepper sesame-oil eggs red-onion fresh-mushrooms ground-beef chicken-broth freshly-ground-black-pepper

Related work •  Matching text concepts to an entry in a knowledge

base has been addressed in many ways

•  Muller et al. (2012) presented a system that automatically calculates the nutritional content of recipes sourced on Internet

•  6 human assessors manually evaluate list of ingredients for ambiguous ingredient names

•  1,515 positively classified instances to witch they added the same number of negatively classified instances

•  features extraction and penalized regression model •  91.1% of the recipes they used were matched completely

Page 6: POS tagging probability weighted method for matching the ......cayenne-pepper black-pepper sesame-oil eggs red-onion fresh-mushrooms ground-beef chicken-broth freshly-ground-black-pepper

Problem definition •  People use human language to

write the names of the used ingredients §  “salt - iodised”, “iodised salt”,

“salt, idodised”

•  Ingredient synonymy problem •  The form of the ingredient and the

cooking process

Page 7: POS tagging probability weighted method for matching the ......cayenne-pepper black-pepper sesame-oil eggs red-onion fresh-mushrooms ground-beef chicken-broth freshly-ground-black-pepper

Proposed method (1/2)

•  POS tagging (NN*,JJ*,VB*)

•  String similarity - Jaccard index

•  Laplace probability estimate

Page 8: POS tagging probability weighted method for matching the ......cayenne-pepper black-pepper sesame-oil eggs red-onion fresh-mushrooms ground-beef chicken-broth freshly-ground-black-pepper

Proposed method (2/2)

Page 9: POS tagging probability weighted method for matching the ......cayenne-pepper black-pepper sesame-oil eggs red-onion fresh-mushrooms ground-beef chicken-broth freshly-ground-black-pepper

Evaluation and results

•  Data – collection of 721 recipes written in English 1

•  1,615 different names of ingredients •  EuroFIR FCDB 2

§  food table §  ENGFDNM

•  44,033 English names of food analyses

1 http://allrecipes.com/ 2 EuroFIR – non-profit Association under the Belgian law, http://www.eurofir.org/

Page 10: POS tagging probability weighted method for matching the ......cayenne-pepper black-pepper sesame-oil eggs red-onion fresh-mushrooms ground-beef chicken-broth freshly-ground-black-pepper

Data pre-processing •  Remove punctuations

•  Convert each name in lower case letters

•  Whitespace tokenization

•  Lemmatization, only for nouns

•  Manually created rules (without skin; skinless), (with salt; salted)

Page 11: POS tagging probability weighted method for matching the ......cayenne-pepper black-pepper sesame-oil eggs red-onion fresh-mushrooms ground-beef chicken-broth freshly-ground-black-pepper

Experiment 1

Recipe FCDB Code

gibanica prekmurskagibanica RECMEM000162

omakasojinasojinaomakatamari

(izsoje) 16124

pomaranče pomaranča P0402

melonamelonacasaba

melonahoneydew91839184

Page 12: POS tagging probability weighted method for matching the ......cayenne-pepper black-pepper sesame-oil eggs red-onion fresh-mushrooms ground-beef chicken-broth freshly-ground-black-pepper

Experiment 2 (1/2)

saltgarlic

onion

ground-black-pepper

olive-oilwatervegetable-oil

soy-sauce

all-purpose-flour

pepper

garlic-powder

butter

white-sugar

brown-sugar

cheddar-cheese

cornstarch

mozzarella-cheese

worcestershire-sauce

milk

ketchup

green-bell-pepperdried-oregano

green-onions

parmesan-cheese

cayenne-pepper

black-peppereggssesame-oil

red-onion

fresh-mushrooms

ground-beef

chicken-broth

freshly-ground-black-pepper

celery

honey

lemon-juice

paprika

red-pepper-flakesskinless,-boneless-chicken-breast-halves

tomato

hot-pepper-sauce

chili-powder

egg

pork-spareribs

carrots

eggs,-beaten

lean-ground-beef

swiss-cheese

bacon

ground-cumin

onions

tomatoes

fresh-parsley

barbeque-sauce

dried-thyme

fresh-cilantro

red-bell-pepper

fresh-ginger-root

mayonnaise

sour-cream

ground-ginger

active-dry-yeast

garlic-salt

pizza-sauce

green-onion

peanut-oil

warm-water

condensed-cream-of-mushroom-soup

fresh-ginger

kosher-saltzucchini

balsamic-vinegar

crumbled-feta-cheese

mushrooms

onion-powder

tomato-sauce beef-broth

ground-nutmeg

monterey-jack-cheese

sesame-seeds

sweet-onion

cooking-spray

mushrooms,-drained

rice-vinegar

sugar

tomato-paste

broccoli-florets

carrot

condensed-cream-of-chicken-soup

egg,-beaten

fresh-rosemary

orange-juice

pepperoni

cold-water

curry-powder

dijon-mustard

dried-basil

ground-cinnamon

hamburger-bunslime-juice

oyster-sauce

red-pepperbaby-back-pork-ribs

beef-short-ribs

black-olives

butter,-melted

dried-parsley

dry-bread-crumbs

ground-turkeypork-tenderloin

cider-vinegar

dry-sherry

green-bell-pepper,-seeded

pre-baked-pizza-crust

prepared-mustard

ricotta-cheese

unbaked-pie-crust

vinegar

beer

boneless-pork-loin-roastcountry-style-pork-ribs

dry-mustard

fish-sauce

fresh-basil

heavy-cream

pastry

red-wine-vinegar

teriyaki-sauce

white-vinegar

broccoli

cooked-ham

distilled-white-vinegar

hoisin-sauce

italian-seasoning

lemon,-juiced

oil

white-wine

yellow-onion

apple-cider-vinegar

baking-powder

barbecue-sauce

bay-leaves

bread-flour

buttermilk

canola-oil

dried-rosemary

dry-onion-soup-mix

evaporated-milk

extra-virgin-olive-oil

fresh-spinach

liquid-smoke-flavoring

more

orange-zest

chicken-stock

chili-sauce

fresh-chives

fresh-lemon-juice

ground-chicken

ground-white-pepper

lettuce

low-sodium-soy-sauce

melted-butter

peanut-butter

potatoes,-peeled

romaine-lettuce

toasted-sesame-seeds

baking-soda

beef-chuck-roast

bok-choy

cabbage

coarsely-ground-black-pepper

cornmeal

cream-cheese,-softened

eggs,-lightly-beaten

fresh-thyme

ground-cloves

half-and-half

ham

margarine

prepared-yellow-mustard

provolone-cheese

red-wine

seasoned-salt

avocado---peeled,-pitted

brown-rice

celery-salt

chinese-five-spice-powder

coconut-milk

corn-tortillas

cucumber

dried-cranberries

enchilada-sauce

fresh-broccoli

garlic,-peeled

ginger

ground-coriander

heavy-whipping-creamitalian-seasoned-bread-crumbs

lemon-zest

lime,-juiced

panko-bread-crumbs

plain-yogurt

pork-baby-back-ribs

potatoes,-peeled-and-cubed

red-bell-peppers

red-potatoes

refrigerated-pizza-doughrice-wine

rice-wine-vinegar

salami

salsa

skinless,-boneless-chicken-breast

steak-sauce

sun-dried-tomatoes

white-wine-vinegar

whole-chicken

artichoke-hearts,-drained

baby-back-ribs

black-beans,-rinsed-and-drained

bulk-italian-sausage

butter,-softened

cajun-seasoning

carrots,-peeled

cauliflower

celery-seed

cooked-chicken

egg-whites

flour-tortillas

fresh-lime-juice

fresh-mint

frozen-spinach,-thawed-and-drainedgaram-masala

ground-pork

ground-turmeric

herbes-de-provence

hot-chile-paste

hot-sauce

hot-water

iceberg-lettuce

jalapeno-pepper

lemon-pepper

maple-syrup

molasses

pepperoni-sausage

pork-chops

prepared-horseradish

reduced-sodium-soy-sauce

refrigerated-crescent-rollsroma-(plum)-tomatoes

romano-cheese

sharp-cheddar-cheese

shortening

shrimp,-peeled-and-deveined

spaghetti

taco-seasoning-mix

uncooked-long-grain-white-rice

walnuts

water-chestnuts,-drained

yellow-cornmeal

applesauce

black-olives,-drained

blue-cheese,-crumbled

bread-crumbs

bulk-pork-sausage

cashews

cherry-tomatoes,-halved

chile-garlic-sauce

coarse-grain-brown-mustard

condensed-tomato-soup

cooked-white-rice

dark-soy-sauce

dried-tarragon

dry-milk-powder

dry-ranch-style-dressing-mix

egg,-lightly-beaten

eggplant

flour

fresh-asparagus

fresh-bread-crumbs

fresh-dill

frozen-bread-dough,-thawed

garbanzo-beans,-drained-and-rinsed

garlic-cloves

green-bell-peppers

ground-allspice

ground-thyme

hickory-flavored-barbeque-sauce

italian-cheese-blend

jalapeno-pepper,-seeded

lime

mexican-cheese-blend

monosodium-glutamate

oil-for-deep-frying

pecans

pineapple

pineapple,-drained

plum-sauce

pork-loin

poultry-seasoning

ranch-dressing

red-bell-pepper,-seeded

refrigerated-pizza-crust

sea-salt

seasoned-bread-crumbs

seasoning-salt

shallot

skinless,-boneless-chicken-breast-halfsteak-seasoning

tomato-juice

tomatoes-with-green-chile-peppers

tomatoes,-drained

white-pepper

whole-cloves

yellow-bell-pepper

asiago-cheese

baby-spinach-leaves

bay-leaf

bean-sprouts

beef-bouillon-granules

beef-brisket

black-beans,-drained

black-peppercorns

boneless-beef-short-ribs

boneless-chicken-breast-halves,-cooked

boneless-country-style-pork-ribs

boneless-pork-loin-chops

burgundy-wine

cherry-tomatoeschile-paste

chile-sauce

chinese-rice-wine

colby-monterey-jack-cheese

condensed-cream-of-celery-soup

crumbled-gorgonzola-cheese

cubed-cooked-chicken

cubed-cooked-ham

curry-paste

dark-sesame-oil

deep-dish-frozen-pie-crusts

dried-marjoramdry-white-wine

eggs,-well-beaten

english-muffins

fennel-seed

feta-cheese

firm-tofu,-drained-and-cubed

flank-steak

french-fried-onions

fresh

fresh-coriander

fresh-corn-kernels

fresh-curry-leaves

fresh-green-chile-peppers

frozen-green-peas,-thawed

frozen-puff-pastry,-thawed

garlic,-pressed

granulated-garlic

grapeseed-oil

green-chile-peppers

ground-lamb

ground-sirloin

hamburger-buns,toasted

heinz-tomato-ketchup

honey-mustard

italian-style-salad-dressing

kikkoman-soy-sauce

lean-ground-turkey

lemon

lettuce-leaves

light-soy-sauce

limes

marinara-sauce

mustard-powder

onions,-coarsely

parsley

peanuts

peeled-and-deveined-shrimp

pesto

pitted-kalamata-olives

pork-tenderloins

portobello-mushroom-caps

prepared-pizza-crust

prime-rib-roast

red-cabbage

roast-beef

roma-tomatoes

rubbed-sage

self-rising-flour

shallots

snap-peas

snow-peas

spaghetti-sauce

spicy-brown-mustard

spinach

sugar-snap-peastarragon-vinegar

tuna,-drainedunbaked-pie-crusts

unbaked-pizza-crust

uncooked-white-rice

vegetable-broth

white-bread

whole-wheat-bread

alfredo-sauce

american-and-cheddar-cheese-blend

american-cheese

angel-hair-pasta

apple

apple-jelly

apple-juice

as-desired

banana

basil

beef-bouillon

beef-chuck-flanken

beef-sirloin-steak

beef-stock

bell-pepper

blue-cheese

brandy

bread

brioche

brown-gravy-mix

canned-tomatoes

cannelloni-noodles

chili-oil

coconut-oil

cold-milk

cooking-oil

couscous

cream-cheese

crumbled-feta

cumin-seed

cumin-seeds

deli-ham

dried-chives

dried-dill-weed

dry-oatmeal

dry-polenta

extra-firm-tofu

firm-tofu

flaked-coconut

flounder

frozen-peasginger-paste

ice-water

instant-rice

kaiser-rolls

kale

linguine

longhorn

onion-salt

peeled-potatoes

pita-breads

porter-beer

potatoes

ranch-style-beans

rice-flour

salt,

softened-butter

tortilla-chips

yeast

almond-meal

arugula

bagel

beef-frankfurters

bell-peppers

bitter-ale

breadcrumbs

brown-ale

buds

capers

chicken

chicken-bouillon-powder

cilantro

clams

corn

corn-bread-mix

corn-oil

cumin

dark-beer

dark-rum

dill

dry-grits

dry-lentils

dry-red-wine

egg-yolk

farfalle-pasta

fennel

fine-salt

flank

fresh-basil-leaves

fresh-okra

garlic,

ginger-ale

glaze:

halibut

imitation-crab-meat

lamb-ribs

lard

leeks

onion,-halved

oregano

panko

port

radish

raisins

red root-beer

rum

sake

salsa,

sunflower-seeds

surimi

tamari

thighs*

tilapia

tuna

turnips

white-rice

whole-milk

•  We divided the matches on 4 groups

•  Perfect, Very similar, Similar and Incorrect matches

•  Perfect - 1,210 (74.92%) •  Very similar - 273 (16.90 %) •  Similar - 78 (4.84%) •  Incorrect - 54 (3.34%)

Page 13: POS tagging probability weighted method for matching the ......cayenne-pepper black-pepper sesame-oil eggs red-onion fresh-mushrooms ground-beef chicken-broth freshly-ground-black-pepper

Experiment 2 (2/2) •  Perfect matches

•  (black olives; olives, black) •  (fresh ginger; ginger, fresh)

•  Very similar matches •  (fresh cilantro; spices, coriander seed

(cilantro) ) •  (uncooked egg noodles; egg noodles)

•  Similar matches •  (dry penne pasta; pasta, without egg,

dry)

•  Incorrect matches •  (angel hair pasta; cake angelfood,

commercially prepared)

•  Perfect and very similar matches are 91.82% together

Page 14: POS tagging probability weighted method for matching the ......cayenne-pepper black-pepper sesame-oil eggs red-onion fresh-mushrooms ground-beef chicken-broth freshly-ground-black-pepper

Conclusion •  Method for matching recipe ingredients with food

composition data

•  Can be use to explore what is missing in the FCDBs

•  No need of labeled data

•  The result can be used for feature selection and then solving classification problems

Page 15: POS tagging probability weighted method for matching the ......cayenne-pepper black-pepper sesame-oil eggs red-onion fresh-mushrooms ground-beef chicken-broth freshly-ground-black-pepper

ComputerSystemsJožef Stefan Institute

Quisper Ontology Learning from Personalized Dietary Web

Services

Tome Eftimov, Barbara Koroušić Seljak, Peter Korošec {tome.eftimov, barbara.korousic,peter.korosec}@ijs.si

Paul Finglas {paul.finglas}@ifr.ac.uk

Computer Systems Department, Jožef Stefan Institute, Jamova cesta 39, 1000 Ljubljana, Slovenia Jožef Stefan International Postgraduate School, Jamova cesta 39, 1000 Ljubljana, Slovenia

Page 16: POS tagging probability weighted method for matching the ......cayenne-pepper black-pepper sesame-oil eggs red-onion fresh-mushrooms ground-beef chicken-broth freshly-ground-black-pepper

Quisper Ontology Learning

How to extract the knowledge from the data sources using different ways of describing and classifying the data ???

Page 17: POS tagging probability weighted method for matching the ......cayenne-pepper black-pepper sesame-oil eggs red-onion fresh-mushrooms ground-beef chicken-broth freshly-ground-black-pepper

Quisper Ontology Learning

How to extract the knowledge from the data sources using different ways of describing and classifying the data ???

l  Taxonomy l  Ontology

Page 18: POS tagging probability weighted method for matching the ......cayenne-pepper black-pepper sesame-oil eggs red-onion fresh-mushrooms ground-beef chicken-broth freshly-ground-black-pepper

Quisper taxonomy

Page 19: POS tagging probability weighted method for matching the ......cayenne-pepper black-pepper sesame-oil eggs red-onion fresh-mushrooms ground-beef chicken-broth freshly-ground-black-pepper

Quisper ontology

Page 20: POS tagging probability weighted method for matching the ......cayenne-pepper black-pepper sesame-oil eggs red-onion fresh-mushrooms ground-beef chicken-broth freshly-ground-black-pepper

Thank you for your attention!!!