Giter Club home page Giter Club logo

Comments (7)

peterwvj avatar peterwvj commented on August 12, 2024

Sounds good. For what it's worth, I don't use this feature. We might even want to bump the major version since this is a breaking change.

from openfoodfacts-dart.

monsieurtanuki avatar monsieurtanuki commented on August 12, 2024

Probably related: when I see product 4337185662713, I find the following data very interesting:

"categories_tags":[
"en:plant-based-foods-and-beverages",
"en:plant-based-foods",
"en:cereals-and-potatoes",
"en:breakfasts",
"en:cereals-and-their-products",
"en:breakfast-cereals",
"en:cereals-with-fruits",
"en:mueslis",
"en:mueslis-with-fruits"
]

Is it possible to use those data for a search about similar products, and how should we write the filter? (cf. openfoodfacts/smooth-app#23)

PS: I recommend the annotation @deprecated

from openfoodfacts-dart.

stephanegigandet avatar stephanegigandet commented on August 12, 2024

@monsieurtanuki : the categories_tags correspond to our multilingual and multilevel categories taxonomy. When someone adds a category, we will also all the parents categories. But that taxonomy is very complex: it can be very detailed (very fine categories), some categories have multiple parents etc. So it's a bit difficult to navigate. e.g. try to start at "Snacks" and to go down: https://world.openfoodfacts.org/category/snacks

The PNNS groups 1 and 2 are a 2 level hierarchy (it is the groups used by the French "Programme National Nutrition et Santé"). It's built on top of the categories. @PrimaelQuemerais chose it for Smoothie because the PNNS groups are relatively balanced.

from openfoodfacts-dart.

monsieurtanuki avatar monsieurtanuki commented on August 12, 2024

@stephanegigandet Oh, I don't mean to dismiss PNNS groups and use only categories_tags instead.

The idea was to keep PNNS as is, fix the query as this issue is about, and to introduce another type of search.
No navigation, just: I see a product, I would like to see similar products, I see all the categories it belongs to in categories_tags, I select the category that match the desired granularity, I click, and then I see the similar products.

from openfoodfacts-dart.

stephanegigandet avatar stephanegigandet commented on August 12, 2024

@monsieurtanuki Sorry for the late response, I didn't see your last comment. Yes, definitely, the categories_tags can be useful to find similar products. The last one is the most specific.

The query would be something like:

var parameters = <Parameter>[
        const TagFilter(
            tagType: "categories",
            contains: true,
            tagName: "en:mueslis-with-fruits"),
      ];

from openfoodfacts-dart.

monsieurtanuki avatar monsieurtanuki commented on August 12, 2024

Thank you @stephanegigandet! Cf. openfoodfacts/smooth-app#183

from openfoodfacts-dart.

monsieurtanuki avatar monsieurtanuki commented on August 12, 2024

Fixed by #181.

from openfoodfacts-dart.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.