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

#14 download and load cldr data #24

Merged
merged 2 commits into from
Nov 6, 2022

Conversation

wkyoshida
Copy link
Member

Description:

  • Added dependency to the cldr-annotations-derived-full npm package for the emoji data
  • Added step to the Jupyter Notebook to download the latest CLDR data
  • Added quick initial code just to illustrate the ability to load CLDR data (further updates/changes incoming)
  • Fixed minor in-source doc for gen_autosuggestions()

Some notes:

  • I noticed that Unicode actually appears to keep the cldr-json data as separate npm packages 🙌, which is awesome
    • Separate packages seems convenient so Scribe is able to only get the data that it needs
    • Using npm, Scribe could also easily simply reference whatever the tagged latest version of the package is. Getting newest data is a matter of npm install
    • cldr-annotations-derived-full appeared to be the package Scribe would need for the emoji work, but can look into if other packages make sense instead, e.g. one of the other cldr-annotations-* packages
    • Can also add multiple packages if needed (in the package.json file); npm install would get the latest for all
  • Had to wrestle a bit with how to pick up the npm command inside Jupyter, but running the nvm shell setup seems to do the trick:
    • . $HOME/.nvm/nvm.sh (btw if nvm is used for node and npm version management, this is often what is run anyways whenever a new shell is opened)
    • Without the above, Jupyter does not have npm in the $PATH due to how the shell process works in Jupyter
    • Been a while since I've used Jupyter; so if there's a better way to pick up binaries/commands from inside Jupyter, let me know 🙌

Quick PR to at least get and load the CLDR data. Processing logic incoming. Let me know any thoughts ✌️

@andrewtavis andrewtavis self-requested a review November 6, 2022 09:10
Copy link
Member

@andrewtavis andrewtavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really great so far, @wkyoshida! Good thinking on using the NPM packages for this 😊

@andrewtavis andrewtavis merged commit aceabb5 into scribe-org:main Nov 6, 2022
@wkyoshida wkyoshida deleted the 14-download-cldr branch November 6, 2022 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants