ZeroKnots TechnologiesMuscleTiger

MuscleTiger research notes · No. 5

Food search in any language: translating queries, merging databases, and what we measured

You type “Spiegelei mit Speck” or “борщ з м’ясом” into a food diary and expect to see a product with calories and macros. The largest open food databases are mostly written in English and French, while people search in their own language, with brand names, word endings and typos. This note describes how we built the food search in MuscleTiger, what we tried, what turned out to be unnecessary, and what we measured.

TL;DR

Our food search finds the food that was meant for 92% of queries in nine languages (section 3). We search four lists at once (our own food base in English and in the user’s language, and Open Food Facts in the user’s language and in English) and merge the rankings with reciprocal rank fusion. A query in another language is translated to English first. We first used an on-device neural translator, then replaced it with a small dictionary learned from our own parallel food names with a word aligner of the IBM Model 2 family with a Bayesian prior and from the Open Food Facts taxonomies. On our test queries the dictionary reproduces the reference English translation with a word-stem F1 of 0.94 (German) and 0.96 (Ukrainian); this measures the translation of short, simple queries. With correct translations, adding the English list raises the share of Ukrainian queries with the right product in the top five by 61 points, and further languages add little. Weights of the four lists that depend on how large the language is in Open Food Facts improved German and left Ukrainian unchanged. A fallback for typing mistakes in the translator wins back about half of the 15 points that a mistake costs.

We explain the approach and the families of methods we considered.

1. The problem: a query in one language, data in several

A food search has to do three things well at once. It has to understand a short and untidy query (“chicken breast 200g”, “coca cola zero”, “мигдальне молоко”). It has to find a product that has complete and plausible nutrition values. And it has to work in the language of the person, on a phone, quickly, ideally offline.

The data we can use are uneven. Open Food Facts (OFF) [6], the open database of packaged products, holds millions of products, but the language of a product follows the country where it is sold and the habits of its contributors. Counting products by their main language (OFF, 15 November 2026), English and French lead with about 1.3 million products each, Spanish, German and Italian follow with 230 to 350 thousand, and the smaller languages we support have between 1.7 and 25 thousand (Figure 1). A query in Ukrainian can therefore be answered in Ukrainian by very few products, while a query in French meets a database that is mostly French to begin with.

Bar chart on a logarithmic scale of the number of Open Food Facts products by main language, in thousands: English 1333, French 1264, Spanish 345, German 253, Italian 233, Dutch 24.2, Polish 13.9, Romanian 12.6, Danish 3.7, Ukrainian 1.7.
Figure 1. Products in Open Food Facts by main language, thousands, logarithmic scale. The difference between the largest and the smallest language is almost three orders of magnitude. Source: the OFF search service, 15 November 2026.

Our own base

The second source is our own base of foods with complete energy and macronutrients. It is a merge of several national food composition tables, chosen because they are open, measured in laboratories and complete in macronutrients. Many of its foods carry household portions such as “1 slice”. A food is skipped when one with the same name is already in the base, and new rows are always added after the old ones, so the number of a product and its translations never change when a table is added.

When we later added three more tables, the share of test queries with the right product in the top five rose by 3 points and in first place by 2 points; neither change is significant. The gain came mostly from common dishes that the new tables describe in plain English, such as lasagna, cappuccino or Greek yoghurt. We left out one candidate table because its licence carries a share-alike condition that could extend to our merged base.

The tables are written in English or in the language of their country, so the names in the other languages had to be made. The English names are the original; the names in the other languages were produced by machine translation and in part later redone by language-model agents with automatic checks (a validator rejects an answer that changes numbers, units or the structure of the name). Numbers inside names use a decimal point in every language, in the base and in the query, so that a query with a fat percentage can prefer the product with that percentage.

2. Four lists and one ranking

The design we use is simple to state. Every query is searched in four places:

Each list returns its own ranking, and the rankings are merged by reciprocal rank fusion (RRF) [3]. A product that appears near the top of several lists beats a product that is first in one list only:

score(d)  =  ∑s ∈ {A,B,C,D}wsk+ranks(d)(1)\mathrm{score}(d) \;=\; \sum_{s\,\in\,\{A,B,C,D\}} \frac{w_s}{k + \mathrm{rank}_s(d)} \tag{1}

where ranks(d)\mathrm{rank}_s(d) is the position of product dd in list ss, wsw_s is a weight of the list and kk is a small constant that stops the first place from dominating. The method needs no scores from the lists, only their order, which matters because the lists come from different systems with incomparable scores. We chose it for exactly that reason; Cormack and colleagues report that it is competitive with more elaborate rank-learning methods in their experiments [3].

RRF is a published method, and our contribution is the measurement: which lists to include, how to translate the query, and how much to trust each list in each language.

3. How we measured

The protocol:

Accuracy of the whole search

The number in the summary comes from a test of the search exactly as it runs in the app. We wrote ten queries in each of the nine languages the app supports besides English, two of each type, 90 queries in all. Every query went through the same steps as on a phone: translation by the dictionary, our base in English and in the language of the query, Open Food Facts in both languages with the products sold in the country of that language moved forward, and the fusion with the weights of the app. We read the whole merged list of each query, about sixty results, and marked by hand the first result that a user would accept as the food they meant, with the same rules as the blind judge.

The food that was meant is foundAll queries (90)Single products (65)Dishes (25)
anywhere in the list92.2%93.8%88.0%
among the first ten90.0%90.8%88.0%
among the first five85.6%86.2%84.0%
in first place66.7%67.7%64.0%

Accuracy of the whole search. Ten queries in each of nine languages, searched as in the app. Single products are foods, packaged products and drinks; dishes include composite meals such as a cheese sandwich or oatmeal with milk.

The food that was meant is somewhere in the list for 92% of the queries, among the first ten results for 90%, among the first five for 86% and in first place for 67%. Single products are found a little more often than dishes (94% against 88% anywhere in the list). The misses are mostly brand products that no list contains, and snacks made of several foods, for which the lists offer the ingredients but not the snack itself. Ten queries per language is a small base: one query moves the result of a language by ten points, so the numbers describe the search as a whole and say little about a single language. The sections below take the search apart and measure each step on larger query sets in German and Ukrainian.

4. What a correct translation does for the search

Before we describe our attempts to build a good translator, we measured what a good translation is worth. We wrote 100 food queries in Ukrainian (20 each of everyday foods, dishes, drinks, brands and informal queries) and translated each by hand into the other nine languages, so that the translation is correct by construction. For each language we searched Open Food Facts with the query in that language and merged the lists with reciprocal rank fusion (equation 1, equal weights). The first configuration is Ukrainian alone, the second adds English, and then we added French, Spanish, German, Italian, Dutch, Polish, Romanian and Danish, in the order of how many products each language has in OFF (Figure 2). Relevance was judged blind by a language model with the rules of section 3, over the pooled top five of every configuration.

Line chart of the gain over a search in Ukrainian alone, in points, as languages are added: English, French, Spanish, German, Italian, Dutch, Polish, Romanian and Danish. Top five: +61, +61, +64, +64, +59, +59, +57, +56, +53. First place: +24, +25, +28, +30, +30, +34, +36, +35, +34.
Figure 2. One hundred Ukrainian queries with correct translations into the other languages; Open Food Facts only. Each point adds one more language to the fusion, in the order of the size of the language in OFF, and shows the gain in points over the search in Ukrainian alone.

The first step is the largest by far. Searching OFF in Ukrainian alone often finds nothing: OFF has few Ukrainian-language products (Figure 1), and for 47 of the 100 queries the Ukrainian list was empty. Adding the English translation raises the share of queries with the right product in the top five by 61 points and in first place by 24 points, with 61 queries gained and none lost.

The next languages change little. French leaves the top five unchanged (5 queries gained, 5 lost). Spanish and German add 3 more points, within noise. After that the top five falls, by 11 points from its peak with all ten languages, while first place creeps up by another 10 to 12 points. The fall from four to ten languages in the top five is significant on these queries (2 gained, 13 lost, sign test p = 0.007); the rise of first place from two to ten languages is not (20 gained, 10 lost, p = 0.10). Brands behave differently from everyday foods: with more lists a brand query is found more often (15 points more in the top five with Spanish added than with English alone), while everyday foods are found less often (25 points fewer with ten languages than with English). Twenty queries per type is a small base, so these splits are indicative.

A correct translation into English carries the effect. Each further language is another request to OFF and, past the first few, dilutes the ranking.

Dishes of another cuisine

The step to English matters most when the dish comes from another cuisine. A separate set of 100 queries, ten in each of the ten languages, named a well-known foreign dish the way a user would type it: Borschtsch for a German user, paella, pierogi, tiramisu, stroopwafel, sarmale. This is an older experiment, and the queries were translated by the neural translator the app used at the time (section 5). For the 90 non-English queries, translating the query to English raised the share with the dish in the top five by 34 points against a search of Open Food Facts in the user’s own language (47 queries gained, none lost, p < 0.001). Adding more languages after English changed nothing in the top five, even when we chose in advance the language of the country the dish comes from.

Our local base helped here: without its English list, first place fell by 8 points on these queries (7 lost, none gained, p = 0.016), because the base knows paella, ratatouille or lasagna and ranks them first. On everyday foods it showed no such benefit, but removing it did not make the search better either (section 10), so we keep it. The remaining misses were dishes that no OFF list has under any name, such as sarmale. The set has only about twenty distinct dishes, so it describes well-known dishes and says little about rare ones.

Matching mattered more than languages

The biggest single improvement of the whole study came from matching words in the local base, with no translation involved. The local base is searched with its own matching, and function words, case endings and decimal commas broke it: “soup with mushrooms” in Ukrainian returned nothing, because the matching required every word of the query to be found as typed. Weighting query words by how rare they are (IDF), a Snowball stemmer for the languages that have one and one number format improved top-5 on the standard set by about 9% since the start of the study (sign test p = 0.008), and on queries with prepositions and word forms by about 12%.

5. Why we replaced the translator

We removed ML Kit because it translates food names poorly. It is a general-purpose translator built for sentences, and a food name is a few words without context: a brand, a state of the product, a dish named after a place. Our base was first translated with it, and these are real entries (the Ukrainian and French translations, with a gloss for readers who do not speak the language):

English nameML Kit outputWhat went wrong
plain, refrigeratedрівнина, холодильна (Ukrainian)“plain” here means unflavoured, as in plain yoghurt, and was translated as “plain” the landscape; “refrigerated” became an adjective meaning “of a refrigerator”
bonelessбезкімнатний (Ukrainian)means “without rooms”; the intended meaning is “without bones”
Pad ThaiПодушка тайська (Ukrainian)the dish name was read as words: “Thai cushion”
Rice flour, brownРисова борошно, коричневий (Ukrainian)the adjectives do not agree with the noun “flour”, which is ungrammatical in Ukrainian
Meringue with chocolate; Ham salad spreadleft partly or fully untranslated (Ukrainian)the English words stay in the name
bunchignon (French)a hair bun (the hairstyle), where the bread bun was meant
sauerkrautchouchoune (French)a different word; the French word for sauerkraut is choucroute

The same weakness hits queries, where a wrong word is a missing product, and it cannot be fixed locally: you cannot correct one word in a neural model. There were two lesser reasons: the models take about 40 MB per language and the SDK is a third-party component.

The data we own point to a better tool. Our base has pairs of an English name and its name in each language, a parallel corpus in exactly the domain we need. A dictionary can be learned from such a corpus.

6. A dictionary learned by word alignment

Learning a dictionary from parallel text is the old problem of word alignment: deciding which word of one sentence corresponds to which word of the other. The classic family is the IBM models of statistical machine translation [1]. Model 1, the simplest and our starting point, treats a name in one language as generated from the words of the other, with no regard for order. For an English name e=e1…eme = e_1\ldots e_m and a name f=f1…flf = f_1\ldots f_l in another language (with an empty word added), the probability of the pair is

P(e∣f)  =  ϵ(l+1)m∏j=1m∑i=0lt(ej∣fi)(2)P(e \mid f) \;=\; \frac{\epsilon}{(l+1)^m}\prod_{j=1}^{m}\sum_{i=0}^{l} t(e_j \mid f_i) \tag{2}

and the table of word translation probabilities t(e∣f)t(e\mid f), the dictionary, is estimated by expectation–maximisation: in each round every pair of words in a name pair gets a share of the count proportional to the current probability, and the shares are normalised into new probabilities. For a short food name this is a good fit, because there is little word order to model. Its known weakness was described by Moore [2]: a rare word can take any probability that suits its single sentence, so rare words become “garbage collectors” that align to too many words. Moore proposed smoothing the counts and a better initialisation; a Bayesian prior on the translation probabilities, applied by variational inference, is another remedy [7].

What we considered and measured

We compared our aligner with its ablations, with reference implementations of two published aligners, and with a method that has no alignment model at all. Every method got the same name pairs, the same held-out 5% and the same way of turning alignments into a dictionary (a word pair counts if it is linked at least twice; each word gets its most frequent translation). Quality is the F1 of word stems between the dictionary translation of a held-out name, word by word, and its English name, averaged over nine languages (Table 1). Differences are small, so we also report in how many of the nine languages a difference is clear (95% bootstrap interval of the paired difference excludes zero).

MethodWhat it isMean F1Against ours
Dice coefficientno alignment model, each word links to the word it co-occurs with most0.812worse in 7 of 9
IBM Model 1 [1], EMword translation probabilities, no word order0.817worse in 6 of 9
Model 1 with a Dirichlet prior [7]variational Bayes on the translation probabilities0.822worse in 4 of 9
Diagonal alignment prior, EMModel 2 in the fast_align parameterisation [5], without the Bayesian prior0.822worse in 6 of 9
Oursdiagonal prior and Dirichlet prior, two directions, intersection0.825–
Ours, grow-diag-final-andthe same, links of both directions combined by the standard heuristic0.828better in 5 of 9, worse in 1
fast_align [5]the authors’ implementation, intersection / grow-diag-final-and0.826 / 0.8313 better, 2 worse / 7 better
eflomal [8]HMM with fertility, Bayesian, MCMC sampling; intersection / grow-diag-final-and0.825 / 0.8282 better, 2 worse / 7 better
SimAlign [10]multilingual BERT embeddings, no training on our names; three matching methods (best / iterative / intersection)0.824 / 0.822 / 0.8122 better, 2 worse / 1 better, 3 worse / worse in 8

Table 1. Aligners compared on held-out names of our base, nine languages. The last column counts languages where the difference to ours is clear. fast_align and eflomal are the authors’ implementations.

The bare Dice coefficient is only 0.013 behind ours, and SimAlign, which needs no training on our names, is level with ours at its best setting. On short, nearly parallel names the choice of aligner matters little, and most of the quality comes from the names themselves. Each ingredient of ours adds a little, and the real fast_align with the same intersection gives the same result (0.826 against 0.825), which is what we expect from a method with the same design. Combining the two directions with the standard grow-diag-final-and heuristic instead of the intersection helps about as much as the choice of model: between a quarter and half a point of F1 for all three. It is a small gain that is clear in most languages, and we plan to use it the next time the dictionaries are rebuilt.

Reducing words to Snowball stems before alignment lowers the F1 (0.818, worse in 6 of 9 languages), and keeping only the first four letters of each word, which Östling and Tiedemann report as a useful approximate stemming for machine translation [8], lowers it much more (0.743). The task explains the difference: Östling and Tiedemann measure translation systems built on the alignments, and we look up single words of a food name in a dictionary, where merging word forms merges different foods.

We did not run the Gibbs sampler of Mermer and Saraçlar [9] (a fully Bayesian Model 1), IBM Models 3–5, or the probabilistic structured queries of Darwish and Oard [4], which keep several translations per word. The last one is a possible next step, since our dictionary keeps only the best candidate.

What our aligner is

Our aligner is our own implementation of an IBM Model 2 in the fast_align parameterisation [5]: the probability that a word is aligned to a given position falls with the distance from the diagonal (in Model 1 it is uniform), because food names tend to keep their word order between languages. On top of that the word translation probabilities get a sparse Dirichlet prior with variational inference [7], as in fast_align, which keeps rare words from absorbing probability. The fixed constants (the probability of aligning a word to nothing, the strength of the prior and the starting steepness of the diagonal) are the ones that Dyer and colleagues report; fast_align also re-estimates the steepness during training, and we do not. It is trained in both directions, and only the links both directions agree on are kept (intersection), which raises precision at some cost in recall. Words are aligned in their exact forms with no stemming: reducing words to stems, which is usual for languages with rich word endings, lost accuracy in our first trials, so compounds and hyphenated words are handled through phrases.

The result is a dictionary in three layers that the translator applies from the longest match of up to three words: taxonomy entries, phrases aligned in our base, and single words aligned in our base. A word that is not in the dictionary, such as a brand or a misspelling, is passed through unchanged, because OFF often knows it. Each language is a file of a few hundred kilobytes, against about 40 MB per language for the neural models. It works offline and every translation can be traced to a line of the dictionary and corrected.

How good is the translation

We measure the translator in two ways. On 5% of the name pairs held out from training, translating the foreign name word by word and comparing the result with the English name by word stems gives an F1 between 0.78 and 0.90 across the nine languages. On the evaluation queries, where we wrote a reference English translation together with each query, the F1 of word stems is 0.94 for German (88 of 100 queries identical in stems) and 0.96 for Ukrainian (89 of 100).

These numbers describe the translation of short, common queries into English. The quality of the search itself is lower and is measured separately (sections 3 and 9). We did not run the old neural translator on the same queries, so we make no claim that the dictionary is better than ML Kit; it is accurate enough on these queries, small, offline and correctable.

7. The Open Food Facts taxonomies: what they give and what they cost

OFF maintains public taxonomies of ingredients and of categories: hierarchical lists in which every entry has an English name and names and synonyms in many languages, written by volunteers. They hold thousands of entries with an English name, and they are attractive for three reasons: the translations are made by people and in the food domain, they contain words that our own names never use (rare ingredients), and they are independent of the machine translation that produced our names.

The difficulties:

Training on the taxonomy: a test that could not see the effect

Our first test of adding taxonomy pairs to the alignment training showed nothing. We measured it on held-out names from our own base and on our queries, and the translation quality moved by at most a few thousandths. We nearly concluded that the taxonomy was useful only as a lookup. That test could not see the effect: both sets contain words that our base already knows, while the point of the taxonomy is to add words that it does not.

The fair test removes a tenth of the taxonomy entries from the lookup layer and from the training, builds the dictionary with and without taxonomy training, and translates the names of the removed entries. For the languages with a large taxonomy the training adds two to four points of F1 on all held-out names and four to five points on names with a word that our base lacks, with no loss on names made of known words (Figure 3). For the languages with a small taxonomy, such as Ukrainian and Romanian, nothing changes. We reversed our early recommendation, and the dictionaries in the app are built with taxonomy training.

Paired bars of the gain in F1 of word stems, in points, from taxonomy training. All held-out taxonomy names: German +3.7, Dutch +3.9, Polish +2.1, Danish +2.8. Names with a word the base lacks: German +5.2, Dutch +4.6, Polish +3.5, Danish +3.9.
Figure 3. Translation of held-out taxonomy entries (F1 of word stems against the main English name), gain in points from adding taxonomy pairs to the alignment training.

Where it can hurt. Taxonomy names are category-style, and their synonyms can displace an idiomatic phrase learned from our base (“home fries” for a fried-potato dish). On the German queries this cost about one point of F1 and nothing for Ukrainian, a price we accepted for the gain on rare words.

8. Weights of the four lists by language

In Equation (1) every list has a weight. Our first weights were the same for all languages, tuned on one query set. But the quality of the lists differs between languages. The native OFF list C is rich in French or German and thin in Ukrainian, where the English list D carries more of the load. Giving a language its own weights is a natural idea, and the question is where to get them for ten languages when we have test queries for two.

We considered two measures. The first was the share of taxonomy entries that have a name in the language. It is easy to compute, but it measures how well volunteers translated the vocabulary, which affects the dictionary, and says little about how many products carry a name in that language; its two columns even disagree with each other (Italian: 75% of ingredients and 28% of categories). We did not use it. The second was the number of OFF products per language relative to English, available from the search service (Figure 1). It is a proxy, because the main language of a product can differ from the language of a name field, and it still tracks what we need: how likely the native list is to know the product. From it we derive a weight for each language with a smooth formula, giving more weight to the native list as the language grows, and fix the values in a small look-up table in the app.

On the 200 judged German and Ukrainian queries the effect is clear for German and absent for Ukrainian (Figure 4). German MRR rises by .062 (95% bootstrap interval of the difference +.030 to +.099) and first place by 7 points, while the top five gains 3 points, which is within noise. Ukrainian MRR falls by .002, because its new weights are close to the old common ones. The German gain holds in both halves of the queries when split into odd and even ones.

Bars of the change in MRR with weights set per language against one common weight set: German +0.062, Ukrainian −0.002.
Figure 4. Change in MRR on 100 German and 100 Ukrainian queries when one weight set for all languages is replaced by weights derived from the number of OFF products per language. The constants of the formula were chosen on these same queries, so the gain is optimistic; see the limits.

The constants of the formula were set on these same queries, and the weights of the other languages follow from the formula and have not been measured.

9. Typing mistakes and word forms

The dictionary knows exact forms of words. A word with a typing mistake, or a case form it has not seen, passes through unchanged and reaches the English lists as a word that means nothing there. The search in our local base already repairs mistakes with a SymSpell index, an index of edit distance in which the number of allowed edits grows with the length of the word. The open question was the translation step, so we measured what the mistakes cost and what a fallback gives.

Step 1: mistakes and word forms, word by word

We rebuilt the dictionaries of the nine languages from our names and took, from the held-out names, the words with a known translation. Each got one random edit (a letter deleted, inserted, replaced or two neighbouring letters swapped). A lookup within the allowed edit distance returned the translation of the original word for 92.5% of the damaged words, against 0.3% for the exact lookup. If the first letter had to match, as the search in the local base can require, it fell to 77%, because mistakes on the first letter are then missed.

For word forms we took the held-out words that the dictionary does not know but whose Snowball stem equals the stem of a known word (mostly another case or number of a known word). Edit distance gave a right translation for 55% of them, a common beginning of the word for 63%, and the same stem for 69%. Case endings often change several letters, which the edit limit does not allow. The remaining unknown words (brands, rare words, numbers) are a risk: edit distance answers for a quarter of them and is right in one third of the answers. We use stems only at lookup; during training they lowered the quality (section 6).

Step 2: the fallback on the real dictionaries

The dictionaries in the app leave out words that are written the same in both languages, so such a word is “unknown” to the fallback. A plain fallback therefore changed words that were right: pizza became nicoise, pils became mushroom, the brand word Krönung became curd. On queries as written the word F1 of the translation fell by 3 points. Three guards remove most of the harm: a word that is itself an English word of the dictionary is left alone, very short words are left alone, and the allowed edit distance is kept small. The order is: exact lookup, same stem, one edit. With the guards the loss on queries as written shrinks to 1.5 points, and on queries with a mistake the F1 rises by 30 points.

Step 3: the whole search

Word F1 compares a translation with a reference, and a search has other lists that can absorb a bad translation. So we ran the whole search, as in section 3, on 200 queries (100 German and 100 Ukrainian): as written, and with one random typing mistake in a word of every query (195 queries changed). Each query was translated four ways: the correct translation (an upper bound), the dictionary as it was, the dictionary with the plain fallback, and the dictionary with the guards. The four ranked lists were merged with the weights of the app, and a language model judged blind the pooled top results.

TranslationQueries as written
first / top five, points
One mistake per query
first / top five, points
Correct (upper bound)+0.5 / −1.0+15.0 / +11.5
Dictionary, plain fallback+1.5 / +1.0+8.5 / +4.5
Dictionary, fallback with guards+2.0 / +0.5+7.5 / +4.0

Table 2. Change against the dictionary as it was, in points of the share of queries with the right product first and in the top five.

Grouped bars of the change in points against the dictionary as it was, for first place and the top five. Queries as written: correct translation +0.5 and −1, dictionary with fuzzy fallback +2 and +0.5. One typing mistake per query: correct translation +15 and +11.5, dictionary with fuzzy fallback +7.5 and +4.
Figure 5. The whole search on 200 German and Ukrainian queries, as written and with one typing mistake each: change in points against the dictionary as it was.

On queries as written the dictionary is as good as the correct translation (half a point behind at first place, a point ahead in the top five), and the fallback changes nothing that we can detect (4 queries gained and none lost at first place, p = 0.13). With a typing mistake the dictionary as it was loses 15 points at the first place; the fallback with guards wins back 7.5 of them (30 queries gained, 15 lost, p = 0.04) and 4 of the 11.5 points in the top five (11 gained, 3 lost, p = 0.06). The search that uses only the English list of Open Food Facts gains much more, 22 points at the first place, because it has no native list to fall back on. The plain fallback and the guarded one cannot be told apart in the whole search; we keep the guarded one because it changes fewer correct words. The gain differs by language: Ukrainian gains 15 points at the first place, German none, and we did not look into why.

Step 4: limits of the measurement

The mistakes are synthetic: one random edit in almost every query, far more often than people really mistype, and without the neighbouring-key mistakes of a real keyboard. Two hundred queries and one model as the judge give p-values around 0.05, so the typo result gives the direction, and the exact size needs real queries. The gain per real query is the gain above times the share of queries with a mistake, which we do not know; with the cost on correct queries at about zero, even a small share pays.

10. What did not work, or was not needed

How we use this in MuscleTiger

The food search in MuscleTiger works as described: your query goes to our own base and to Open Food Facts, in your language and in English, the query is translated by a dictionary that lives on your phone, and the four rankings are merged with weights that depend on your language. Results are shown in the interface language of the app and products sold in your country are ranked ahead of the rest. The dictionary works without a network, so a query in the gym with no signal still finds foods in our local base.

See MuscleTiger

Conclusions

Limits. The queries were written by us and judged by a language model, so the margins are wide (about ±7\pm 7 points at 200 queries). The numbers are for German and Ukrainian; the weights of the other languages are extrapolated. We did not compare against the neural translator or against other apps. The next step is a check against real user queries.

Data and licences

Product data and taxonomies come from Open Food Facts, made available under the Open Database Licence (ODbL); the dictionaries described here are derived in part from the OFF taxonomies and carry the same attribution. Our local base is built from open national food composition tables published by public authorities; their sources and licences are listed in the app. We thank the Open Food Facts contributors and the maintainers of the national tables.

Sources

  1. Brown PF, Della Pietra SA, Della Pietra VJ, Mercer RL. The mathematics of statistical machine translation: parameter estimation. Computational Linguistics 1993;19(2):263–311. ACL Anthology
  2. Moore RC. Improving IBM word-alignment Model 1. Proceedings of ACL 2004:518–525. ACL Anthology
  3. Cormack GV, Clarke CLA, Büttcher S. Reciprocal rank fusion outperforms Condorcet and individual rank learning methods. Proceedings of SIGIR 2009. doi:10.1145/1571941.1572114
  4. Darwish K, Oard DW. Probabilistic structured query methods. Proceedings of SIGIR 2003.
  5. Dyer C, Chahuneau V, Smith NA. A simple, fast, and effective reparameterization of IBM Model 2. Proceedings of NAACL-HLT 2013:644–648. ACL Anthology
  6. Open Food Facts: taxonomies of ingredients and categories and product data, world.openfoodfacts.org, under the Open Database Licence (ODbL).
  7. Riley D, Gildea D. Improving the IBM alignment models using variational Bayes. Proceedings of ACL (short papers) 2012:306–310. ACL Anthology
  8. Östling R, Tiedemann J. Efficient word alignment with Markov chain Monte Carlo. The Prague Bulletin of Mathematical Linguistics 2016;106:125–146.
  9. Mermer C, Saraçlar M. Bayesian word alignment for statistical machine translation. Proceedings of ACL (short papers) 2011:182–187. ACL Anthology
  10. Jalili Sabet M, Dufter P, Yvon F, Schütze H. SimAlign: high quality word alignments without parallel training data using static and contextualized embeddings. Findings of EMNLP 2020.