The Wowool Snippet Package
Project description
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, 26): Sentence,@(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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wowool_snippet-2.1.2-py3-none-any.whl.
File metadata
- Download URL: wowool_snippet-2.1.2-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a66674e02bade926d36f73d08426c2ef5d1bc9d888b528c9d7e19019d7de214
|
|
| MD5 |
0070ca3a770ec0b86b6fc1d94f97c128
|
|
| BLAKE2b-256 |
6f57a332fd1685f34cc0ea62557add454238755606fa5916991860aa14ebcd68
|