Skip to content

Automate JavaScript stemmer generation for website deployment#47

Draft
assem-ch with Copilot wants to merge 6 commits into
masterfrom
copilot/automate-snowball-generation
Draft

Automate JavaScript stemmer generation for website deployment#47
assem-ch with Copilot wants to merge 6 commits into
masterfrom
copilot/automate-snowball-generation

Conversation

Copilot AI commented Feb 16, 2026

Copy link
Copy Markdown
Contributor

Generating the JavaScript stemmer for arabicstemmer.com required manual Snowball compilation, file copying, and bundling. This PR automates the entire workflow into a single command.

Changes

  • scripts/generate_js_stemmer.sh: Orchestrates Snowball compiler, generates JS from algorithm/arabic.sbl, bundles base-stemmer + arabic-stemmer, adds UMD exports with globalThis fallback
  • Makefile: Added js_stemmer target
  • scripts/demo.html: Interactive demo with RTL support
  • Documentation: Usage guide and light vs root-based stemmer distinction

Usage

make js_stemmer  # → dist/website/snowball.js

The generated bundle supports CommonJS, AMD, and browser globals:

// Node.js
const ArabicStemmer = require('./dist/website/snowball.js');

// Browser
<script src="snowball.js"></script>
<script>
  const stemmer = new ArabicStemmer();
  console.log(stemmer.stemWord('الطالب'));  // طالب
</script>

Optional minification with uglifyjs if available.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • arabicstemmer.com
    • Triggering command: /usr/bin/curl curl -s REDACTED (dns block)
    • Triggering command: /usr/bin/curl curl -sL REDACTED (dns block)
  • https://api.github.com/repos/assem-ch/arabicstemmer.com
    • Triggering command: /usr/bin/curl curl -s REDACTED (http block)
  • https://api.github.com/repos/assem-ch/arabicstemmer/branches
    • Triggering command: /usr/bin/curl curl -s REDACTED (http block)
  • https://api.github.com/search/repositories
    • Triggering command: /usr/bin/curl curl -s REDACTED (http block)
  • https://api.github.com/users/assem-ch/repos
    • Triggering command: /usr/bin/curl curl -s REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Make a script to automate jssnowball generation of snowball.babel.js when the stemmer is changed</issue_title>
<issue_description> Make the script to update the js snowball that we use in website so the next time we update the stemmer we can do the update in one line
</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 5 commits February 16, 2026 11:29
Co-authored-by: assem-ch <315228+assem-ch@users.noreply.github.com>
Co-authored-by: assem-ch <315228+assem-ch@users.noreply.github.com>
Co-authored-by: assem-ch <315228+assem-ch@users.noreply.github.com>
Co-authored-by: assem-ch <315228+assem-ch@users.noreply.github.com>
Co-authored-by: assem-ch <315228+assem-ch@users.noreply.github.com>
Copilot AI changed the title [WIP] Add script to automate jssnowball generation Automate JavaScript stemmer generation for website deployment Feb 16, 2026
Copilot AI requested a review from assem-ch February 16, 2026 11:34
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.

Make a script to automate jssnowball generation of snowball.babel.js when the stemmer is changed

2 participants