Changes

Jump to navigation Jump to search
Flutter package + Smoothie
Line 1: Line 1: −
== Summary ==
+
= Summary =
 +
 
 +
To allow users to get personalized search results, mobile and web apps can use our Flutter or Javascript libraries to filter and rank products according to user preferences. The filtering and ranking is done on the client side so that user personal preferences are kept on the client.
    
Client-side libraries for personalized product filtering and ranking is the 3rd of the 4 sub-tasks of the [[Project:Personalized_Search]] funded by the NGI0 Discovery Fund managed by NlNet.
 
Client-side libraries for personalized product filtering and ranking is the 3rd of the 4 sub-tasks of the [[Project:Personalized_Search]] funded by the NGI0 Discovery Fund managed by NlNet.
   −
== Overview ==
+
= Overview =
    
[[File:Open-food-facts-personalized-search-project-overview.png]]
 
[[File:Open-food-facts-personalized-search-project-overview.png]]
Line 12: Line 14:  
# The server returns a big number of generic results
 
# The server returns a big number of generic results
 
# The app uses the user preferences stored locally to personalize the search results
 
# The app uses the user preferences stored locally to personalize the search results
 +
 +
= Personalized product filtering and ranking =
 +
 +
This section presents the general principles used to do personalized client-side product filtering and ranking.
 +
 +
Apps can implement those principles directly or use the Flutter or Javascript library.
    
== User preferences ==
 
== User preferences ==
Line 76: Line 84:  
** if requirement is important, score = score + match
 
** if requirement is important, score = score + match
   −
=== Implementation ===
+
= Flutter library / Dart package =
 +
 
 +
Flutter is a framework to create mobile apps for Android and iOS and web apps, with a single code base. Flutter applications are written in the Dart language.
 +
 
 +
The easiest way for apps to personalize Open Food Facts search results is to use the [https://pub.dev/packages/openfoodfacts openfoodfacts Dart package].
 +
 
 +
The openfoodfacts dart package has been extended to add support for the new [[Product Attributes]] created for the Personal Search project. It also contains functions to manage user preferences, and filter and rank products according to those preferences.
 +
 
 +
== Example Flutter app with personalized search results ==
 +
 
 +
[https://github.com/openfoodfacts/smooth-app Smoothie] is a new open source Flutter app that demonstrates how to use the openfoodfacts Dart package to personalize search results.
 +
Users can select their preferences, and then get personalized search results according to those preferences.
   −
* Flutter
  −
* Javascript
  −
** UI to locally save user preferences - https://github.com/openfoodfacts/openfoodfacts-server/issues/4119
  −
** Javascript library to score a product based on locally saved user preferences + product attributes from the API - https://github.com/openfoodfacts/openfoodfacts-server/issues/4120**
      
[[Category:Project:Personalized_Search]]
 
[[Category:Project:Personalized_Search]]
 
[[Category:ProductOpener]]
 
[[Category:ProductOpener]]

Navigation menu