Skip to main content

Injecting custom NLP in your pipelines

The snippet app extends the NLP in your pipeline with a small set of rules or lexicons.

Options

interface SnippetOptions {
    source: string;
}

with:

Property Description
source Wowool source code

Results

The app extends the NLP, the results of which will be reflected in the analysis results.

Examples

Injecting custom NLP in your pipelines

The snippet app extends the NLP in your pipeline with a small set of rules or lexicons.

Options

interface SnippetOptions {
    source: string;
}

with:

Property Description
source Wowool source code

Results

The app extends the NLP, the results of which will be reflected in the analysis results.

API

Examples

Trying out the wowool language.

This script uses the wowool SDK annotate entities and uses the snippet app ton annotate the relationships between people and companies.

from wowool.sdk import Pipeline

text = "John Smith works for Ikea."
pipeline = Pipeline(
    [
        "english",
        "entity",
        {
            "name": "snippet.app",
            "options": {
                "source": "rule:{ Person .. Company } = PersonCompany;",
            },
        },
    ]
)
document = pipeline(text)
print(document)

In the results we see that the annotation PersonCompany has been added.

S:(  0, 26) @( header='true' )
 C:(  0, 25): PersonCompany
 C:(  0, 10): Person,@(canonical='John Smith' family='Smith' gender='male' given='John' )
 T:(  0,  4): John,{+giv, +init-cap, +init-token},[John:Prop-Std]
 T:(  5, 10): Smith,{+fam, +init-cap},[Smith:Prop-Std]
 T:( 11, 16): works,[work:V-Pres-3-Sg]
 T:( 17, 20): for,[for:Prep-Std]
 C:( 21, 25): Company,@(canonical='IKEA' country='Sweden' sector='retail' )
 T:( 21, 25): Ikea,{+company, +init-cap},[Ikea:Prop-Std]
 T:( 25, 26): .,[.:Punct-Sent]

License

In both cases you will need to acquirer a license file at https://www.wowool.com

Non-Commercial

This library is licensed under the GNU AGPLv3 for non-commercial use.  
For commercial use, a separate license must be purchased.  

Commercial license Terms

1. Grants the right to use this library in proprietary software.  
2. Requires a valid license key  
3. Redistribution in SaaS requires a commercial license.  

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wowool_snippet-2.1.4-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file wowool_snippet-2.1.4-py3-none-any.whl.

File metadata

  • Download URL: wowool_snippet-2.1.4-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for wowool_snippet-2.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d0143af39eededd63d64656d92d6db2b09cbca3c0c7e05f4bed40f9b39faa16e
MD5 c5176c2b02d1c70873646c4fb57f9b70
BLAKE2b-256 cb92448238b2ffe612433cd7c6df28fb89806fe6494bef41dcd67b9031e8569d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.1.4 This release

1 file

2.1.3

1 file

2.1.2

1 file

2.1.1

1 file

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