public class RankManager
extends java.lang.Object
Constructor and Description |
---|
RankManager()
Default Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addNewEntry(java.lang.String sourceDoc)
Register the new source document into algorithm.
|
void |
changeRanks(java.lang.String sourceDoc)
Promote the rank of the source document being viewed by the user.
|
void |
closeDebugUI()
To disable debugUI
|
java.util.ArrayList<java.lang.Integer> |
getDestinationDocumentList()
Get the list of destination documents
|
java.util.ArrayList<java.util.ArrayList<RankEntry>> |
getHighlistList()
Get the list of low list.
|
java.util.ArrayList<java.util.ArrayList<RankEntry>> |
getLowlistList()
Get the list of high list.
|
java.util.ArrayList<RankEntry> |
getRankingModel()
Method is used when require user behavior for sorting of suggestions.
|
void |
learnUserBehaviour(int lastUsedParagraph,
int lastUsedSentence,
java.lang.String sourceDoc)
Increases the score of the most recently pasted suggestion of a particular source document.
|
void |
removeAllRankData()
Remove of all entries from the algorithm.
|
void |
removeDestinationDocument(int destinationDoc)
Removes the destination document entry from the algorithm as well as removes it's high and low list
from the highlist-List and lowlist-List.
|
void |
removeRankData(java.lang.String sourceDoc)
Removal of the source document entry from the algorithm after the source document is closed.
|
void |
resetData()
For UI Testing purpose.
|
void |
setDestinationDocument(int destinationDoc)
Keep tracks of the active destination document.
|
void |
showDebugUI()
To enable the debugUI
|
void |
storeUserBehavior()
Store the data collected from the user behavior by the algorithm.
|
void |
testing_mode()
To enable testing mode for Unit testing.
|
public RankManager()
public void testing_mode()
public void addNewEntry(java.lang.String sourceDoc)
sourceDoc
- the name of the source documentpublic void changeRanks(java.lang.String sourceDoc)
sourceDoc
- the name of the source documentpublic void learnUserBehaviour(int lastUsedParagraph, int lastUsedSentence, java.lang.String sourceDoc)
lastUsedParagraph
- the position of the paragraph in the source documentlastUsedSentence
- the position of the sentence in the paragraphsourceDoc
- the name of the source documentpublic void removeRankData(java.lang.String sourceDoc)
sourceDoc
- the name of the source documentpublic void removeAllRankData()
public void storeUserBehavior()
public java.util.ArrayList<RankEntry> getRankingModel()
public void setDestinationDocument(int destinationDoc)
destinationDoc
- the ID of the destination documentpublic void removeDestinationDocument(int destinationDoc)
destinationDoc
- the ID of the destination documentpublic java.util.ArrayList<java.util.ArrayList<RankEntry>> getLowlistList()
public java.util.ArrayList<java.util.ArrayList<RankEntry>> getHighlistList()
public java.util.ArrayList<java.lang.Integer> getDestinationDocumentList()
public void showDebugUI()
public void closeDebugUI()
public void resetData()