Skip to main content

Analogy is an experimental open source project for Natural Language Processing. It aims to perform 2 newly introduced NLP tasks: word comparison and sentence comparison.

Analogy provides semantic similiarity and differences between two pieces of text. Text can be in the form of a word or a sentence.

A pretrained model is released to get started. You can also retrain upon an existing model.

Getting Started:

Prerequisites: Python 3.0 or higher Stanford Core NLP (3.9.2)

Installing:

pip install analogy

Read instructions on how to install and run stanford corenlp server.

Analogy functions:

  1. findComparison(model, word1, word2)
  2. findSentenceComparison(model, sentence1, sentence2)
  3. trainModel(sentences) #Input is list of sentences
  4. retrainModel(model, sentences)
  5. saveModel(name, model) #Be sure to add '.npz' at last
  6. loadModel(name)

Example:

findComparison(model, "apple", "orange")

Output:

Word1 = apple Word2 = orange Similiarity = fruit

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Analogy-0.1.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

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

Analogy-0.1-py3-none-any.whl (21.7 kB view details)

Uploaded Python 3

File details

Details for the file Analogy-0.1.tar.gz.

File metadata

  • Download URL: Analogy-0.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.2

File hashes

Hashes for Analogy-0.1.tar.gz
Algorithm Hash digest
SHA256 ee86f55c812bf17847d9020d3b948a8259000a5a56f82d8ba33999e5be48f53c
MD5 eb318203939018e8d15cc0df7e8fca4f
BLAKE2b-256 b8cbe3c384ee4041872197cb35ff33b53f70f9ef0a9f57062e877597d3267fd4

See more details on using hashes here.

File details

Details for the file Analogy-0.1-py3-none-any.whl.

File metadata

  • Download URL: Analogy-0.1-py3-none-any.whl
  • Upload date:
  • Size: 21.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.2

File hashes

Hashes for Analogy-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b4ce02f9e305dfebcf3a8b7870ffa3af03fb7f7ec6a8d7b7d549c8dca146821a
MD5 9b843b04b532ce679cf8dde7ec6b464e
BLAKE2b-256 4dc2dd33758b97a76e86de3b6650b7f98d8e063955cdaa73dc4ef26ff573522b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page