Quick Brief on Sumo Ranks
Rank Input
Format Input
Common Usage Examples
Use Guide
Format Input Rules
Rank Input Rules
Content Errors
Input Errors for Rank
Input Errors for Format
Each rank has a name, number and direction - typically in that order.
Example 1: The highest rank in sumo
Long, all caps version: "Yokozuna 1 East"
Short, partial caps version: "Y1e"
Example 2: The lowest possible rank in the top division
Long, all caps version: "Maegashira 17 West"
Short, partial caps version: "M17w"
Named ranks (high to low):
Yokozuna, Ozeki, Sekiwake, Komusubi, Maegashira, Juryo, Makushita, Sandanme, Jonidan, Jonokuchi
Number ranks (high to low):
1 - 100+ (100 is a typical maximum, but it is unlimited in some cases)
Direction ranks (high to low):
East, West
Nn | nn | N | n |
---|---|---|---|
Yokozuna | yokozuna | Y | y |
Ozeki | ozeki | O | o |
Sekiwake | sekiwake | S | s |
Komusubi | komusubi | K | k |
Maegashira | maegashira | M | m |
Juryo | juryo | J | j |
Makushita | makushita | Ms | ms |
Sandanme | sandanme | Sd | sd |
Jonidan | jonidan | Jd | jd |
Jonkuchi | jonokuchi | Jk | jk |
Rank Number Ranges | # |
---|---|
Yokozuna | 1 - 2 |
Ozeki | 1 - 2 |
Sekiwake | 1 - 2 |
Komusubi | 1 - 2 |
Maegashira | 1 - 17(limit) |
Juryo | 1 - 14(limit) |
Makushita | 1 - 60(limit) |
Sandanme | 1 - 100(limit) |
Jonidan | 1 - 100+ |
Jonkuchi | 1 - 60+ |
Dd | dd | D | d |
---|---|---|---|
East | east | E | e |
West | west | W | w |
Nn # Dd --> Yokozuna 1 East, Maegashira 12 West, Jonokuchi 68 East
nn # dd --> yokozuna 1 east, maegashira 12 west, jonokuchi 68 east
N#D --> Y1E, M12W, Jk68E
N#d --> Y1e, M12w, Jk68e
N --> Y, M, Jk
#d --> 1e, 12w, 68e
- Format can be arranged in any combination
sumoRank.format("S1W", "Nn") --> "Sekiwake"
sumoRank.format("S1W", "N#d") --> "S1w" - Spaces between rankings will be retained
sumoRank.format("S1W", "nn # dd") --> "sekiwake 1 west"
- Input rank can be any arrangement
sumoRank.format("Komusubi 1 e", "N#D") --> "K1E"
sumoRank.format("e 1 Komusubi", "N#D") --> "K1E"
sumoRank.format("K1e", "N#D") --> "K1E" - Input rank IS caps sensitive
sumoRank.format("KomuSUBi 1 eASt", "Nn") --> Error SR.304
SR.101
Non-existent Name/Number rankings throw error
sumoRank.format("Maegashira 18 East", "N#D") --> ErrorSR.202
(INCOMPLETE) Lower division rankings throw error
sumoRank.format("Sandanme 82 East", "N#D") --> Error
SR.301
Empty rank types throw error
sumoRank.format("", "Dd") --> ErrorSR.302
Blank rank types throw error
sumoRank.format(" ", "Nn#Dd") --> ErrorSR.303
(Placeholder Error)SR.304
Non-rank item throw error
sumoRank.format("M two east", "N#D") --> Error
sumoRank.format("i like turtles", "N#D") --> ErrorSR.305
Multiple instances of rank type throw error
sumoRank.format("Y Y", "Nn#Dd) --> Error
sumoRank.format("Y y", "Nn#Dd) --> Error
sumoRank.format("Y M", "Nn#Dd) --> Error
sumoRank.format("Ozeki ozeki", "Nn#Dd) --> Error
sumoRank.format("Ozeki Sekiwake", "Nn#Dd) --> ErrorSR.306
Rank Name not given, but requested
sumoRank.format("2 West", "Nn") --> ErrorSR.307
Rank Number not given, but requested
sumoRank.format("Ozeki West", "#") --> ErrorSR.308
Rank Direction not given, but requested
sumoRank.format("Ozeki 2", "Dd") --> Error
SR.401
Empty format types throw error
sumoRank.format("K2E", "") --> ErrorSR.402
Blank format types throw error
sumoRank.format("K2E", " ") --> ErrorSR.403
Incorrect format types throw error
sumoRank.format("Y1E",123) --> Error
sumoRank.format("Y1E",true) --> Error
sumoRank.format("Y1E",[]) --> Error
sumoRank.format("Y1E",{}) --> ErrorSR.404
(Placeholder Error)SR.405
(Placeholder Error)SR.406
Duplicate rank format type
sumoRank.format("M5W", "N n") --> ErrorSR.407
Duplicate number format type
sumoRank.format("M5W", "# #") --> ErrorSR.408
Duplicate direction format type
sumoRank.format("M5W", "Dd dd") --> Error
- Format must be an array of objects with 'rank' property
- The 'rank' property must be in the 'N#D' format
[ {rank:"Y1E"}, {rank:"M12W"} ]
sumoRank.format([ {rank:"Sd1W"}, {rank:"M2E"} ])
--> [ {rank:"M2E"}, {rank:"Sd1W"} ]
sumoRank.format([ {rank:"K1E"}, {rank:"O1W"} ])
--> [ {rank:"O1E"}, {rank:"K1E"} ]
SR.501
Empty array, or array with only 1 rank throw error
sumoRank.sort([]) --> Error
sumoRank.sort([ {id:1,rank:"Y1E"} ]) --> ErrorSR.502
Array items do not contain 'rank' property
sumoRank.sort([ {id:1}, {id:2} ]) --> ErrorSR.503
Cannot sort, items do not contain rank number
sumoRank.sort([ {rank:"Y"}, {rank:"Y"} ]) --> ErrorSR.504
Cannot sort, items do not contain rank direction
sumoRank.sort([ {rank:"Y1"}, {rank:"Y1"} ]) --> ErrorSR.505
Duplicate rank found
sumoRank.sort([ {rank:"Y1E"}, {rank:"Y1E"} ]) --> Error