Sentence similarity is a topic of Natural Language Processing that tries to find a semantic or syntactic matematical similarity between two or more sentences
Questions tagged [sentence-similarity]
231 questions
0
votes
1 answer
How to get similarity from LSA
I am working on latent semantic analysis, i am trying to get similarity from 2 documents. I run my code of latent semantic analysis on Python and when i run it i get :
Here are the singular values
[ 0.7376057 0.4596623 0.25422212]
Here are the…

YayaYaya
- 125
- 2
- 3
- 10
0
votes
1 answer
Django: Filter Items similar to given Item
I have a django Backend (Postgre DB).
Suppose a given table, say A, has charfield called 'message'. Now, what I want to do is find all items in A which have similar 'message' to the 'message' field of a given instance. The similarity will be based…

silent_grave
- 628
- 1
- 7
- 20
0
votes
1 answer
How to go to from word similarity to overall sentence similarity
I have implemented a sentence similarity method using WS4J.
I have read about sentence similarity in articles which is based on word similarity in two sentences. But I couldn't find a method which computes and returns a single value for the overall…

Jonathan Grey
- 51
- 4
0
votes
1 answer
R: Row numbers unmatched for Sentence to word-table
From my previous problem, I have some texts in different rows, and from the text I am trying to generating word-table for each of the words. But problem is occurring when the row number of the text column, and row number of the word-table unlike. It…

bim
- 612
- 7
- 18
0
votes
0 answers
How to measure term constraint in sentence?
I am trying to figure a way to algorithmically compute the informativeness of a word in a sentence based on how constrained the sentence is with that word missing. For example, how can I compute how much information the word "fox" provides in the…

user3425451
- 25
- 1
- 7
0
votes
0 answers
MySQL Similar values in VARCHAR column
I have a database table for storing restaurant names and the city they are located in. Example:
name | city
eleven madison park | NYC
gramercy tavern | NYC
Lotus of Siam | TOK
The Modern | LA
ABC Kitchen …

Ananth
- 4,227
- 2
- 20
- 26
-1
votes
1 answer
Given a sentence, how can I generate similar sentences of that particular sentence using machine learning or other ways?
I am testing my AI app that ask a question and based on that do some processing. I have to write some tests that even people ask the same question in different way the system will generate same result.
Now let's say question is as below
Who is a…

Sal
- 7
- 1
-1
votes
1 answer
How to find similarity score between two rows in a pandas data frame
I want to find the similarity of given sentences between two rows.
In my sample data frame:
import pandas as pd
data = [f'Sent {str(i)}' for i in range(10)]
df = pd.DataFrame(data=data, columns=['Sentences'])
Sentences
0 Sent 0
1 Sent 1
2 …

kcats_wolf
- 3
- 3
-1
votes
1 answer
How do I locate the same string of text across different revisions of the same text (an ebook)?
I have a string of text highlighted in an ebook. This ebook has new, revised versions coming out every couple of years. I want to programatically re-locate this highlight across all these updated ebook versions. How would I approach this problem?…

midrare
- 2,371
- 28
- 48
-1
votes
2 answers
FileNotFound error downloading roberta-model sentence transformers
I've already downloaded the "roberta-large-nli-stsb-mean-tokens" model, but it starts downloading again and again.
Note: This is not related to space, the machine has space.
And this error comes...FileNotFoundError
from sentence_transformers import…

Arjit Yadav
- 1
- 2
-1
votes
3 answers
efficient algorithm for comparing two lists
I'm building a similarity matrix of a list of items.
The naive approach is to iterate the list twice, but this needlessly will compare A:B and B:A when they're the same.
for A in items:
for B in items:
if A==B: continue
sim[A][B] =…

dcsan
- 11,333
- 15
- 77
- 118
-1
votes
2 answers
Is there a function to print out the most similar sentence in spaCy?
I have a txt file containing 10 movie synopses. I have a separate synopsis for the Hulk movie stored as a string in a variable. I need to compare the 10 synopses to that of the Hulk, to find the most similar movie to recommend. My code is as…

Jeandre Verster
- 15
- 1
- 4
-1
votes
1 answer
Computing a similarity score for a set of sentences
My team does a lot of chatbot training, and I'm trying to come up with some tools to improve the quality of our work. In chatbot training, it is really important to train intents with diverse utterances that phrase the same intent in very different…

SymphonyTomorrow
- 1
- 1
- 3
-1
votes
1 answer
What is the best way to model document similarity between different string parameters?
I have a problem of predicting solutions to problems faced by users.
The problem setting is like this:
We have a database of problems and solutions. For each problem we have three parameters to represent it.
JobName (String - Name of the Job)
JobId…

kaushalpranav
- 1,725
- 24
- 39
-1
votes
1 answer
Fuzzy matching sentences to stanzas
I have lyrics from srt subtitle files. If I want to match them to stanzas from another lyrics website, what is the best approach to this?
My approach has been taking tf-idf vector each lyric line and trying to fuzzy match to the staza, using…

Forethinker
- 3,548
- 4
- 27
- 48