StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics
https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
748 B
54 lines
748 B
4 years ago
|
'use strict'
|
||
|
|
||
|
module.exports = toSuperScript
|
||
|
|
||
|
var SUPERSCRIPTS = {
|
||
|
' ': ' ',
|
||
|
'0': '⁰',
|
||
|
'1': '¹',
|
||
|
'2': '²',
|
||
|
'3': '³',
|
||
|
'4': '⁴',
|
||
|
'5': '⁵',
|
||
|
'6': '⁶',
|
||
|
'7': '⁷',
|
||
|
'8': '⁸',
|
||
|
'9': '⁹',
|
||
|
'+': '⁺',
|
||
|
'-': '⁻',
|
||
|
'a': 'ᵃ',
|
||
|
'b': 'ᵇ',
|
||
|
'c': 'ᶜ',
|
||
|
'd': 'ᵈ',
|
||
|
'e': 'ᵉ',
|
||
|
'f': 'ᶠ',
|
||
|
'g': 'ᵍ',
|
||
|
'h': 'ʰ',
|
||
|
'i': 'ⁱ',
|
||
|
'j': 'ʲ',
|
||
|
'k': 'ᵏ',
|
||
|
'l': 'ˡ',
|
||
|
'm': 'ᵐ',
|
||
|
'n': 'ⁿ',
|
||
|
'o': 'ᵒ',
|
||
|
'p': 'ᵖ',
|
||
|
'r': 'ʳ',
|
||
|
's': 'ˢ',
|
||
|
't': 'ᵗ',
|
||
|
'u': 'ᵘ',
|
||
|
'v': 'ᵛ',
|
||
|
'w': 'ʷ',
|
||
|
'x': 'ˣ',
|
||
|
'y': 'ʸ',
|
||
|
'z': 'ᶻ'
|
||
|
}
|
||
|
|
||
|
function toSuperScript(x) {
|
||
|
return x.split('').map(function(c) {
|
||
|
if(c in SUPERSCRIPTS) {
|
||
|
return SUPERSCRIPTS[c]
|
||
|
}
|
||
|
return ''
|
||
|
}).join('')
|
||
|
}
|