Skip to main content

Wowool NLP Toolkit

Project description

The Wowool NLP Toolkit

install

Install the main sdk.

pip install wowool-sdk

Installing languages.

pip install wowool-[language]

Quick Start

Just create a document and pipeline, pass your document trough the Pipeline, and your done.

from wowool.sdk import Pipeline
from wowool.document import Document

document = Document("Mark Van Den Berg works at Omega Pharma.")
# Create an analyzer for a given language and options
process = Pipeline("english,entity")
# Process the data
document = process(document)
print(document)

API

Examples

You will need to install the english language module to run the sample. pip install wowool-english

Using the language identifier

This script demonstrates how to use the LanguageIdentifier to detect the language of a document.

from wowool.sdk import LanguageIdentifier

document = """
Un été de tous les records de chaleur en France.
Record de chaleur battu dans une cinquantaine de villes en France

"""
# Initialize a language identification engine
lid = LanguageIdentifier()
# Process the data
doc = lid(document)
print(doc.language)

Custom domain

The script identifies the word "car" as a Vehicle entity in the sentence "I have a car." using custom domain rules and language processing.

For more info on how to write rules see: https://www.wowool.com/docs/nlp/matching-&-capturing

from wowool.sdk import Language, Domain
from wowool.document import Document

english = Language("english")
vehicle = Domain(source="rule:{ 'car'} = Vehicle;")
doc = vehicle(english(Document("I have a car.")))
for entity in doc.entities:
    print(entity)

Extract dutch entities

This script demonstrates how to perform basic entity analysis on a Dutch sentence using the Wowool SDK.

Install first the dutch language model pip install wowool-dutch

from wowool.sdk import Pipeline
from wowool.document import Document

entities = Pipeline("dutch,entity")
document = entities(Document("Mark Van Den Berg werkte als hoofdarts bij Omega Pharma."))
for sentence in document.sentences:
    for entity in sentence.entities:
        print(entity)

Using the language identifier

This script demonstrates how to use the LanguageIdentifier to detect the different language sections in a text multi-language document.

from wowool.sdk import LanguageIdentifier

document = """
La juventud no es más que un estado de ánimo.

Record de chaleur battu dans une cinquantaine de villes en France

"""
# Initialize a language identification engine
lid = LanguageIdentifier(sections=True, section_data=True)
# Process the data
doc = lid(document)
if lid_results := doc.lid:
    for section in doc.lid.sections:
        assert section.text
        print(f"({section.begin_offset},{section.end_offset}): language= {section.language} text={section.text[:20].strip('\n')}...")

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


Download files

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

Source Distribution

wowool_sdk-3.5.0.tar.gz (70.5 kB view details)

Uploaded Source

Built Distributions

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

wowool_sdk-3.5.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (40.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

wowool_sdk-3.5.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (71.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64

wowool_sdk-3.5.0-cp313-cp313-macosx_11_0_arm64.whl (65.6 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

wowool_sdk-3.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (40.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

wowool_sdk-3.5.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (71.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

wowool_sdk-3.5.0-cp312-cp312-macosx_11_0_arm64.whl (65.6 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

wowool_sdk-3.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (40.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

File details

Details for the file wowool_sdk-3.5.0.tar.gz.

File metadata

  • Download URL: wowool_sdk-3.5.0.tar.gz
  • Upload date:
  • Size: 70.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for wowool_sdk-3.5.0.tar.gz
Algorithm Hash digest
SHA256 df7ee9e24f1817c944fea4b35f7b285aa8ce88dc9594055a0e6a803de1d80ece
MD5 8851b7b4da82348060666a76cd32d0ac
BLAKE2b-256 2591cef2f8de0dfae3127568521df98b0948e40db5890d06e1a941cf5e556a8b

See more details on using hashes here.

File details

Details for the file wowool_sdk-3.5.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for wowool_sdk-3.5.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 733e19414cc77e66c4c84bfd411a517ca566b9ec4ac6b17c321c746db25b66d4
MD5 28642cfd57f1c7887014747ae3c771d0
BLAKE2b-256 0bb16b89c71a686cf4dbb883b8b899f952ac5272b85235028223799635e235d5

See more details on using hashes here.

File details

Details for the file wowool_sdk-3.5.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for wowool_sdk-3.5.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 74bc14ed88b104bedc70fd53612e28c2144f1ddc6bcd1bb7c986884acd3c6b3b
MD5 fbfa5f4bb1fe8386906b13868ecbb657
BLAKE2b-256 2008a005a19a4b62aa3320741379f1a083851233c81c86255b2698b7c6eb019a

See more details on using hashes here.

File details

Details for the file wowool_sdk-3.5.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for wowool_sdk-3.5.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5fd5d9625d40ff964618b2ae4b5c729c1a97cd826f83348e3eb4b1aaf0bf28d4
MD5 d12590fad99482b2a71d81b790019fec
BLAKE2b-256 e0d1f4d3435747ef94dd4a6887e1f5370129535a924645dc2dfb44404a77d312

See more details on using hashes here.

File details

Details for the file wowool_sdk-3.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for wowool_sdk-3.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d8a721d3736e737436449554df82dbbb0e98e3dac43e32a55ff3c5a5649720ad
MD5 dd06e32c5aff58fb66069793e99ffd36
BLAKE2b-256 2afef37e91f34b7878b993d03846e51d6e538e6dce5e2faef2a0e1e500bcf933

See more details on using hashes here.

File details

Details for the file wowool_sdk-3.5.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for wowool_sdk-3.5.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f5c7779b95a08cb6d699efec65793a968e2fbec051ce814ed11816142f31b170
MD5 cac96bf966f901e8e572e5f4b2436a3e
BLAKE2b-256 17b9679ec0f8715165f03bc38989b0238e90785ff4c0cdd715662656aaae3bd1

See more details on using hashes here.

File details

Details for the file wowool_sdk-3.5.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for wowool_sdk-3.5.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 029e12db8993948f601f0a74f41707233d2d45e6299cba1022f6b52dab1da425
MD5 26c07d0c33957b433f84dbe5024e3e6a
BLAKE2b-256 0ca5db809167576bbe3cb3e3fb06629b7b69c843bbfaa9daadf296e4985ad15d

See more details on using hashes here.

File details

Details for the file wowool_sdk-3.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for wowool_sdk-3.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2c071859e56b8a3d3648a84f5d33fe60bb39c5ccb5e94ff2b67b4d57e45c8f61
MD5 3d3c2a1a7f06aa98da07a32b419bf932
BLAKE2b-256 89046de7aa379fa3813799534212ee56010d89eacc245a80d53b98719d4b6bc7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page