README.md 3 KB
Newer Older
Dominique Merle's avatar
Dominique Merle committed
1
2
# Majority Judgment Polling

3
4
5
6
> Requires `Python 3.*`.

## Usage

7
8
Download the source files.  (or just `limaju.py`)

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
    cd limaju

### Via STDIN

    cat examples/judgments_01.csv | ./limaju.py

### Via argument

    ./limaju.py --input examples/judgments_01.csv

### With custom mentions

    ./limaju.py \
        --input examples/judgments_02.csv \
        --mentions examples/mentions_02 \
        --skip-cols 1
Dominique Merle's avatar
Dominique Merle committed
25
26
27
28


## Mentions

29
30
31
32
33
34
35
36
37
38
39
Mentions are ordered.  Topmost wins.  Case matters.

### Defaults

    EXCELLENT
    VERY GOOD
    GOOD
    SOMEWHAT GOOD
    PASSABLE
    POOR
    REJECT
Dominique Merle's avatar
Dominique Merle committed
40
41


42
## Judgments Data Example
Dominique Merle's avatar
Dominique Merle committed
43
44
45

### As CSV

46
47
48
49
50
#### judgments.csv

Quotes (`"`) are optional,
if you don't put commas or quotes in your candidates or mentions.  _(best not)_

Dominique Merle's avatar
Dominique Merle committed
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
```csv
"Tyrant","Capitalist","Ecologist","Communist","Preacher","Random"
POOR,REJECT,VERY GOOD,VERY GOOD,PASSABLE,EXCELLENT
VERY GOOD,REJECT,POOR,REJECT,POOR,POOR
POOR,REJECT,SOMEWHAT GOOD,POOR,GOOD,REJECT
REJECT,EXCELLENT,VERY GOOD,PASSABLE,VERY GOOD,EXCELLENT
EXCELLENT,EXCELLENT,VERY GOOD,GOOD,REJECT,PASSABLE
REJECT,EXCELLENT,SOMEWHAT GOOD,GOOD,SOMEWHAT GOOD,GOOD
EXCELLENT,SOMEWHAT GOOD,EXCELLENT,VERY GOOD,SOMEWHAT GOOD,REJECT
GOOD,GOOD,GOOD,POOR,REJECT,PASSABLE
POOR,REJECT,REJECT,REJECT,POOR,VERY GOOD
EXCELLENT,VERY GOOD,PASSABLE,GOOD,EXCELLENT,REJECT
PASSABLE,POOR,REJECT,REJECT,PASSABLE,POOR
GOOD,GOOD,REJECT,EXCELLENT,EXCELLENT,VERY GOOD
POOR,VERY GOOD,GOOD,REJECT,VERY GOOD,PASSABLE
VERY GOOD,POOR,PASSABLE,SOMEWHAT GOOD,REJECT,VERY GOOD
GOOD,POOR,SOMEWHAT GOOD,GOOD,VERY GOOD,POOR
PASSABLE,EXCELLENT,REJECT,POOR,GOOD,REJECT
EXCELLENT,REJECT,POOR,EXCELLENT,GOOD,EXCELLENT
SOMEWHAT GOOD,SOMEWHAT GOOD,REJECT,EXCELLENT,SOMEWHAT GOOD,REJECT
PASSABLE,GOOD,REJECT,SOMEWHAT GOOD,PASSABLE,GOOD
VERY GOOD,POOR,VERY GOOD,VERY GOOD,VERY GOOD,EXCELLENT
GOOD,POOR,EXCELLENT,VERY GOOD,REJECT,PASSABLE
POOR,REJECT,POOR,SOMEWHAT GOOD,VERY GOOD,VERY GOOD
GOOD,EXCELLENT,VERY GOOD,SOMEWHAT GOOD,REJECT,EXCELLENT
EXCELLENT,POOR,PASSABLE,REJECT,GOOD,SOMEWHAT GOOD
POOR,GOOD,REJECT,REJECT,GOOD,REJECT
GOOD,VERY GOOD,VERY GOOD,SOMEWHAT GOOD,SOMEWHAT GOOD,EXCELLENT
POOR,EXCELLENT,POOR,REJECT,POOR,GOOD
EXCELLENT,GOOD,SOMEWHAT GOOD,POOR,EXCELLENT,GOOD
SOMEWHAT GOOD,GOOD,POOR,EXCELLENT,GOOD,EXCELLENT
VERY GOOD,EXCELLENT,SOMEWHAT GOOD,REJECT,SOMEWHAT GOOD,POOR
REJECT,REJECT,REJECT,SOMEWHAT GOOD,EXCELLENT,VERY GOOD
VERY GOOD,SOMEWHAT GOOD,PASSABLE,VERY GOOD,POOR,EXCELLENT
SOMEWHAT GOOD,POOR,PASSABLE,POOR,PASSABLE,GOOD
POOR,VERY GOOD,POOR,VERY GOOD,VERY GOOD,GOOD
REJECT,POOR,POOR,POOR,SOMEWHAT GOOD,EXCELLENT
REJECT,EXCELLENT,SOMEWHAT GOOD,PASSABLE,POOR,REJECT
REJECT,VERY GOOD,REJECT,REJECT,GOOD,POOR
GOOD,REJECT,EXCELLENT,REJECT,REJECT,POOR
EXCELLENT,VERY GOOD,VERY GOOD,EXCELLENT,PASSABLE,GOOD
PASSABLE,GOOD,PASSABLE,GOOD,POOR,SOMEWHAT GOOD
GOOD,REJECT,SOMEWHAT GOOD,EXCELLENT,EXCELLENT,REJECT
GOOD,REJECT,SOMEWHAT GOOD,REJECT,PASSABLE,PASSABLE
PASSABLE,PASSABLE,REJECT,GOOD,PASSABLE,VERY GOOD
```



100
## Tests
Dominique Merle's avatar
Dominique Merle committed
101

102
This software is unit-tested with `unittest`.
Dominique Merle's avatar
Dominique Merle committed
103

104
It's basic, but it works.
Dominique Merle's avatar
Dominique Merle committed
105

106
    python limaju/test_limaju.py -vvv