Skip to contents

similar_text is an S3 class for text similarity comparisons.

Usage

similar_text(scores, summary, methods, list_names, digits = 3)

Arguments

scores

List of similarity scores per method and comparison

summary

Summary statistics by method and comparison

methods

Character vector of methods used for comparison

list_names

Character vector of names for the compared lists

digits

Number of digits to round results (default: 3)

Value

An object of class "similar_text" (which inherits from "similar") containing:

  • scores: List of text similarity scores per method and comparison

  • summary: Summary statistics by method and comparison

  • methods: Character vector of text similarity methods used (osa, lv, dl, etc.)

  • list_names: Character vector of names for the compared text lists

  • digits: Number of digits to round results in output

The text similarity scores are normalized values between 0 and 1, where 1 indicates identical text and 0 indicates completely different text based on the specific method used.

Details

This class extends the similar class and implements text-specific similarity comparison methods.