Skip to main content

Identifying topics in your documents

The topics app identifies topics in your documents and their relevancy.

Themes are pre-defined categories in which you want to categorize your documents. While topics are extracted from the processed documents.

Prerequisites

The topics.app uses the TopicCandidate entity to identify potential topics. It will automatically run the built-in topics domain to extract these annotations and perform the topic calculus.

Options

TopicsOptions

interface TopicsOptions {
  count?: number;
  threshold?: number;
  ignore_entities?: boolean;
}

with:

Property Description
count Maximum number of topics in the results
threshold Minimal probability, expressed as a percentage, for a topic candidate to be considered a topic
ignore_entities If enabled, entities such as Person, Country and Company won't be considered topic candidates

Results

TopicsResults

type TopicsResults = TopicsResult[];

TopicsResult

interface TopicsResult {
  name: string;
  relevancy: number;
}

with:

Property Description
name Name of the topic
relevancy Relevancy of the topic within the document

Examples

Identifying topics in your documents

The topics app identifies topics in your documents and their relevancy.

Themes are pre-defined categories in which you want to categorize your documents. While topics are extracted from the processed documents.

Prerequisites

The topics.app uses the TopicCandidate entity to identify potential topics. It will automatically run the built-in topics domain to extract these annotations and perform the topic calculus.

Options

TopicsOptions

interface TopicsOptions {
  count?: number;
  threshold?: number;
  ignore_entities?: boolean;
}

with:

Property Description
count Maximum number of topics in the results
threshold Minimal probability, expressed as a percentage, for a topic candidate to be considered a topic
ignore_entities If enabled, entities such as Person, Country and Company won't be considered topic candidates

Results

TopicsResults

type TopicsResults = TopicsResult[];

TopicsResult

interface TopicsResult {
  name: string;
  relevancy: number;
}

with:

Property Description
name Name of the topic
relevancy Relevancy of the topic within the document

API

Examples

Using the Topics Identifier object

This script uses the wowool SDK to identify topics in an English sentence, specifying the number of topics to return.

from wowool.sdk import Pipeline
from wowool.topic_identifier import TopicIdentifier

english = Pipeline("english")
number_of_topics = 5
topic_it = TopicIdentifier(language="english", count=number_of_topics)
# display the results of every file, by iterating over every file.
document = topic_it(english("This is the effect of the green house gases"))
for topic in document.topics:
    print(f" - {topic}")

Using the pipeline

This script demonstrates how to use the wowool.sdk's Pipeline class to identify topics in an English text.

from wowool.sdk import Pipeline

pipeline = Pipeline("english,topics.app")
doc = pipeline("Gas supplies to Europe wounded soldiers inside Azovstal steel mill")
print(doc.topics)

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.  

Metadata

Release files for wowool-topic-identifier 3.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for wowool-topic-identifier 3.2.1
File Interpreter ABI Platform Actions
wowool_topic_identifier-3.2.1-py3-none-any.whl Python 3 none any Details for wowool_topic_identifier-3.2.1-py3-none-any.whl

Release files / wowool_topic_identifier-3.2.1-py3-none-any.whl

Download URL wowool_topic_identifier-3.2.1-py3-none-any.whl
Size 13.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee0d85e032485eeb2c201e7a542cb39db38432fe96f3f0831c3ede385ee0358a
BLAKE2b-256 checksum
How to use checksums
af0643da61ed72a3d0713e9c4d4b9faa43dedaca3179c377de19a04ab1d36283
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Security for wowool-topic-identifier 3.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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