clsTranslationResult¶
clsTranslationResult is a passive, serializable value object that pairs an arbitrary translated result with a confidence grade and an optional message, letting a translation caller distinguish an exact match from a best-guess or failed translation (BR-POL-014). No in-repo caller of this type was found.**
Purpose¶
- Carry a translation outcome (
Result) alongside a standardized confidence grade (Accuracy) so callers can rank or gate on translation quality (BR-POL-014). - Default to the
Failureaccuracy grade when constructed without an explicit accuracy, so an uninitialized result is never mistaken for a confident match.
Context¶
- Namespace:
SAIF.Business.Policy - Assembly/package:
SAIF.Business.Policy(PolicyCommon)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
Result |
Property Result As Object |
Holds the translated value produced by the caller's translation logic. |
Accuracy |
Property Accuracy As Accuracies |
Confidence grade for Result, drawn from the Accuracies scale (BR-POL-014). |
Message |
Property Message As String |
Optional human-readable note about how the translation was derived or why it failed. |
Accuracies (nested enum) |
Public Enum Accuracies — ExactMatch = 100, MostLikely = 75, Default = 10, Failure = 0 |
Fixed confidence scale used to grade translation results (BR-POL-014). |
New() |
Public Sub New() |
Parameterless constructor; Accuracy defaults to Failure per BR-POL-014. |
New(inResult, inAccuracy, inMessage) |
Public Sub New(inResult As Object, inAccuracy As Accuracies, Optional inMessage As String = Nothing) |
Constructs a result with an explicit value, accuracy grade, and optional message. |
ToString() |
Overrides Function ToString() As String |
Returns Message as the string representation of the result. |
Behavioral notes¶
- The
Accuraciesscale is a closed, fixed set of four grades; there is no mechanism to add custom confidence levels (BR-POL-014). - No in-repo consumer of
clsTranslationResultwas found; it appears intended for translation logic implemented in other applications that consume this library.**
Constraints and usage notes¶
Resultis untyped (Object); callers must know the expected translated type by convention.
Note: Statements marked with ** could not be confirmed; treat as unknown until verified.
Sources¶
- SAIF.Business.Policy/clsTranslationResult.vb