# Super set notation to normal big cube notation converter



## abunickabhi (Feb 17, 2021)

Currently, I have a big sheet of x-center 5-cycles (10k+ algs), but the problem is that all the algs are in superset notation, and I have to read it out and do it on the cube. I cannot use cubedb or alg.cubing to enter the alg as superset notation is not allowed there. 

Few days back, I discussed with @cmowla a few days back, and got to know about superset notation. (http://www.randelshofer.ch/rubik/professor/doc/supersetENG_5x5.html)

The few sets of turn types that exist in superset notation that need to be mapped to normal bigcube scramble notation are:

Face twists
Tier twists
Numbered layer twists
Numbered range twists
Verge twists
Mid-layer twists
Wide-layer twists
Slice twists
Slice range twists
Cube rotations
I am fine with parser on any platforrm, python, java, C++, VisualC, regex.


----------



## abunickabhi (Feb 18, 2021)

I have written a superset notation converter via python, and the code looks like this. It is solving my problem for the time being, 

Code: https://github.com/abunickabhi/5bldcommgenerator/blob/master/supersetconverter.py


----------



## Alexander (Feb 18, 2021)

```
# -*- coding: utf-8 -*-
"""
Created on Thu Feb 18 21:34:35 2021
@author: Alexander & abhij
"""

import re
string = "TR' L SF NF2 TF2 L NU' L' NF2 L NR2 NU R2 NU' NR2 NU SR2 TF"

string = string.replace("N", "2")

string = string.replace('TR','r').replace('TL','l').replace('TU','u').replace('TD','d').replace('TF','f').replace('TB','b')

string = re.sub(r'(SF )(?!\')', 'F B\' ', string)
string = re.sub(r'(SF\' )(?!\')', 'F\' B ', string)
string = re.sub(r'(SF2 )(?!\')', 'F2 B2 ', string)
string = re.sub(r'(SR )(?!\')', 'R L\' ', string)
string = re.sub(r'(SR\' )(?!\')', 'R\' L ', string)
string = re.sub(r'(SR2 )(?!\')', 'L2 R2 ', string)
string = re.sub(r'(SU )(?!\')', 'U D\' ', string)
string = re.sub(r'(SU\' )(?!\')', 'U\' D ', string)
string = re.sub(r'(SU2 )(?!\')', 'U2 D2 ', string)

print(string)
```

My first python script a modification of your code that N part was very easy to short it up the rest i did not bother yet


----------



## abunickabhi (Feb 19, 2021)

Alexander said:


> ```
> # -*- coding: utf-8 -*-
> """
> Created on Thu Feb 18 21:34:35 2021
> ...


Thanks for the edit.

I converted about 10k superset notation algs to normal notation using this script.


----------

