0
$\begingroup$

I am working on a problem where I have two texts T1, T2. T1 contains some important points that I have entered. How can I make sure that T2 has those points? I am aware of the algorithms like cosine, jaccard, BERT for semantic similarity but the problem is that they apply to the whole text whereas I want point-wise similarity i.e. T2 must contain the T1 points although the order and words used may differ a bit.

By points I meant bullet points covering discrete concepts and I basically want to check how many discrete concepts in my T1's points are covered in T2 where they could be in a single sentence or spread out across multiple sentences.

Example:

So T1 could have the following two points:

  • The Queen reigned from 1943 to 2022.
  • The Queen was the second longest reigning monarch.

Now T2 could either be:

The Queen was the second longest reigning monarch with her reign spanning 1952 to 2022.

or

  • The Queen reigned from 1952 to 2022.
  • She was Britain's second longest monarch.

In both these cases, T2 should be considered to contain both points in T1.

$\endgroup$
2
  • $\begingroup$ what do you mean by points $\endgroup$ Commented Nov 6, 2022 at 14:29
  • $\begingroup$ @HadarSharvit edited to add an example. $\endgroup$
    – learner
    Commented Nov 6, 2022 at 16:55

1 Answer 1

1
$\begingroup$

If the structure of both $T_1$ and $T_2$ is bullet points, I presume that the similarity between every pair of bullet points is a nice baseline. I'd go through various encoders and see how they compare. Otherwise, if $T_2$ is a paragraph, maybe split it to sentences and treat those as bullet points. Other option (which might be harder) is to fine-tune a language model with the following input and label: suppose the bullet points are $\{bp_1^1,...,bp_1^n\}$ for $T_1$ and $\{bp_2^1,...,bp_2^m\}$ for $T_2$, we can formulate a prompt as

Input: text1=$bp_1^i$, text2=$bp_2^j$

Output: True iff text2 in text1

Where the targets were tagged by you apriori

$\endgroup$
3
  • $\begingroup$ How to split into sentences when the same point could be spread across two or more sentences in T2? Also how to order the points in T2 after the split? $\endgroup$
    – learner
    Commented Nov 6, 2022 at 18:23
  • $\begingroup$ And what do you mean by "language model"? $\endgroup$
    – learner
    Commented Nov 6, 2022 at 23:45
  • $\begingroup$ Lastly, this won't be contributing anything new to preexisting research right? $\endgroup$
    – learner
    Commented Nov 7, 2022 at 0:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .