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

Number building interface and api #46

Open
nichtich opened this issue Nov 22, 2021 · 2 comments
Open

Number building interface and api #46

nichtich opened this issue Nov 22, 2021 · 2 comments
Labels
data issues related to decomposition data feature Additional functionality

Comments

@nichtich
Copy link
Member

Given a method to check whether a DDC number is valid, we can provide a simple number building interface with this algorithm:

nextBuildableNotations(notation, maxDepth): // given a start notation, try to add at most maxDepth digits
  narrower=[]
  for digit in 0...9:
    build = notation.length === 3 ? notation + "." + suffix : notation.suffix
    if isValidNotation(build): // found a digit that can be added
      narrower.push(build)
    else if maxDepth > 0: // try adding multiple digits at once
      narrower.append(nextNotations(build, maxDepth - 1))  
  return narrower

This basically results in JSKOS API method narrower for the virtual hierarchy of all possibly composable DDC notations.

@nichtich nichtich added feature Additional functionality data issues related to decomposition data labels Nov 22, 2021
@nichtich
Copy link
Member Author

Here is a possible Mockup. The building part should be collapsible. Clicking on the ↳ should truncate the current number.

image

nichtich added a commit that referenced this issue Jan 24, 2022
See #46 for discussion and additional ideas.
@nichtich
Copy link
Member Author

Another place where to put the selection of narrower classes could be the input field via typeahead (#62).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data issues related to decomposition data feature Additional functionality
Projects
None yet
Development

No branches or pull requests

1 participant