background: This recommendation system is based on a hardware product-Wang Xiaobao table card. Guests press the order button, sweep the code into the ordering interface, and then start to order their favorite dishes, on the phone side to order. At present, there are nearly 200 cooperative catering businesses in Chengdu.
Recommended menu Features:
When guests use a table at a merchant to take a à la carte menu and pick up the main material that the guest ordered, the next time the guest orders a meal at another merchant using the table, the customer is recommended to the merchant for the main material.
such as: A guest in a shop point [spicy chicken Claw], then the guests like ingredients for "chicken Claw", when guests come to B shop, you can recommend B store corresponding to the [two Niang chicken Claw].
I. Vegetable main material extraction
The name of the dish on the table is entered by the merchant and deposited into the table database, and the current name of the dish is about 20,000.
First step: Collect the name of the dish
Export the name of the dish from the database.
Step two: participle & word frequency statistics
You can use the open source word breaker, which is used in this example.
.
Step three: Manual selection of main material
The higher the frequency of the main material, in the name of the dish appears more frequently, the more valuable screening; words with a word frequency of 1 can be used without screening, because even the main material, there is no other dish can be recommended.
Fourth step: matching the main material algorithm
The specific algorithm can be determined by the business scenario itself, the result of the match is as follows, the "= =" to the left is the main material, the right side is the match to the name of the dish.
Two. Data structure
In this system, the relationship between "man-store-dish-main material" is involved, in order to make the structure of the relationship simple, the neo4j graph database is introduced, and the relationship is as follows in the graph database.
When the guest comes to the shop, it is recommended to the guests that the store can match his favorite dishes, according to the weight of the order of preference.
Three. System architecture
Implementation of Dish recommendation system using NEO4J and simple word segmentation algorithm