{"id":19860847,"url":"https://github.com/asyml/stave","last_synced_at":"2025-05-02T04:30:27.419Z","repository":{"id":39181391,"uuid":"207876868","full_name":"asyml/stave","owner":"asyml","description":"An extensible framework for building visualization and annotation tools to enable better interaction with NLP and Artificial Intelligence. This is part of the CASL project: http://casl-project.ai/","archived":false,"fork":false,"pushed_at":"2023-02-04T05:08:12.000Z","size":4845,"stargazers_count":50,"open_issues_count":44,"forks_count":18,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-25T13:13:58.230Z","etag":null,"topics":["annotation","casl-project","nlp","petuum","visualization"],"latest_commit_sha":null,"homepage":"https://asyml.io","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/asyml.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-11T18:12:40.000Z","updated_at":"2025-03-10T09:17:11.000Z","dependencies_parsed_at":"2023-02-06T11:46:37.233Z","dependency_job_id":null,"html_url":"https://github.com/asyml/stave","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asyml%2Fstave","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asyml%2Fstave/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asyml%2Fstave/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asyml%2Fstave/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asyml","download_url":"https://codeload.github.com/asyml/stave/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251986620,"owners_count":21675950,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["annotation","casl-project","nlp","petuum","visualization"],"created_at":"2024-11-12T15:07:22.081Z","updated_at":"2025-05-02T04:30:27.084Z","avatar_url":"https://github.com/asyml.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n   \u003cimg src=\"https://raw.githubusercontent.com/asyml/stave/master/public/Stave-dark-text@1x.png\"\u003e\u003cbr\u003e\u003cbr\u003e\n\u003c/div\u003e\n\n-----------------\n\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/asyml/stave/blob/master/LICENSE)\n[![Build Status](https://travis-ci.org/asyml/stave.svg?branch=master)](https://travis-ci.org/asyml/stave)\n\nThis project is currently under development.\n\n**Stave** is a fast, lightweight, extensible web-based text annotation and visualization tool designed to support a wide range of data types and NLP tasks. Stave offers the following features:\n  \n- **Semantic Annotation**: supports both template and custom data types\n- **Multi-document Annotation**: supports cross-document annotations and coreference\n- **Customizable Interface**: supports creation of task-specific interface with independently developed plugins\n- **Machine-Human Collaboration**: keeps human in the loop to verify and correct machine suggestions \n- **Easy Integration**: supports seamless integration with pre-built NLP workflows \n- **Safe Data Serialization**: supports a JSON-serializable format for easy data saving, loading and distribution \n\nStave was originally developed and is actively contributed by [Petuum](https://petuum.com/) in collaboration with other institutes. A mirror of this repository is maintained by [Petuum Open Source](https://github.com/petuum).\n\n## Get Started\n#### Installation\n```bash\npip install stave\n```\n#### Quick Start\n ```bash\nstave -s start -l -o\n```\nThis will start the Stave server with example project loaded. `-s` allows Stave to run with all the default configuration. `-l` will load example projects and `-o` will open a browser window. If you want to start Stave as a headless server, simply remove the `-o` flag. You can log in with default user name `admin` and default password `admin`. You can start viewing the projects and some annotations/applications that we have prepared.\n\nOr if you just want to start Stave from scratch, you can:\n\n```bash\nstave start\n```\nYou can still log in with default user name `admin` and default password `admin`, which leads you to an empty project page. \n\nAt any time, you can still load the example projects:\n```bash\nstave load-samples\n```\n\nBy default the Stave server runs at http://localhost:8888. If you need to switch the port, you can add `-n` to specify the port number. For example, the following command will start a Stave service at http://localhost:8002.\n```bash\nstave start -n 8002\n```\nFor more options to start Stave server, refer to:\n```bash\nstave start -h\n```\n#### Stave Configuration\nAfter you start the Stave server, a `.stave/` folder is automatically created under your home directory `~`. It has the following structure:\n```\n~/.stave/\n---- stave.conf\n---- db.sqlite3\n---- log\n```\n- `stave.conf` holds a json object of configurations.\n- `db.sqlite3` is the default database for Stave server.\n- `log` is the default logging file.\n\nYou can view or update the configuration by running the subcommand `config`. \nYou may follow the prompts to interactively set up the configuration:\n```bash\nstave config -i\n```\nStave CLI allows you to configure the database file, log file, the allowed hosts, etc. For more options, run\n```bash\nstave config -h\n```\nand you shall see the following help message:\n```bash\nusage: stave config [-h] [-i] [-s DJANGO_SETTINGS_MODULE] [-d DB_FILE]\n                    [-l LOG_FILE] [-a ALLOWED_HOSTS [ALLOWED_HOSTS ...]]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -i, --interact-config\n                        Interactively set up the configuration\n  -s DJANGO_SETTINGS_MODULE, --django-settings-module DJANGO_SETTINGS_MODULE\n                        Module path to settings.py of django project. If you\n                        have not set up any django project, you should leave\n                        this field empty and stave will use its default\n                        configuration. To set this field you should already\n                        have a django project and the 'settings.py' file under\n                        your project must be accessible from PYTHONPATH so\n                        that django can import it as a module. Example:\n                        'myproject.settings'\n  -d DB_FILE, --db-file DB_FILE\n                        Path to database file of Stave\n  -l LOG_FILE, --log-file LOG_FILE\n                        Path to log file for logging\n  -a ALLOWED_HOSTS [ALLOWED_HOSTS ...], --allowed-hosts ALLOWED_HOSTS [ALLOWED_HOSTS ...]\n                        A list of strings representing the host/domain names\n                        that stave can serve.\n```\nFor example, you can change the path of database file by running:\n```bash\nstave config -d ~/db.sqlite3\n```\nYou may also add your own host names to the allowed hosts that Stave can serve:\n```bash\nstave config -a localhost myhost1.com myhost2.com\n```\n\n#### Import and Export\nStave provides a set of interfaces that allow you to import/export projects from/to disk. This is useful when you need to transfer Stave projects between backend database and local storage.\n\nTo export a project, you need to specify the path to store the project and its database id (which can be retrieved from URL, e.g., the id of project at http://localhost:8888/project/3 is 3). For example, the following command will save project with `id=3` to `~/project_3`:\n```bash\nstave export ~/project_3 3\n```\nNote that you will be prompted to enter your username and password before moving forward.\n\nNow that you've saved a Stave project to a directory, you can either render this project in viewer mode\n```bash\nstave start -o -p ~/project_3\n```\nor import it to the database (which also requires authentication with username and password)\n```bash\nstave import ~/project_3\n```\n`stave import` is also useful when you use [StaveProcessor](https://github.com/asyml/forte/blob/master/forte/processors/stave/stave_processor.py#L46) inside a forte pipeline and want to save the generated visualization to database. `StaveProcessor` normally would save a Stave project to a folder (by default the name of folder is `Auto generated project`), and you can import this folder into stave backend by running\n```bash\nstave import PATH_TO_STAVE_PROJECT\n```\n\n#### More about the command line tool\nTo learn more about Stave CLI, run the following command to see the help message:\n```bash\nstave -h\n```\n\n## Developer Quick Start\n#### Environment\nThe project is tested on:\n\nPython 3.6+\nDjango 3.2.4\nyarn 1.22.10\n\n#### Run Django server\n- `cd simple-backend`\n- make sure your `python` command is using python3, or use a virtual env by:\n  - `python3 -m venv venv` create virtual env (skip if already created)\n  - `. venv/bin/activate` use virtual env\n- make sure django is installded, or install it by:\n  - `python -m pip install Django`\n- `./start-dev.sh`\n  - This script will create an example sqlite3 DB from SQL: `db.sqlite3`\n\n\n#### Start the Frontend\nAfter the server starts, then simply \n- yarn \u0026\u0026 yarn start\n- go to http://127.0.0.1:8000\n\nThe default username/password for the demonstration data is admin/admin\n\n### License\n\n[Apache License 2.0](./LICENSE)\n\n### Companies and Universities Supporting Stave\n\u003cp float=\"left\"\u003e\n   \u003cimg src=\"./docs/_static/img/Petuum.png\" width=\"200\" align=\"top\"\u003e\n   \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n   \u003cimg src=\"https://asyml.io/assets/institutions/cmu.png\", width=\"200\" align=\"top\"\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasyml%2Fstave","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasyml%2Fstave","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasyml%2Fstave/lists"}