Skip to main content

No project description provided

Project description

chronowords

Detect semantic shifts over time in word embeddings. Train small PPMI-based language models, create topic models using NMF, and analyze semantic changes using Procrustes alignment.

Features

  • Memory-efficient word embedding training using Count-Min Sketch
  • Topic modeling with Non-negative Matrix Factorization
  • Temporal alignment of word embeddings using Procrustes analysis
  • Cython-optimized PPMI matrix computation

Installation

pip install chronowords

Quick Start

from chronowords.algebra import SVDAlgebra
from chronowords.topics import TopicModel

# Train word embeddings
model = SVDAlgebra(n_components=300)
model.train(your_corpus_iterator)

# Find similar words
similar = model.most_similar('computer')
for word in similar:
    print(f"{word.word}: {word.similarity:.3f}")

# Create topic model
topic_model = TopicModel(n_topics=10)
topic_model.fit(ppmi_matrix, vocabulary)

Documentation

Full documentation available at ReadTheDocs.

Requirements

Python ≥ 3.10 NumPy SciPy scikit-learn Cython

Contributing

Pull requests welcome. For major changes, open an issue first.

License

MIT

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

chronowords-0.1.0.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

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

chronowords-0.1.0-cp312-cp312-macosx_15_0_arm64.whl (16.4 kB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

File details

Details for the file chronowords-0.1.0.tar.gz.

File metadata

  • Download URL: chronowords-0.1.0.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.13.0 Darwin/24.1.0

File hashes

Hashes for chronowords-0.1.0.tar.gz
Algorithm Hash digest
SHA256 59bfb7cc5348cd815168695634fbd2caa4d0b8a53fdbc05d01ab38fcae3e484b
MD5 dcbe51175eb970d0183c7b6db6701a3c
BLAKE2b-256 92c4d5b2cb881b80f5b06b0b92dac7a7559316228410bf2c1e0b4d759f206902

See more details on using hashes here.

File details

Details for the file chronowords-0.1.0-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for chronowords-0.1.0-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 cefcf2dde5ba99ec647a4e0cd48eb0d52e40d6a00797965795947bf9494e854a
MD5 20eb205225221a773bf7b277c2aec065
BLAKE2b-256 9065fc78c6441a521a51479195c4a0e8531c772781fe08bb606877b1eb1b3253

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