Direct answer
A menu-allergen test should evaluate whether visible text is captured and represented faithfully; it must not certify that a dish is safe. `JNTO-ALLERGY-LABELS-01` says some restaurants and packaged foods in Japan provide allergy information but not all display it, and recommends checking in advance or asking staff directly for severe allergies. `OCR-DEDICATED-01` describes recognized text as structured blocks, lines, and elements. Together these facts support a cautious workflow: preserve the source image and literal text, translate only what is visible, mark uncertainty, and require direct confirmation for an allergy-sensitive decision. They do not establish OCR accuracy, menu coverage, or ingredient absence. Build a fixture set from menus for which use is authorized. Keep the source image, visible Japanese text reviewed by a fluent reader, intended target text, and uncertainty annotations together. Include printed text, multiple columns, vertical writing only if the selected pipeline intends to handle it, partially obscured characters, handwritten notes only if in scope, decorative fonts, small allergen notices, and items where no allergen label appears. Do not create fictional claims about what Japanese restaurants usually display. A missing label means “not observed in this image,” not “the food contains no allergen.” Separate image capture, OCR, translation, and interpretation. OCR output should be inspected as literal text and spatial regions. Translation should not silently fill characters that OCR did not recognize. A dish name or photo appearance is not evidence about hidden ingredients, preparation surfaces, cross-contact, sauces, or substitutions. A model explanation must not infer that a recipe is safe. Present the original crop beside the extracted text and translation, preserve uncertain spans, and let a reviewer correct or reject the result. If the text is unreadable or no ingredient statement is visible, the correct test outcome may be “cannot determine; ask the restaurant,” not a generated guess. Use two distinct reviewers where feasible: one checks the Japanese source transcription, and another checks the target-language translation. If a fluent reviewer is unavailable, label the fixture unverified instead of treating an automatic back-translation as ground truth. Write field-level expectations for allergen terms, negation, quantities, and preparation notes. A translated term may be understandable yet omit a negation or qualifier; therefore inspect the source and target spans, not only readability. No numerical OCR or translation score should be published without a representative, documented evaluation corpus and raw results. Test fresh captures and imported images separately. Vary orientation, focus, glare, crop, and page order as labeled conditions; do not attribute every failure to the translator. Retain the preprocessed image version and OCR output so a reviewer can determine where text disappeared. Verify that the application keeps the original available for human review, does not silently substitute guessed words, and offers an explicit retry or manual confirmation path. Test no-network execution only if that exact OCR and translation configuration is claimed to work offline; a package name or prior cached response is not evidence. The report must emphasize the safety boundary in the interface: do not rely solely on machine translation to decide whether food is safe for a person with an allergy. Check the original, ask the restaurant directly, and follow the person’s established care plan or qualified advice. The CDC Yellow Book addresses travel for people with severe allergies, while JNTO provides Japan-specific visitor guidance; neither source validates this test app. Keep the article as a quality-control plan, not medical advice or a guarantee about cuisine, restaurants, or a language pair.
A traveler checks a visible ingredient notice before asking staff
A photographed menu includes a small Japanese note and a dish description. Some characters are blurred. The person has an allergy, so a translation result alone cannot settle whether the meal is safe.
Decision
Preserve the photograph and source text, mark unreadable spans, translate only visible reviewed text, and direct the user to confirm with restaurant staff rather than infer ingredients.
Expected outcome
The test records whether text was visible and transcribed faithfully; it never outputs a safety verdict.
Evidence to collect
The claim becomes reviewable only when the following evidence is attached to the same artifact and test run:
- Reviewed Japanese menu fixtures
- Literal text and translation acceptance
- Uncertain-span rejection and escalation tests
A release claim is valid only for the recorded configuration and acceptance set. Generalization requires additional records.
Implementation workflow
- Assemble authorized menu fixtures. Collect source images with permission, a fluent-reviewed Japanese transcription, target translation, and span-level uncertainty labels. Include missing and unreadable disclosures.
- Capture OCR structure before translating. Record orientation, crop, preprocessing, text blocks/lines, and uncertain regions. Keep OCR text distinct from any dish description or model interpretation.
- Compare literal source and target spans. Check allergen terms, negation, amounts, and qualifiers against the reviewed references. Never fill an OCR gap from a picture or dish name.
- Test uncertainty and human escalation. Use obscured text, absent labels, and conflicting spans. Ensure the result can be rejected and directs confirmation to restaurant staff; no “safe” outcome is available.
- Report method and limits. List fixture scope, reviewers, pipeline revisions, network state, all failures, and missing coverage. Keep health/safety advice outside the translation result.
Keep each transition observable. A failure should identify the stage, artifact, runtime, and recovery action without logging private user content.
Acceptance criteria
- Every translated allergen-related span maps to a visible source region and a reviewed Japanese reference; unreadable or absent information remains unknown.
- The app does not infer hidden ingredients, cross-contact, or safety from dish names or images and offers direct confirmation as the next step.
- The report identifies reviewers, fixtures, OCR/translation versions, and limitations and makes no restaurant, cuisine, language, or safety guarantee.
Decision table
| Dimension | Choice or evidence | How to interpret it |
|---|---|---|
| Visible printed notice | OCR then reviewed translation | Can test faithful reading of visible spans; cannot verify kitchen practice or unseen ingredients. |
| Blurred or missing text | Mark unknown and ask staff | Preserves uncertainty instead of inventing an ingredient statement. |
| Dish photo or name only | No allergen inference | Appearance and dish labels do not establish ingredients or cross-contact. |
Failure patterns to prevent
- Inferring hidden ingredients from a dish name
- Treating translation as medical assurance
Also prevent silent fallback, unpinned artifacts, missing cancellation, and conclusions that combine unlike configurations. Store unsuccessful runs alongside successful ones.
Minimum reproducibility record
| Layer | Record |
|---|---|
| Device | Manufacturer, model, chipset, RAM class, operating-system build |
| Software | Application version and git commit |
| Model | Family, variant, revision, format, file length, hash, quantization |
| Runtime | Name, revision, requested backend, observed backend evidence |
| Workload | Fixture revision, input hash, prompt hash, output policy |
| Outcome | Completed, failed, cancelled, fallback, and privacy-safe diagnostics |
Release checklist
- ☐ The primary query is answered without an unsupported number.
- ☐ Every artifact and runtime is pinned.
- ☐ The representative task and failure policy are explicit.
- ☐ Lifecycle, cancellation, cleanup, and fallback are tested.
- ☐ User-content and network boundaries are documented.
- ☐ Result wording applies only to the recorded configuration.
- ☐ The page links to raw method or evidence when results are added.
Sources and related evidence
- ML Kit text recognition
- Cove benchmark method
- CDC Yellow Book: Severely Allergic Travelers
- Japan National Tourism Organization allergy guidance
- Google ML Kit text recognition
Chinese deployment and troubleshooting content is organized in the .奇连 AI 端侧专题.
Frequently asked questions
Can translated menu text prove a dish is allergy-safe?
No. Translation only represents visible language. Ingredients, preparation, cross-contact, and missing notices require direct confirmation; do not use the test as a safety certification.
Should the model guess a blurred allergen word from the dish name?
No. Preserve the original image and mark the span unknown. A plausible guess can change meaning and must not be presented as observed menu text.
What if no allergen statement appears on the menu?
Record that no statement was observed in the tested image and direct the user to ask staff. Absence of visible text is not evidence that a dish contains no allergen.