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.1.tar.gz (71.0 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.1-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.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (71.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64

wowool_sdk-3.5.1-cp313-cp313-macosx_11_0_arm64.whl (66.4 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

wowool_sdk-3.5.1-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.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (71.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

wowool_sdk-3.5.1-cp312-cp312-macosx_11_0_arm64.whl (35.1 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

wowool_sdk-3.5.1-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.1.tar.gz.

File metadata

  • Download URL: wowool_sdk-3.5.1.tar.gz
  • Upload date:
  • Size: 71.0 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.1.tar.gz
Algorithm Hash digest
SHA256 37f88549677de0cb4b893ce1a33dc57bae6db296d54d1fec0ab24cd26c7e2447
MD5 941d3f36a325e9756f7f646fecc118c6
BLAKE2b-256 dce52e51d186433e81d715e8469d7fad2d9e0d0fb9b2fb1e64bbb39074c9e7a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wowool_sdk-3.5.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3c9f0214b5ba0ef254ec9986316e06e15be26c15d21ecebe1e382c60661869ed
MD5 e260218c412ab2dec5e07f618738b611
BLAKE2b-256 b9a9afde529f0fb4c5d348d1d59ca8421fd03151769235aa3a9bbfe0e5afa08c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wowool_sdk-3.5.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 97102c5cb514d09e0148080ededa50101c4a936cb5e867bbfd8ffdaef87511d4
MD5 b8c302ab3688579b13e79c814bb3f999
BLAKE2b-256 b85a034c6a60668975887d5f7a1bc978ad15f193432db96be7fa893bce3638f6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wowool_sdk-3.5.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7bd5f77e92002574229990929c72daf37a5520973e150dcfaec1533145339475
MD5 4392c6947e54acd3128d511b71a0b940
BLAKE2b-256 f2b213ff19c5a04be57b168826de48b4a06d9e6a8f819d7f1a88053e7a8f2211

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wowool_sdk-3.5.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2ac3987e81e381b59248c64268ae1f619ab88a7ebdaa9368aae85a60c9e91e5f
MD5 7009d456eceee9c2b77d3b1334600dda
BLAKE2b-256 72a4389f564652d71f802888be8c3e14591ef120f87381405cbe78d4418fd429

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wowool_sdk-3.5.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 3a36359b4410642554cf111126e4fa88cd2dd4927d523d63fbb3cd0e4c23dae1
MD5 18b6121ce35216ce73e1bfd3f2f3fdb1
BLAKE2b-256 fb1344da46cfa2d6bd2b9211b38060a642b5e69b40029e72e7929836829da8f4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wowool_sdk-3.5.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8f095a0297e105274891c1f03b7b4e118fee7f7747dd147873f04a88a8b8d30b
MD5 ec9166b6912a45be7e24a2f6261db280
BLAKE2b-256 0b983496b0edc55138539bcb972b66aaf88c228d64185444f35423858d72faca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wowool_sdk-3.5.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9bf34c15623a263eab98e144666fb375ee49248603865bd5613404adb3a2e834
MD5 0b449c121a202b6235561c104e394130
BLAKE2b-256 6adb2c39da70bc713f1ab2aabbc48843f88ec8613321389a798f666b9ab40b39

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