Coder Social home page Coder Social logo

productrecommendation's Introduction

This project is a demonstration for using Walmart Labs Open API to retrieve recommended products. 
Specifically, it fulfills following four functionalities: 
1. Search for products based upon a user-provided search string
2. Use the first item in the search response as input for a product recommendation search
3. Retrieve reviews of the first 10 product recommendations
4. Rank order the recommended products based upon the review sentiments

============================================================================================
A. Requirement: 
1. Java 1.7 
2. Maven 3.0.5 
   In case you don't have Maven, please refer to https://maven.apache.org/ for the installation
3. Ubuntu 14.04 (Optional)

============================================================================================
B. Build & Run 
To build this application, please type the following commands: 
1. git clone [email protected]:xzou2/ProductRecommendation.git ProductionRecommendation
2. cd ProductionRecommendation
3. mvn package 

The `mvn package` command compiles project, runs all unit tests and produces an executable jar file (ProductRecommendation-0.0.1-SNAPSHOT-jar-with-dependencies.jar), 
which is under target folder. 
If you only want to run compilation or the unit tests, please run the command  "mvn compile" or "mvn test"
Note that it requires the internet connection in order to pass all unit tests since these tests send the real http requests.
To run the application, just type: 
java -jar target/ProductRecommendation-0.0.1-SNAPSHOT-jar-with-dependencies.jar [search keywords]
For example,
java -jar target/ProductRecommendation-0.0.1-SNAPSHOT-jar-with-dependencies.jar ipod
or
java -jar target/ProductRecommendation-0.0.1-SNAPSHOT-jar-with-dependencies.jar convertible car seat 
Here, "ipod" and "convertible car seat" are search keywords.

============================================================================================
C. Input & Output:
As suggested in the requirement document, this application does not need user interfaces. 
So, I use a very simple interface, (i.e, command line), to interact with users.
As shown in above, a user's search keywords are input through command line.
To keep the consistency, I design the output is relatively straightforward. 
The recommended products are simply printed on the console. 

============================================================================================
D. Logging: 
The logging used in this application is from the JDK. 
The default log configuration is as follows: 
 logs with level from INFO up to SEVERE level are printed on the console and logs with level from FINE to SEVERAL level is output to app.log file. 
If you want to know the detailed log configure, please refer to the log configure file which is under the root directory of the ProductRecommendation-0.0.1-SNAPSHOT-jar-with-dependencies.jar.
In addition, if you want to use your own log configure file, you can run the command with the -D option
java -Djava.util.logging.config.file=[path to your own log configure file] -jar target/ProductRecommendation-0.0.1-SNAPSHOT-jar-with-dependencies.jar [search keywords] 

============================================================================================
E. Sample building output & running output:
please refer to the samples/sample-build-output.txt file for the sample output and the samples/sample-running-output.txt file for the sample running output. 
In case, there are difficulties in building the executable files. 
I have put an executable ProductRecommendation-0.0.1-SNAPSHOT-jar-with-dependencies.jar under samples folder

============================================================================================
F. Solution Overview 
Please refer to the solution-overview/solution-overview.pdf for the details. 
Note that the figures in the pdf might not be clear, I also put these original figures in the solution-overview folder.

productrecommendation's People

Contributors

xzou2 avatar

Watchers

 avatar

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.