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

stop_words = preprocessing.stop_words()
preprocessing.semantic_tokens(stop_words, "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.vectors()
vector = vectors["facebook"]

sentence similarity

vectors = embeddings.vectors()
stop_words = preprocessing.stop_words()
metrics.cosine_similarity(
    embeddings.tokens_vector(vectors, preprocessing.semantic_tokens(stop_words, "the slow brown bear jumped over the lazy dog")),
    embeddings.tokens_vector(vectors, preprocessing.semantic_tokens(stop_words, "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-3.0.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-3.0.0-py3-none-any.whl (69.3 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: simple_nlp_library-3.0.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-3.0.0.tar.gz
Algorithm Hash digest
SHA256 62626e6b4f36c82412d8257ca81bc1667882d9c34339c6ed0034ce96f9c370b7
MD5 207a599f82c675f38bd893a5660ef1e5
BLAKE2b-256 3f5267de03ac5ac5def6a47f33ba308ebedfa6fc7efb3faa854e58570cc644ce

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for simple_nlp_library-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 96a70a80d9ba5a66f27abf3d67595ffeabdb817425df54e826a8af338167322e
MD5 a8f921faacc274ac9263f67b526807db
BLAKE2b-256 bde67babacb9263ea078e59421af9571d7f774755983a8f7a9f99dc03940581b

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