Class: SvgConform::Compatibility::SemanticPattern
- Inherits:
-
Lutaml::Model::Serializable
- Object
- Lutaml::Model::Serializable
- SvgConform::Compatibility::SemanticPattern
- Defined in:
- lib/svg_conform/compatibility/validity_analysis.rb
Overview
Model for semantic pattern analysis
Instance Method Summary collapse
-
#initialize(pattern_type:, svg_conform_message:, svgcheck_message:) ⇒ SemanticPattern
constructor
A new instance of SemanticPattern.
- #map_to_semantic_key(key, confidence = 1.0) ⇒ Object
- #unmapped? ⇒ Boolean
Constructor Details
#initialize(pattern_type:, svg_conform_message:, svgcheck_message:) ⇒ SemanticPattern
Returns a new instance of SemanticPattern.
61 62 63 64 65 66 67 |
# File 'lib/svg_conform/compatibility/validity_analysis.rb', line 61 def initialize(pattern_type:, svg_conform_message:, svgcheck_message:) @pattern_type = pattern_type @svg_conform_message = @svgcheck_message = @mapped = false @confidence_score = 0.0 end |
Instance Method Details
#map_to_semantic_key(key, confidence = 1.0) ⇒ Object
69 70 71 72 73 |
# File 'lib/svg_conform/compatibility/validity_analysis.rb', line 69 def map_to_semantic_key(key, confidence = 1.0) @semantic_key = key @confidence_score = confidence @mapped = true end |
#unmapped? ⇒ Boolean
75 76 77 |
# File 'lib/svg_conform/compatibility/validity_analysis.rb', line 75 def unmapped? !@mapped end |