Below are code for two different parts below: Set-Ranking (the non-learning part) required to predict rankings using the greedy algorithm and the SVM-Dyn code (learning method) for learning the rankings given training data using terms in the documents
Set-Ranking
Description: A Python-based approach used to predict both single-level and two-level dyanmic rankings given the document-intent labels. This is not the non-learning component of our approach. It uses a simple greedy algorithm to compute the rankings based on the setting and desired function. Note that the settings for the method can currently be set using the variables at the start of the code (I will shortly fix this).
The code also contains a simple toy dataset to help you get started.
SVM-Dyn
Description: A Python-based Structural SVM-based approach used to predict two-level dyanmic rankings.
Link