CSC/ECE 517 Spring 2021 - E2112. Integrate Suggestion Detection Algorithm: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 9: Line 9:
==Project plan==
==Project plan==
===Problem statement===
===Problem statement===
Peer-review systems like Expertiza utilize a lot of students’ input to determine each other’s performance. At the same time, we hope students learn from the reviews they receive to improve their own performance. In order to make this happen, we would like to have everyone give quality reviews instead of generic ones. Currently we have a few classifiers that can detect useful features of review comments, such as how many suggestions they contain. The suggestion-detection algorithm has been coded as a web service, and other detection algorithms will be so coded in the future.
Peer-review systems like Expertiza utilize a lot of students’ input to determine each other’s performance. At the same time, we hope students learn from the reviews they receive to improve their own performance. In order to make this happen, we would like to have everyone give quality reviews instead of generic ones. Currently we have a few classifiers that can detect useful features of review comments, such as whether they contain suggestions. The suggestion-detection algorithm has been coded as a web service, and other detection algorithms, such as problem detection and sentiment analysis, also exist as newer web services..but they need to be integrated properly using API calls in expertiza code.
 




Line 37: Line 38:
  Sample Output: (as 'suggestion' and 'volume' as you might expect)
  Sample Output: (as 'suggestion' and 'volume' as you might expect)


{ "sentiment_score": 0.9,
{  
  "sentiment_score": 0.9,
   "sentiment_tone": "Positive",
   "sentiment_tone": "Positive",
   "suggestions": "absent",
   "suggestions": "absent",
   "suggestions_chances": 10.17,
   "suggestions_chances": 10.17,
   "text": "This is an excellent project. Keep up the great work",
   "text": "This is an excellent project. Keep up the great work",
  "total_volume": 10,
  "total_volume": 10,
  "volume_without_stopwords": 6}
  "volume_without_stopwords": 6
}




Line 50: Line 53:
===Previous work and our Plan of Action===
===Previous work and our Plan of Action===
[https://github.com/expertiza/expertiza/pull/1427 Spring 2019 pull request]
[https://github.com/expertiza/expertiza/pull/1427 Spring 2019 pull request]
* They had a functional suggestion detection API call that successfully communicated with the PeerLogic Server and retrieved the output, but as PeerLogic Server is no longer functioning, it needs to be re-deployed to new server(Peer Reviews NLP Server) and corresponding codes changes have to made.  
* They had a functional suggestion detection API call that successfully communicated with the PeerLogic Server and retrieved the output, but as PeerLogic Server is no longer functioning, we need to make an API call to the new server(Peer Reviews NLP Server) and corresponding codes changes have to made.  
* They included their API call in response_controller.rb using JavaScript, which need to be Refactored.
* They included their API call in response_controller.rb using JavaScript and Ruby, which needs to be Refactored as per Carl Colglaizer's Framework(Link: https://docs.google.com/document/d/1LunTC06SmINgrISsaYqMjaykIJT-DUkDd9V_UnvdX4M/edit?ts=5df92309).
* They were able to display the cumulative output for the reviews on a new page. They displayed all of the information returned from the endpoint. But the display was not proper nor did it record or contain the time taken for to receive back the response from the Peer Reviews NLP Server.
* They were able to display the cumulative output for the reviews on a new page. They displayed all of the information returned from the endpoint. But the display was not proper nor did it record or contain the time taken for to receive back the response from the Peer Reviews NLP Server.
* Since the code is added in the controller, testing needs to be performed too.
* The API Call and the time taken to display the information received from the call is quite long, which needs to be optimized.
* Since the new files they added are too clunky, badly named, files are too long, etc. The previous work needs to be refactored and reworked upon to have a smooth and lag-free implementation.  
* Since the code is added in the controller, which will be refactored as mentioned above points, and tests for the same needs to be written too.
* Expertiza team also has a new web service for problem detection. That needs to be integrated too.
* Since the new files they added are too clunky, badly named, files are too long (such as response_controller.rb), etc. The previous work needs to be refactored and reworked upon to have a smooth and lag-free implementation.  
* Expertiza team also has a new web service for problem detection(in a review response) and sentiment analysis. That needs to be integrated by making corresponding API calls too.




Line 66: Line 70:




=== Flowchart to Describe Plan of Action ===
=== Flowchart to Describe Plan of Action and Flow of control ===


[[FIle:Planfile.png]]
[[FIle:Planfile.png]]

Revision as of 17:55, 30 March 2021

Introduction

Team

Dr. Gehringer (mentor)

  • Harsh Kachhadia (hmkachha)
  • Parimal Mehta (pmehta3)
  • Jatin Chinchkar (jchinch)
  • Jordan Farthing (mjfarthi)

Project plan

Problem statement

Peer-review systems like Expertiza utilize a lot of students’ input to determine each other’s performance. At the same time, we hope students learn from the reviews they receive to improve their own performance. In order to make this happen, we would like to have everyone give quality reviews instead of generic ones. Currently we have a few classifiers that can detect useful features of review comments, such as whether they contain suggestions. The suggestion-detection algorithm has been coded as a web service, and other detection algorithms, such as problem detection and sentiment analysis, also exist as newer web services..but they need to be integrated properly using API calls in expertiza code.


How it will work

In order to make the API call, the response_controller.rb will be responsible for sending a JSON input to the web service. The input will contain the review comment submitted by the user in the following format:

Below is a sample input

 Sample Input:
 {
 	"reviews":[{
 		"text":"review text here",
 		"metrics":["problem","suggestion","sentiment"]
 	},{
 		"text":"another review here",
 		"metrics":["problem"]
 	},{
 		"text":"more text, maybe a large para or whatever you like",
 		"metrics":["sentiment", "suggestion"]
 	},{
 		...
 	}]
 }

Once the request is send, we expect the output to be in the following format:

Sample Output: (as 'suggestion' and 'volume' as you might expect)

{

 "sentiment_score": 0.9,
 "sentiment_tone": "Positive",
 "suggestions": "absent",
 "suggestions_chances": 10.17,
 "text": "This is an excellent project. Keep up the great work",
 "total_volume": 10,
 "volume_without_stopwords": 6

}


The output (which is a JSON) will be parsed and the suggestion metrics such as the tone and presence of suggestion will be extracted so the user will be able to view a summarized result of how well their review comments were. In addition, an average score will be computed based on the scores they received for each comment section, and the result will be presented in a colorful format to the user after they hit the submit button.

Previous work and our Plan of Action

Spring 2019 pull request

  • They had a functional suggestion detection API call that successfully communicated with the PeerLogic Server and retrieved the output, but as PeerLogic Server is no longer functioning, we need to make an API call to the new server(Peer Reviews NLP Server) and corresponding codes changes have to made.
  • They included their API call in response_controller.rb using JavaScript and Ruby, which needs to be Refactored as per Carl Colglaizer's Framework(Link: https://docs.google.com/document/d/1LunTC06SmINgrISsaYqMjaykIJT-DUkDd9V_UnvdX4M/edit?ts=5df92309).
  • They were able to display the cumulative output for the reviews on a new page. They displayed all of the information returned from the endpoint. But the display was not proper nor did it record or contain the time taken for to receive back the response from the Peer Reviews NLP Server.
  • The API Call and the time taken to display the information received from the call is quite long, which needs to be optimized.
  • Since the code is added in the controller, which will be refactored as mentioned above points, and tests for the same needs to be written too.
  • Since the new files they added are too clunky, badly named, files are too long (such as response_controller.rb), etc. The previous work needs to be refactored and reworked upon to have a smooth and lag-free implementation.
  • Expertiza team also has a new web service for problem detection(in a review response) and sentiment analysis. That needs to be integrated by making corresponding API calls too.


Here are the various endpoints for the deployment of Suggestion Detection Algorithm.


Flowchart to Describe Plan of Action and Flow of control