Skip to main content

docs2tops stands for documents to topics.

What it basically does is:

  • extracting ngrams from the documents
  • extracting meaningful moregrams (2 or more grams)
  • creates semi-automated dictionary - if user provided some possible topics, docs2tops provides similar keywords per topics provided
  • creates fully-automated dictionary

in both cases (either user inputs some topics or not), docs2tops returns 2 dictionaries. if user did not provide any topic, first dictionary will be empty with a message only.

in all cases, fully-automated dictionary will be created.

docs2tops function takes list of documents optionally, you can provide candidate_topics_list, moregrams_sample_size.

docs2tops(docs_input_list, candidate_topics_list=None, moregrams_sample_size=None)

installation

Run the following to install:

pip install docs2tops

usage

from docs2tops import docs2tops
import pandas as pd

df = pd.read_csv(r"C:\Users\my_file.csv")
docs = df['my_texual_content'].to_list()

candidate_topics_list = ['smell', 'taste', 'delivery', 'packaging']
moregrams_sample_size = 100


user_input_dict, fully_auto_dict = docs2tops(docs_input_list=docs,
              candidate_topics_list=candidate_topics_list, 
              moregrams_sample_size=moregrams_sample_size)

list_dicts = [user_input_dict, fully_auto_dict]
for result in list_dicts:
    print(result)
    print('number of topics: ', len(result))
    print('---')

Developing docs2tops

to install docs2tops, along with the tools you need to develop and run tests, run the following in your virtual environment:

pip install -e .[dev]

Metadata

Release files for docs2tops 0.0.3

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

Source distribution (sdist)

Source distribution for docs2tops 0.0.3
File Size Uploaded Provenance Actions
docs2tops-0.0.3.tar.gz 7.9 kB Without provenance Details for docs2tops-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for docs2tops 0.0.3
File Interpreter ABI Platform Actions
docs2tops-0.0.3-py3-none-any.whl Python 3 none any Details for docs2tops-0.0.3-py3-none-any.whl

Total release size: 15.8 kB

Release files / docs2tops-0.0.3.tar.gz

Download URL docs2tops-0.0.3.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ba00b06212541bcb6133564f23a88dfc1ef0413bf51fa174bf7e0f40a26ca845
BLAKE2b-256 checksum
How to use checksums
cd3d57360316caa6a40158119b6016067a108064f8ccbf373b007c652bbf9ab3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / docs2tops-0.0.3-py3-none-any.whl

Download URL docs2tops-0.0.3-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9dd0cffd033b3eef827e804e7d14dc6028e39481626805b1113ac90ccc030860
BLAKE2b-256 checksum
How to use checksums
830239eb321942c75b13c94fe0efd6f4778c50b983a6e74a89ec5ba7edf640dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Security for docs2tops 0.0.3

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