SequenceMatch: Token-level string similarity comparison

This metric aims to evaluate token-level similarity between a generated label and a gold-standard label using Python's difflib.SequenceMatcher. It returns a similarity ratio in [0, 1] based on the longest contiguous matching subsequences shared by the two strings.

Example:

Generate_Label_1: hasVersion

Generate_Label_2: has_version

Generate_Label_3: Liquor

Gold_Standard_Label: hasVersion

Result:

  1. SequenceMatch(Generate_Label_1, Gold_Standard_Label) = 1.00
  2. SequenceMatch(Generate_Label_2, Gold_Standard_Label) ≈ 0.95
  3. SequenceMatch(Generate_Label_3, Gold_Standard_Label) ≈ 0.20

What is being measured?

This metric captures structural overlap between two labels at the substring level. It is more forgiving than HardMatch and matches naming-convention variants, but it remains purely lexical and does not account for meaning.

Metric information

RDF Resource Description Framework Flyer Icon
Title
Token-level string similarity comparison
Identifier
Keywords
Ontology Concept Matching, Metric, Classes, Properties, Lexical
Contact Point
Publisher
Version
0.1.0
License
Category
Ontology Concept Matching
Dimension
Task
Applicable for
Benchmark
CQ2OE Benchmark: Competency Questions for Ontology Engineering. A benchmark for evaluating LLM-assisted ontology generation from competency questions.
Status
Active
Active Proposed Inactive Deprecated
Ontology Engineering Group https://oeg.fi.upm.es