ABIF: Difference between revisions
Content added Content deleted
(Changing ABIF to stand for "Aggregated Ballot Information Format", per cited issue #2) |
(Moving the test cases to GitHub) |
||
Line 1: | Line 1: | ||
'''ABIF''' stands for "aggregated ballot information format"<ref>https://github.com/electorama/abif/issues/2</ref>. As of May 2021, it has been undergoing discussion on the /r/[[EndFPTP]] subreddit and on the [[EM-list]].<ref name="EM-post-2788">http://lists.electorama.com/pipermail/election-methods-electorama.com/2021-May/002788.html</ref><ref name="robla-comment-reddit-2020-05-26">https://www.reddit.com/r/EndFPTP/comments/nkm2cd/standardizing_cardinal_ballot_notation/gzls6pj/</ref |
'''ABIF''' stands for "aggregated ballot information format"<ref>https://github.com/electorama/abif/issues/2</ref>. As of May 2021, it has been undergoing discussion on the /r/[[EndFPTP]] subreddit and on the [[EM-list]].<ref name="EM-post-2788">http://lists.electorama.com/pipermail/election-methods-electorama.com/2021-May/002788.html</ref><ref name="robla-comment-reddit-2020-05-26">https://www.reddit.com/r/EndFPTP/comments/nkm2cd/standardizing_cardinal_ballot_notation/gzls6pj/</ref><ref>http://lists.electorama.com/pipermail/election-methods-electorama.com/2021-May/002789.html</ref> |
||
ABIF uses the [https://en.wikipedia.org/wiki/UTF-8 UTF-8] character encoding. |
ABIF uses the [https://en.wikipedia.org/wiki/UTF-8 UTF-8] character encoding. |
||
Line 5: | Line 5: | ||
== Test cases == |
== Test cases == |
||
The normative set of test cases are on GitHub, and we'll be expanding them there. Among the things we want to test for: |
|||
=== Test case 1 === |
|||
* Unordered scores on a bundle line (Test case #1)<ref>https://github.com/electorama/abif/blob/main/testfiles/test001.abif</ref> |
|||
Unordered scores |
|||
* Unscored (but ranked) candidates delimited only by ">" and "=" (Test case #2)<ref>https://github.com/electorama/abif/blob/main/testfiles/test002.abif</ref> |
|||
* Ranked ''and'' rated candidates (Test case 3)<ref>https://github.com/electorama/abif/blob/main/testfiles/test003.abif</ref> |
|||
12: Allie/5, Billy/5, Candace/4, Dennis/3, Edith/3, Frank/2, Georgie/1, Harold/0 |
|||
* Bracketed, inlined candidate tokens with many "high UTF-8" characters, like "ñ", "í", "á", "蘇","業" (Test case 4)<ref>https://github.com/electorama/abif/blob/main/testfiles/test004.abif</ref> |
|||
7: Allie/4, Billy/0, Candace/2, Dennis/3, Edith/1, Frank/0, Georgie/5, Harold/3 |
|||
* Declared candidate tokens(Test case 5)<ref>https://github.com/electorama/abif/blob/main/testfiles/test005.abif</ref> |
|||
5: Allie/0, Billy/3, Candace/2, Dennis/3, Edith/4, Frank/5, Georgie/3, Harold/4 |
|||
* Declared candidate tokens, with unordered scores (Test case 6)<ref>https://github.com/electorama/abif/blob/main/testfiles/test006.abif</ref> |
|||
* Test case 6 |
|||
( test case above copied from reddit post by /user/jman722 <ref |
|||
** Bracketed candidate tokens (declared). Ranked and scored. |
|||
name="reddit-post-jman722-2020-05-25" |
|||
* Test case 7 |
|||
>https://www.reddit.com/r/EndFPTP/comments/nkm2cd/standardizing_cardinal_ballot_notation/</ref>) |
|||
** Bracketed candidate tokens (declared). Ranked with no score. |
|||
* Test case 8 |
|||
** Bracketed candidate tokens (mixed). Ranked with no score. Most extra whitespace removed. |
|||
* Test case 9 |
|||
** Asterisk-delimited multiplier (suggested by Jan Šimbera in May 2020: <ref>http://lists.electorama.com/pipermail/election-methods-electorama.com/2021-June/002793.html</ref>) |
|||
12: Allie=Billy>Candace>Dennis=Edith>Frank>Georgie>Harold |
|||
7: Georgie>Allie>Dennis=Harold>Candace>Edith>Billy=Frank |
|||
5: Frank>Edith=Harold>Billy=Dennis=Georgie>Candace>Allie |
|||
=== Test case 3 === |
|||
Merged format to express both the range and the ordering: |
|||
12: Allie/5 =Billy/5 >Candace/4 >Dennis/3 =Edith/3 >Frank/2 >Georgie/1 >Harold/0 |
|||
7: Georgie/5 >Allie/4 >Dennis/3 =Harold/3 >Candace/2 >Edith/1 >Billy/0 =Frank/0 |
|||
5: Frank/5 >Edith/4 =Harold/4 >Billy/3 =Dennis/3 =Georgie/3 >Candace/2 >Allie/0 |
|||
=== Test case 4 === |
|||
Bracketed candidate tokens (inlined). Unordered scores. |
|||
27: [Doña García Márquez]/5, [Steven B. Jensen]/2, [Sue Ye (蘇業)]/1, [Adam Muñoz]/0 |
|||
26: [Doña García Márquez]/3, [Steven B. Jensen]/5, [Sue Ye (蘇業)]/3, [Adam Muñoz]/1 |
|||
24: [Doña García Márquez]/2, [Steven B. Jensen]/1, [Sue Ye (蘇業)]/5, [Adam Muñoz]/2 |
|||
23: [Doña García Márquez]/1, [Steven B. Jensen]/0, [Sue Ye (蘇業)]/3, [Adam Muñoz]/5 |
|||
=== Test case 5 === |
|||
Bracketed candidate tokens (declared). Unordered scores. |
|||
[Doña García Márquez]: DGM |
|||
[Steven B. Jensen]: SBJ |
|||
[Sue Ye (蘇業)]: SY |
|||
[Adam Muñoz]: AM |
|||
27: DGM/5, SBJ/2, SY/1, AM/0 |
|||
26: DGM/3, SBJ/5, SY/3, AM/1 |
|||
24: DGM/2, SBJ/1, SY/5, AM/2 |
|||
23: DGM/1, SBJ/0, SY/3, AM/5 |
|||
=== Test case 6 === |
|||
Bracketed candidate tokens (declared). Ranked and scored. |
|||
[Doña García Márquez]: DGM |
|||
[Steven B. Jensen]: SBJ |
|||
[Sue Ye (蘇業)]: SY |
|||
[Adam Muñoz]: AM |
|||
27: DGM/5 > SBJ/2 > SY/1 > AM/0 |
|||
26: SBJ/5 > DGM/3 = SY/3 > AM/1 |
|||
24: SY/5 > DGM/2 = AM/2 > SBJ/1 |
|||
23: AM/5 > SY/3 > DGM/1 > SBJ/0 |
|||
=== Test case 7 === |
|||
Bracketed candidate tokens (declared). Ranked with no score. |
|||
[Doña García Márquez]: DGM |
|||
[Steven B. Jensen]: SBJ |
|||
[Sue Ye (蘇業)]: SY |
|||
[Adam Muñoz]: AM |
|||
27: DGM > SBJ > SY > AM |
|||
26: SBJ > DGM = SY > AM |
|||
24: SY > DGM = AM > SBJ |
|||
23: AM > SY > DGM > SBJ |
|||
=== Test case 8 === |
|||
Bracketed candidate tokens (mixed). Ranked with no score. Most extra whitespace removed. |
|||
[Doña García Márquez]:DGM |
|||
[Steven B. Jensen]:SBJ |
|||
[Adam Muñoz]:AM |
|||
27:DGM>SBJ>[蘇業]>AM |
|||
26:SBJ>DGM=[蘇業]>AM |
|||
24:[蘇業]>DGM=AM>SBJ |
|||
23:AM>[蘇業]>DGM>SBJ |
|||
=== Test case 9 === |
|||
Asterisk-delimited multiplier (suggested by Jan Šimbera in May 2020: <ref>http://lists.electorama.com/pipermail/election-methods-electorama.com/2021-June/002793.html</ref>) |
|||
[Doña García Márquez]: DGM |
|||
[Steven B. Jensen]: SBJ |
|||
[Sue Ye (蘇業)]: SY |
|||
[Adam Muñoz]: AM |
|||
27 * DGM/5, SBJ/2, SY/1, AM/0 |
|||
26 * DGM/3, SBJ/5, SY/3, AM/1 |
|||
24 * DGM/2, SBJ/1, SY/5, AM/2 |
|||
23 * DGM/1, SBJ/0, SY/3, AM/5 |
|||