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.5.1.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.5.1-py3-none-any.whl (69.2 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for simple_nlp_library-1.5.1.tar.gz
Algorithm Hash digest
SHA256 4a1a57ec2633fbc2fbcc8c07f1cba2920d53e5e4d883c209d9f18bac40f777f5
MD5 b360f1a33ed31589b71393fd0f397a93
BLAKE2b-256 483558acfb29b2f6146530d3bba5262bd70eaff9ae31a29fd17c5d936c670ac2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for simple_nlp_library-1.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 afc9b3e034bff356188dab8baab8a37f528ecc53fd86c309e2d23ab6ed87bca6
MD5 3132ec064d6f61ab16674d8509bbdff8
BLAKE2b-256 56f9f770a3ec431e9c9e8e9e94a190658e64134ef48ac0546e9ad44e2c2a14fc

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