Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add -auto-order option #20

Open
birchb1024 opened this issue Oct 20, 2022 · 1 comment
Open

Add -auto-order option #20

birchb1024 opened this issue Oct 20, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@birchb1024
Copy link
Owner

If the -auto-order option is given, then assess the relative 'value' of each token at each level. Re-order the input and re do so that the hierarchy makes more sense. For example one way to re-order is to place tokens with higher counts higher in the hierarchy. Thought-experiment. Given:

12:34  01-01-2022 
12:43  01-01-2022 
12:45  01-01-2022 
12:50  01-01-2022 
00:10  02-01-2022 
00:12  02-01-2022 
00:34  02-01-2022 

We want

frangipanni -no-fold -counts
2022: 7
    01: 7
        01: 4
            12: 4
                34: 1
                43: 1
                45: 1
                50: 1
        02: 3
            00: 3
                10: 1
                12: 1
                34: 1

But as you can see there is ambiguity here, how do we know what the output order is, in fact?

@birchb1024
Copy link
Owner Author

Maybe this needs to be in a seperate filter, ie <data.csv auto-reorder | frangipanni. Perhaps the concept of re-ordering columns only makes sense for tabular data. Frangipanni does not have any concept of rows (lines) being organised into columns, it assumes they are all diverse. Hmmm...

@birchb1024 birchb1024 self-assigned this Oct 20, 2022
@birchb1024 birchb1024 added the enhancement New feature or request label Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant