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.3-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wowool_snippet-2.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 619a07c32c9b3d72aec5f37f5a5dd6fb035ba362c667c498cc2038b17e04306e
MD5 eb928e11e42ad790835a0069ed53bf0d
BLAKE2b-256 f4514aa23ede5ca9e24cf86f97856ada730a1271ab35c359e2561722444bc1df

See more details on using hashes here.

Release history Release notifications | RSS feed

2.1.4

1 file

This release

2.1.3 This release

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