RITA DSL
This is a language, loosely based on language Apache UIMA RUTA, focused on writing manual language rules, which compiles into either spaCy compatible patterns, or pure regex. These patterns can be used for doing manual NER as well as used in other processes, like retokenizing and pure matching
An Introduction Video
Links
- Website
- Simple Chat bot example
- Documentation
- QuickStart
- Language Syntax Plugin for IntelijJ based IDEs
Support
If you need consulting or some custom work done, you can Contact Us
Install
pip install rita-dsl
Simple Rules example
rules = """
cuts = {"fitted", "wide-cut"}
lengths = {"short", "long", "calf-length", "knee-length"}
fabric_types = {"soft", "airy", "crinkled"}
fabrics = {"velour", "chiffon", "knit", "woven", "stretch"}
{IN_LIST(cuts)?, IN_LIST(lengths), WORD("dress")}->MARK("DRESS_TYPE")
{IN_LIST(lengths), IN_LIST(cuts), WORD("dress")}->MARK("DRESS_TYPE")
{IN_LIST(fabric_types)?, IN_LIST(fabrics)}->MARK("DRESS_FABRIC")
"""
Loading in spaCy
import spacy
from rita.shortcuts import setup_spacy
nlp = spacy.load("en")
setup_spacy(nlp, rules_string=rules)
And using it:
>>> r = nlp("She was wearing a short wide-cut dress")
>>> [{"label": e.label_, "text": e.text} for e in r.ents]
[{'label': 'DRESS_TYPE', 'text': 'short wide-cut dress'}]
Loading using Regex (standalone)
import rita
patterns = rita.compile_string(rules, use_engine="standalone")
And using it:
>>> list(patterns.execute("She was wearing a short wide-cut dress"))
[{'end': 38, 'label': 'DRESS_TYPE', 'start': 18, 'text': 'short wide-cut dress'}]
Metadata
Release files for rita-dsl 0.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rita_dsl-0.8.0.tar.gz | 453.7 kB | Without provenance | Details for rita_dsl-0.8.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rita_dsl-0.8.0-py3-none-any.whl | Python 3 | none | any | Details for rita_dsl-0.8.0-py3-none-any.whl |
Total release size: 486.3 kB
Release files / rita_dsl-0.8.0.tar.gz
| Download URL | rita_dsl-0.8.0.tar.gz |
|---|---|
| Size | 453.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d2de9ab11e27c7d95336c7c95b7119abd7fbe1e5b11f7bca294e43e36d8c47b4
|
|
BLAKE2b-256 checksum How to use checksums |
9c9713b46b305e08d2a6d3de37c7e6bca58ffb80a4069a2a893fedcaedc42862
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / rita_dsl-0.8.0-py3-none-any.whl
| Download URL | rita_dsl-0.8.0-py3-none-any.whl |
|---|---|
| Size | 32.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9ccf1b64e57afe54ebd4cb9fb3df5822a0d9abec8d648882285da78a9253f71b
|
|
BLAKE2b-256 checksum How to use checksums |
9f270d1705b5473d5281c8eb368b9d754c34491b0a878aba5560a02e35b7be30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for rita-dsl 0.8.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.