Copyright | (c) Pablo Couto 2014 |
---|---|
License | GPL-3 |
Maintainer | pablo@infty.in |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
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; theProfitFunction
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
- module Referees.Types
- fromCSVtoReferees :: FilePath -> IO [Entry Referee]
- fromCSVtoProposals :: FilePath -> IO [Entry Proposal]
- distributeWith :: ProfitFunction (Entry Proposal) (Entry Referee) Language -> [Entry Referee] -> Capacity -> Bounds Copies -> Maybe Language -> [Entry Proposal] -> IO (Maybe [Match])
- profitRefProp :: ProfitFunction (Entry Proposal) (Entry Referee) Language
- mkBounds :: (Num a, Ord a) => a -> a -> Maybe (Bounds a)
- whichRefereesForProposal :: Entry Proposal -> [Entry Referee] -> Maybe Language -> [Entry Referee]
- whichProposalsForReferee :: Entry Referee -> [Entry Proposal] -> Maybe Language -> [Entry Proposal]
- ppDistribution :: Maybe [Match] -> String
Documentation
module Referees.Types
Parsing
Assignment of proposals to referees
:: 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.