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

taxonomy: Lithuanian ingredients + processing #9148

Merged
merged 14 commits into from
Oct 24, 2023
Merged

taxonomy: Lithuanian ingredients + processing #9148

merged 14 commits into from
Oct 24, 2023

Conversation

DanieliusAsm
Copy link
Contributor

What

Retrying because large conflicts in #9075

Plus adding ingredients_processing

@sweep-ai
Copy link

sweep-ai bot commented Oct 13, 2023

Apply Sweep Rules to your PR?

  • Apply: Leftover TODOs in the code should be handled.
  • Apply: All new business logic should have corresponding unit tests in the tests/ directory.
  • Apply: Any clearly inefficient or repeated code should be optimized or refactored.

@github-actions github-actions bot added 🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies 🥗 Ingredients labels Oct 13, 2023
@codecov-commenter
Copy link

codecov-commenter commented Oct 13, 2023

Codecov Report

Merging #9148 (91738b6) into main (118f9b9) will increase coverage by 0.00%.
Report is 3 commits behind head on main.
The diff coverage is 70.83%.

@@           Coverage Diff           @@
##             main    #9148   +/-   ##
=======================================
  Coverage   47.98%   47.98%           
=======================================
  Files          64       64           
  Lines       20068    20084   +16     
  Branches     4870     4875    +5     
=======================================
+ Hits         9629     9638    +9     
- Misses       9185     9188    +3     
- Partials     1254     1258    +4     
Files Coverage Δ
lib/ProductOpener/FoodGroups.pm 67.92% <100.00%> (ø)
lib/ProductOpener/Ingredients.pm 92.44% <ø> (ø)
lib/ProductOpener/Tags.pm 41.64% <100.00%> (+0.03%) ⬆️
lib/ProductOpener/Food.pm 70.83% <66.66%> (-0.09%) ⬇️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -13774,7 +13780,7 @@ kk:Крахмал
ko:녹말
la:Amylum
li:Zètmael
lt:Krakmolas
lt:Krakmolas, tirštiklis krakmolas
Copy link
Collaborator

@benbenben2 benbenben2 Oct 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it synonym of Krakmolas or could it be synonym of "Modifikuotas krakmolas" in additives.txt?

Copy link
Contributor Author

@DanieliusAsm DanieliusAsm Oct 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tirštiklis means thickener. In one of the product's ingredients it was listed "tirštiklis krakmolas". "tirštiklis" should probably be somewhere else not sure where.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

me neither. Let's leave it in ingredients.txt for now.

@benbenben2
Copy link
Collaborator

For "lt:regeneruotas nugriebtas pienas", you can
1/ add "lt:regeneruotas" under "en:reconstituted" in ingredients_processing.txt
2/ make sure that "nugriebtas pienas" is in ingredients.txt (this is the case, under "en:skimmed milk") and
3/ add "lt" in the processing parsing in Ingredients.pm (this is under "# Try to remove ingredients processing "cooked rice" -> "rice", you have 3 possibilities:

  • a) # match before or after the ingredient, require a space,
  • b) # match before or after the ingredient, does not require a space,
  • c) # match after the ingredient, does not require a space + # match before the ingredient, require a space,

I think "lt" would be a)

"en:watermelon juice" , "lt:arbūzų sulčių koncentratas" would not be needed after these feat

It will be a benefit for you because not only "arbūzų sulčių koncentratas", for example will be recognized but all ingredients like "something sulčių koncentratas" as long as "something" is in the taxonomy already.

@DanieliusAsm DanieliusAsm requested a review from a team as a code owner October 15, 2023 09:01
@github-actions github-actions bot added the 🥗🔍 Ingredients analysis https://wiki.openfoodfacts.org/Ingredients_Extraction_and_Analysis label Oct 15, 2023
@DanieliusAsm
Copy link
Contributor Author

@benbenben2

  1. Done
  2. Already is
  3. I think I added it (First time in Ingredients.pm) not sure if thats it.

Shouldn't then "arbūzų" be also in ingredients_processing just like with reconstituted example ? and then "sulčių koncentratas" in ingredients.txt ? But then I need to add all kinds of possibilities for juice concentrates: Banana, orange, apple etc.

Or does it work if I have in ingredients.txt: "en:watermelon" and "en:concentrated juice" defined ?

@@ -4034,6 +4035,7 @@ fr:lait écrémé réhydraté
# hr:rekonstituirano obrano mlijeko # see ingredients_processing.txt
hu:visszaállított sovány tej, feloldott sovány tej
it:latte scremato reidratato
lt:regeneruotas nugriebtas pienas
Copy link
Collaborator

@benbenben2 benbenben2 Oct 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because there is "nugriebtas pienas" in ingredients.txt and "regeneruotas" in ingredients_processing.txt, this line becomes useless. We can keep it as comment, to help find ingredients with processing in ingredients.txt for when we will tackle more languages for processing.

Suggested change
lt:regeneruotas nugriebtas pienas
# lt:regeneruotas nugriebtas pienas # see ingredients_processing.txt

@benbenben2
Copy link
Collaborator

Shouldn't then "arbūzų" be also in ingredients_processing just like with reconstituted example ? and then "sulčių koncentratas" in ingredients.txt ? But then I need to add all kinds of possibilities for juice concentrates: Banana, orange, apple etc.

Or does it work if I have in ingredients.txt: "en:watermelon" and "en:concentrated juice" defined ?

It works if you have in ingredients.txt: "en:watermelon" and in ingredients_processing.txt "en:concentrated juice" defined.

@benbenben2
Copy link
Collaborator

For the failing tests, you have to run "make lint" locally.

@github-actions github-actions bot added the 💥 Merge Conflicts 💥 Merge Conflicts label Oct 16, 2023
@alexgarel
Copy link
Member

I added the lint commit and resolved conflict.

@benbenben2 is this ready to merge (if tests pass ?)

@sonarcloud
Copy link

sonarcloud bot commented Oct 19, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@github-actions github-actions bot removed the 💥 Merge Conflicts 💥 Merge Conflicts label Oct 19, 2023
Copy link
Collaborator

@benbenben2 benbenben2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job @DanieliusAsm!

@benbenben2
Copy link
Collaborator

Thanks @alexgarel

@benbenben2 benbenben2 merged commit 076c754 into openfoodfacts:main Oct 24, 2023
13 checks passed
@DanieliusAsm DanieliusAsm deleted the lt-ingredients3 branch October 28, 2023 18:39
@teolemon teolemon added the 🇱🇹 Lithuania https://lt.openfoodfacts.org/ label Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
categories 🥗🔍 Ingredients analysis https://wiki.openfoodfacts.org/Ingredients_Extraction_and_Analysis 🥗 Ingredients labels 🇱🇹 Lithuania https://lt.openfoodfacts.org/ 🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants