GitXplorerGitXplorer
j

similarity

public
1 stars
0 forks
0 issues

Commits

List of commits on branch main.
Verified
baa66d45aeca448db94b2aa6e5e68bc1a65e201d

Update README.md

jjohnpaulbin committed 3 years ago
Verified
f9650db3531970961cf86226e5227e20b98b18ad

Update README.md

jjohnpaulbin committed 3 years ago
Verified
11f63bd58374ace7d15681def7e2e4d73a6f130b

Update README.md

jjohnpaulbin committed 3 years ago
Unverified
3086d13c9f7d7c74aab274caad3fb73e3f96b28b

Add similarity

jjohnpaulbin committed 3 years ago
Verified
09fd6f3e80a3667693a97e04b933be2ac68ce3d3

Create setup.py

jjohnpaulbin committed 3 years ago
Verified
a1ba7cc4376c6ed02127c5fdde70a98b11fbfbe3

Initial commit

jjohnpaulbin committed 3 years ago

README

The README file for this repository.

similarity

Uses embeddings to determine similar results.

Usage:

sentences = {
  'You are awesome!': 1,
  "You aren't so great.": 0,
  "Hmm, I don't know": 0,
  'Oh yeah nice work!': 1,
  # More sentences usually make the results more accurate.
}

from similarity import similar
sim = similar(sentences)

tests = [
  "Cool!",
  "Nah, this is not it..."
]

for i in tests:
    print(i)
    out = sim.similar(i, max=1) # max is amount of results returned
    if out[0] == 1:
        print("Positive!")
    else:
        print("Negative!")
    print()