Skip to main content

Innatis

This is a library of custom Rasa NLU components that we (CarLabs) are building.

What does the name mean?

Viribus Innatis means "innate abilities" in Latin. It's a joke...

"Rasa" comes from "tabula rasa" - blank slate in Latin. We (just Sam) thought it would be funny for this project to have the opposite name, since this is meant to be a suite of tools to fill in functionality for Rasa... that is, make it a not-blank-slate. So "Innate Abilities" -> Viribus Innatis.

Usage

$ pip install innatis

Then add to your pipeline in your rasa_config.yml. Example pipeline can be found in sample_rasa_innatis_config.yml.

Components

Classifiers

  • intent_classifier_bert - Pulls the bert model from TF HUB and pretrains on given data.

Example config

language: en
pipeline:
  - name: "tokenizer_whitespace"
  - name: "ner_crf"
  - name: "ner_synonyms"
  - name: "innatis.classifiers.BertIntentClassifier"
    pretrained_model_dir: '/path/to/uncased_L-24_H-1024_A-16'
    epochs: 10
    batch_size: 64

Extractors

  • composite_entity_extractor - Given entities extracted by another extractor (ner_crf seems to be the best for now), splits them into composite entities, similar to DialogFlow.
  • EntitySynonymMapper (replaces ner_synonyms) - this is the ner_synonyms adapted for composite_entity_extractor. You most likely need it if you use composite_entity_extractor. It replaces the synonyms with the original entities inside composite entities. It can also do fuzzy matching when matching synonyms (enabled by default). See example config: config_composite_entities.yml

Featurizers

  • universal_sentence_encoder_featurizer - Pulls the smaller USE model from TF HUB and embeds inputs as document vectors, and that vector gets sent downstream to be used as a feature.

Development

git clone git@github.com:Revmaker/innatis.git
cd innatis
pipenv install
# pipenv install --skip-lock if locking takes too long

# do some stuff
# write some tests

pipenv run python test.py

Dependencies suck, as is always the case in Python. I started out using pipenv because I thought that was the package manager for Python. But I guess you need to put dependencies in the install_requires section of setup.py. So, the (currently manual, but automatable) process for moving dependencies from the Pipfile to setup.py is:

$ cd innatis
# you are now in parent/innatis, not innatis/innatis
$ python ir_from_pipfile.py | pbcopy
['scikit-learn', 'scipy', 'sklearn-crfsuite', 'tensorflow', 'word2number', 'rasa_nlu==0.13.8', 'tensorflow-hub', 'spacy']

# that array is copied; paste it into setup.py

Also, please manually bump the version in a semver-ish way.

Metadata

Release files for innatis 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for innatis 0.7.0
File Size Uploaded Provenance
innatis-0.7.0.tar.gz 31.2 kB Without provenance Details

Release files / innatis-0.7.0.tar.gz

Download URL innatis-0.7.0.tar.gz
Size 31.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9900ef65a9189ca6563c3191b4539f9ec7340866a97fab5936e5a0b35bde99d5
BLAKE2b-256 checksum
How to use checksums
e0b4012b76f606431276e7f6f02773f630af63ab062dc7d665d013ecd242a57e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/3.6.7

Security for innatis 0.7.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page