Referees-0.0.0: A utility for computing distributions of material to review among reviewers.

Copyright(c) Pablo Couto 2014
LicenseGPL-3
Maintainerpablo@infty.in
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Referees

Contents

Description

Utility for computing distributions of material to review among reviewers.

Example of use:

  • First, load the CSV files representing referees and proposals:
>>> referees <- fromCSVtoReferees "referees.csv"
>>> proposals <- fromCSVtoProposals "proposals.csv"

Each line in these files obeys the following format:

Name,Capacity,Language;…;Language,Area,Subarea;…;Subarea

Area and Subarea fields can be empty but they must be present. Capacity and Language fields are optional. If only one of them is included, the parser will detect which one on the basis of whether it contains digits.

If there are many areas (and corresponding subareas) for some Name, these go in different lines, as in the following example:

RefereeA,3,Spanish,Metaphysics,Identity
RefereeA,Greek,Aesthetics
RefereeB,1,PoliticalPhilosophy,State;Justice
RefereeC,Catalan,PhilosophyOfMind,Perception
  • Then, use the distributeWith function; the ProfitFunction used in the example is provided by the library:
>>> let Just bnds = mkBounds 1 3
>>> match <- distributeWith profitRefProp referees 3 bnds (Just "Greek") proposals

Now you can pretty print the outcome:

>>> putStr $ ppDistribution match

Synopsis

Documentation

Parsing

fromCSVtoReferees :: FilePath -> IO [Entry Referee] Source

Parses from a CSV file into Entry Referee values.

fromCSVtoProposals :: FilePath -> IO [Entry Proposal] Source

Parses from a CSV file into Entry Proposal values.

Assignment of proposals to referees

distributeWith Source

Arguments

:: ProfitFunction (Entry Proposal) (Entry Referee) Language 
-> [Entry Referee]

Referees among which to distribute

-> Capacity

Default capacity for referees, if none declared

-> Bounds Copies

Min and max number of copies to distribute

-> Maybe Language

Optional shared language between referees and proposals

-> [Entry Proposal]

Proposals to distribute

-> IO (Maybe [Match]) 

distributeWith computes a distribution of proposals among referees, according to the given parameters.

profitRefProp :: ProfitFunction (Entry Proposal) (Entry Referee) Language Source

Computes the profit for an assignment between the given Entry Proposal and Entry Referee. The scale is continuous in [0,2]. Takes understood languages into account.

mkBounds Source

Arguments

:: (Num a, Ord a) 
=> a

Lower bound

-> a

Upper bound

-> Maybe (Bounds a) 

This function creates a (Maybe) Bounds value, holding both lower and upper bounds for an interval, after verifying that they are consistent.

Querying

whichRefereesForProposal Source

Arguments

:: Entry Proposal 
-> [Entry Referee] 
-> Maybe Language

Optional shared language between the proposal and referees

-> [Entry Referee] 

Provides a list of all Referees suited for a Proposal, regardless of any distribution.

whichProposalsForReferee Source

Arguments

:: Entry Referee 
-> [Entry Proposal] 
-> Maybe Language

Optional shared language between the referee and proposals

-> [Entry Proposal] 

Provides a list of all Proposals suited for a Referee, regardless of any distribution.

Pretty printing

ppDistribution :: Maybe [Match] -> String Source

Concise printing of assignments. Ignores Entry Referees for which there are no assigned Entry Proposals.