npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@giancosta86/jardinero

v2.0.0

Published

Extensible web stack in TypeScript for exploring natural languages

Downloads

4

Readme

JardineroJS

Extensible web stack in TypeScript for exploring natural languages

GitHub CI npm version MIT License

Screenshot

🌹JardineroJS is a web architecture, based on NodeJS, focused on building SQL-based dictionaries for the analysis of natural languages.

It is entirely written in TypeScript, with a frontend enabling users to:

  • create subsequent versions of custom dictionaries, by extracting terms from a set of arbitrary input pages - such as Wiktionary - and storing the data into SQLite databases

  • perform sophisticated queries, in order to explore a wide variety of linguistic aspects of the newly-created dictionary - especially in the domain of morphology

The architecture is designed to be fully extensible - via plugins, that are responsible for defining:

  • how to extract terms from an arbitrary source

  • how to insert the terms into SQL tables - and how to retrieve them: every plugin has its own SQLite database

Furthermore, plugins can be created quite easily, via the open source JardineroJS-sdk.

Installation

JardineroJS has been tested with NodeJS 16 LTS and NodeJS 18.

It should be installed as a global package; in particular:

npm install -g @giancosta86/jardinero

or

yarn global add @giancosta86/jardinero

Then, you need to ensure that the global bin directory - as defined by your package manager settings - belongs to your PATH environment variable; for example, in the case of Yarn, you can find out this directory via the following command:

yarn global bin

After that, adding a directory to your PATH environment variable depends on your operating system - please, follow the most recent documentation.

Running JardineroJS

JardineroJS cannot run by itself: it requires a plugin even to start - because the data source, together with the related algorithms - is provided by the plugin.

Consequently, to run JardineroJS, you first need to install a plugin.

Installing a plugin

Usually, plugins should be installed as global libraries - using the package manager you prefer: actually, you can even install JardineroJS via a package manager and later install its plugins via another one - the loading mechanism makes them totally unrelated.

Plugins need to be installed only once: thereafter, you can run JardineroJS as many times as you wish

For example, to install the CervantesJS plugin - devoted to the analysis of the Spanish language via Wikcionario:

npm i -g @giancosta86/cervantes

or

yarn global add @giancosta86/cervantes

Similarly, if you want to install RayonJS - the plugin for exploring the French language - you can run:

npm i -g @giancosta86/rayon

or

yarn global add @giancosta86/rayon

As a matter of fact, JardineroJS only requires the module exporting the plugin class - as explained in the JardineroJS-sdk documentation: consequently, if you are a plugin developer, you only need the compiled .js files within your plugin project directory - with no need for packaging.

Running a plugin

jardinero <linguistic module id>

where <linguistic module id> is usually the directory of the installed package providing the plugin you want to use.

More concretely, in both Bash and PowerShell, if you are using Yarn to install plugins, you can run:

jardinero "$(yarn global dir)/node_modules/<linguistic module package>"

For example, to start JardineroJS after installing the @giancosta86/cervantes plugin for Spanish, you'll just need this command:

jardinero "$(yarn global dir)/node_modules/@giancosta86/cervantes"

Similarly, to run the @giancosta86/rayon plugin for French, you should execute this command:

jardinero "$(yarn global dir)/node_modules/@giancosta86/rayon"

More technically, Jardinero only requires the module id (which can be the file-system path) of the module exporting the linguistic plugin, as expected by the resolve() function and in the way described by the JardineroJS-sdk project. In particular, if you are a plugin developer, you can simply pass the path to the compiled .js file of your plugin module, to test it before packaging.

Developing custom plugins

Creating a plugin for JardineroJS is as easy as extending an abstract class - and documented in detail by the open source JardineroJS-sdk project.

A vast architecture of TypeScript projects

🌹JardineroJS is a huge architecture, consisting of several NPM packages.

You are invited to explore them - because they manage to be fairly general-purpose, and they are also thoroughly tested.

The complete list of the remanining NPM packages in the JardineroJS architecture is as follows:

For convenience, a workspace file for VS code - JardineroJS - is provided within the project folder and contains the relative paths, matching the GitHub naming, of all the projects within the architecture.

Further references

If you wish, please feel free to have a look at the original Python edition as well.