Skip to main content

Simple NLP library

Project description

simple_nlp_library

Simple NLP library

usage

installation

python3 -m pip install --upgrade simple_nlp_library

api

semantic_tokens

preprocessing.semantic_tokens("The quick brown fox jumps over the lazy dog")

cosine_similarity

metrics.cosine_similarity([1.0, 1.0, 1.0], [4.0, 4.0, 4.0])

inserting_distance

metrics.inserting_distance("simple", "simpler")

inserting_similarity

metrics.inserting_similarity("simple", "simpler")

jaccard_similarity

metrics.jaccard_similarity([1, 2, 3], [1, 2, 3, 4])

embeddings

vectors = embeddings.model()
vector = vectors["facebook"]

sentence similarity

vectors = embeddings.model()
metrics.cosine_similarity(
    embeddings.tokens_vector(vectors, preprocessing.semantic_tokens("the slow brown bear jumped over the lazy dog")),
    embeddings.tokens_vector(vectors, preprocessing.semantic_tokens("the quick red fox jumped over the lazy cat")),
)

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

simple_nlp_library-1.6.0.tar.gz (68.0 MB view details)

Uploaded Source

Built Distribution

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

simple_nlp_library-1.6.0-py3-none-any.whl (69.2 MB view details)

Uploaded Python 3

File details

Details for the file simple_nlp_library-1.6.0.tar.gz.

File metadata

  • Download URL: simple_nlp_library-1.6.0.tar.gz
  • Upload date:
  • Size: 68.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for simple_nlp_library-1.6.0.tar.gz
Algorithm Hash digest
SHA256 2da00cf26ccc9c62917ebce387743c57dfa53ea0e84d323951c0d4ac0510dc5e
MD5 38012112841575de9c7ce86af5ffdd25
BLAKE2b-256 139a5a797d55026ae839c4300962b4f721d49301ae827dab0a39ff22280a5d73

See more details on using hashes here.

File details

Details for the file simple_nlp_library-1.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for simple_nlp_library-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 220f319fc3dcea16fb8d50ce3897f32216e27d48a8a3d5b63bb651083be426fc
MD5 17584685fbe35d53920c36d0d811e068
BLAKE2b-256 b08499858921a3494fee8bb13009cc65b1bf487076557d99a155d089d4244d00

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