Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Japanese additives parsing #8344

Open
aleene opened this issue Apr 21, 2023 · 4 comments
Open

Japanese additives parsing #8344

aleene opened this issue Apr 21, 2023 · 4 comments
Labels
🧪 additives 🇯🇵 Japan https://jp.openfoodfacts.org/ ⏰ Stale This issue hasn't seen activity in a while. You can try documenting more to unblock it.

Comments

@aleene
Copy link
Contributor

aleene commented Apr 21, 2023

What

To Reproduce

  • still looking fro a product on off

Expected behavior

  • 安息香酸(Na) should expand to sodium benzoate (https://en.wikipedia.org/wiki/Sodium_benzoate) E211
  • クエン酸(Na) to sodiumcitrates E311
  • ソルビン酸(K,Ca) to Potassium sorbate (E202) AND Calcium sorbate (E203)
  • 乳酸(Na,Ca) Sodium lactate (E325) AND calcium lactate (E327)
  • 酢酸(Na) sodium acetate (E262)
  • リン酸(Na)
  • グルタミン酸塩(K,Ca)
  • 酒石酸塩(K,Na)
  • ステアリン酸塩(Ca,Mg)
  • ステアロイル乳酸塩(Ca,Na)
  • 炭酸塩(Na,Mg)
  • リン酸塩(Na,K)
  • リン酸塩(Ca,Na)
  • リン酸塩(K)
  • リン酸塩(Na)
  • リン酸塩(Na,K)

Additional context

https://openfoodfacts.slack.com/archives/C06A7LENM/p1681928414678849

Part of

@aleene aleene added the 🐛 bug This is a bug, not a feature request. label Apr 21, 2023
@teolemon teolemon added the 🇯🇵 Japan https://jp.openfoodfacts.org/ label Apr 21, 2023
@Naruyoko
Copy link
Contributor

Naruyoko commented Apr 21, 2023

Thank you for getting this together neatly.

Combined table from the document:

Abbreviation Expanded Possible abbreviation of components Translation
安息香酸(Na) 安息香酸 AND 安息香酸ナトリウム N/A AND 安息香酸Na benzoic acid AND sodium benzoate
クエン酸(Na) クエン酸 AND クエン酸三ナトリウム N/A AND クエン酸Na citric acid AND sodium citrates
ソルビン酸(K,Ca) ソルビン酸 AND ソルビン酸カリウム AND ソルビン酸カルシウム N/A AND ソルビン酸K AND ソルビン酸Ca sorbic acid AND potassium sorbate AND calcium sorbate
乳酸(Na,Ca) 乳酸 AND 乳酸ナトリウム AND 乳酸カルシウム N/A AND 乳酸Na AND 乳酸Ca lactic acid AND sodium lactate AND calcium lactate
酢酸(Na) 酢酸 AND 酢酸ナトリウム N/A AND 酢酸Na acetic acid AND sodium acetate
リン酸(Na) リン酸 AND リン酸三ナトリウム N/A AND リン酸Na phosphoric acid AND trisodium phosphate
グルタミン酸塩(K,Ca) L-グルタミン酸カリウム AND L-グルタミン酸カルシウム グルタミン酸K AND グルタミン酸Ca monopotassium L-glutamate AND monocalcium di-L-glutamate
酒石酸塩(K,Na) DL-酒石酸水素カリウム AND DL-酒石酸ナトリウム 酒石酸K AND 酒石酸Na potassium DL-bitartrate AND disodium DL-tartrate
ステアリン酸塩(Ca,Mg) ステアリン酸カルシウム AND ステアリン酸マグネシウム ステアリン酸Ca AND ステアリン酸Mg calcium stearate AND magnesium stearate
ステアロイル乳酸塩(Ca,Na) ステアロイル乳酸カルシウム AND ステアロイル乳酸ナトリウム ステアロイル乳酸Ca AND ステアロイル乳酸Na calcium stearoyl lactylate AND sodium stearoyl lactylate
炭酸塩(Na,Mg) 炭酸ナトリウム AND 炭酸マグネシウム 炭酸Na AND 炭酸Mg sodum cabonate AND magnesium cabonate
リン酸塩(Na,K) リン酸三ナトリウム AND ピロリン酸四カリウム リン酸Na AND ピロリン酸K trisodium phosphate AND potassium pyrophosphate
リン酸塩(Ca,Na) ピロリン酸二水素カルシウム AND ピロリン酸四ナトリウム ピロリン酸Ca AND ピロリン酸Na calcium dihydrogen pyrophosphate AND sodium pyrophosphate
リン酸塩(K) ポリリン酸カリウム AND メタリン酸カリウム ポリリン酸K AND メタリン酸K potassium polyphosphate AND potassium metaphosphate
リン酸塩(Na) ピロリン酸四ナトリウム AND ポリリン酸ナトリウム ピロリン酸Na AND ポリリン酸Na sodium pyrophosphate AND sodium polyphosphate
リン酸塩(Na,K) ピロリン酸四ナトリウム メタリン酸カリウム ピロリン酸Na AND メタリン酸K sodium pyrophosphate AND potassium metaphosphate
塩化物(Ca,Mg) 塩化カルシウム AND 塩化マグネシウム 塩化Ca AND 塩化Mg calcium chloride AND magnesium chloride
酸化物(Ca,Mg) 酸化カルシウム AND 酸化マグネシウム 酸化Ca AND 酸化Mg calcium oxide AND magnesium oxide
フェロシアン化物(K,Na) フェロシアン化カリウム AND フェロシアン化ナトリウム フェロシアン化K AND フェロシアン化Na potassium ferrocyanide AND sodium ferrocyanide

Note that these are just examples and is not a comprehensive list.

@benbenben2
Copy link
Collaborator

Cases like "酢酸 (Na)" (https://jp.openfoodfacts.org/%E8%A3%BD%E5%93%81/4901820442307/%E3%83%8F%E3%83%A0%E3%82%AB%E3%83%84%E3%81%9F%E3%81%BE%E3%81%94%E3%83%89%E3%83%83%E3%82%B0-famina-bakery), having a single ingredient in parenthesis that has less than 3 characters, are ignored based on this condition in Ingredients.pm:

# put origins first because the country can be associated with the label "Made in ..."
# Skip too short entries (1 or 2 letters) to avoid false positives
elsif (length($between) >= 3) {

image

If we add 1 letter to (Na) to do (Nat):
image

@github-actions
Copy link
Contributor

This issue is stale because it has been open 90 days with no activity.

@github-actions github-actions bot added ⏰ Stale This issue hasn't seen activity in a while. You can try documenting more to unblock it. and removed ⏰ Stale This issue hasn't seen activity in a while. You can try documenting more to unblock it. labels Aug 10, 2023
Copy link
Contributor

This issue has been open 90 days with no activity. Can you give it a little love by linking it to a parent issue, adding relevant labels and projets, creating a mockup if applicable, adding code pointers from https://github.com/openfoodfacts/openfoodfacts-server/blob/main/.github/labeler.yml, giving it a priority, editing the original issue to have a more comprehensive description… Thank you very much for your contribution to 🍊 Open Food Facts

@github-actions github-actions bot added the ⏰ Stale This issue hasn't seen activity in a while. You can try documenting more to unblock it. label Dec 18, 2023
@teolemon teolemon moved this to To discuss and validate in 🍊 Open Food Facts Server issues Apr 23, 2024
@teolemon teolemon removed the 🐛 bug This is a bug, not a feature request. label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧪 additives 🇯🇵 Japan https://jp.openfoodfacts.org/ ⏰ Stale This issue hasn't seen activity in a while. You can try documenting more to unblock it.
Projects
Status: To discuss and validate
Development

No branches or pull requests

4 participants